Scan Messages and CustomFunction

Alvaro Marín alvaro at hostalia.com
Wed Sep 23 15:52:47 UTC 2015


Hello,

I'm writing a CustomFunction to check the "Scan Messages" value in a
database:

Scan Messages = &ScanMsgs

I've done the same with :

Spam Checks (for avoid mails being scanned, that is, whitelisting)
Is Definitely Spam  (for blacklisting)

and these 2 functions run fine.

The problem with "Scan Messages" is that the function is executed two
times for each message:

Sep 23 17:15:05 MailScanner[22554]: 4694D2180A7.AC573: ScanMsgs checking.
Sep 23 17:15:05 MailScanner[22554]: 4694D2180A7.AC573: ScanMsgs checking.

and I see in MySQL logs that the queries are done 2 times.
Simplifying the code to:

========
package MailScanner::CustomConfig;
 sub InitScanMsgs {
   MailScanner::Log::InfoLog("Starting ScanMsgs...");
 }
 sub ScanMsgs {
   my($message) = @_;
   my $msgid=$message->{id};
   MailScanner::Log::WarnLog("$msgid: ScanMsgs checking.");
   return 0;
}
 sub EndScanMsgs {
   MailScanner::Log::InfoLog("Ending ScanMsgs...");
   exit;
 }
1;
========

the problem still occurs.
Any idea? Is strange because, as I've said, white and blacklisting work
fine with similar code.

Thank you.
Regards,

-- 
Alvaro Marín Illera
Hostalia Internet
www.hostalia.com



More information about the MailScanner mailing list