Custom Logging by "Always Looked Up Last"

Leonardo Helman mailscanner at LISTS.COM.AR
Thu Jul 28 14:47:27 IST 2005


Hi

I'm using the "Always Looked Up Last" configuration parameter
to do some custom logging.

I could'nt use the "Detailed Spam Report = no" parameter,
because if I set it, $message->{spamreport} is overwritten


somthing like line 243 of MessageBatch.pm
      $message->{spamreport} = MailScanner::Config::LanguageValue($message,
                               ($message->{isspam}?'spam':'notspam'));

So I made a very quick&dirty patch, so I save the original spamreport for later
use in "Always Looked Up Last"

-----------------------------------------------------------------------------
diff -Naur .MailScanner-4.44.1.msidpatched/lib/MailScanner/MessageBatch.pm .MailScanner-4.44.1/lib/MailScanner/MessageBatch.pm
--- .MailScanner-4.44.1.msidpatched/lib/MailScanner/MessageBatch.pm     Sun Jun 26 13:11:42 2005
+++ .MailScanner-4.44.1/lib/MailScanner/MessageBatch.pm Thu Jul 28 09:04:36 2005
@@ -241,6 +241,8 @@
     $counter += $message->IsSpam();
 
     if (!MailScanner::Config::Value('spamdetail', $message)) {
+      # PERTLEOH: Copy the value for custom logging in LastLookup
+      $message->{spamreportdetailed}=$message->{spamreport};
       $message->{spamreport} = MailScanner::Config::LanguageValue($message,
                                ($message->{isspam}?'spam':'notspam'));
     }
-----------------------------------------------------------------------------


--  
Leonardo Helman
Pert Consultores
Argentina

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!



More information about the MailScanner mailing list