seperating recipient based whitelisting for virus and spam checks

Jan Brinkmann lucky at the-luckyduck.de
Tue Apr 18 15:11:14 IST 2006


Hi,

Jules told me a few days ago how to enable / disable spam checking for
certain recipients. I wrote a custom function (DoWeScan) which checks an sql
database based on the 'todomain' field in the message. In the MailScanner.conf,
the Scan Messages setting calls this function. This works fine,
but it enables or disables all checks based on the settings in the
database. Now, I tried to go one step further to make it possible to
give users more options to select from. I tried to go the way Jules
recommended (i.e. I wrote two more custom functions), for the 'Virus Scanning' and 
'Spam Checks' settings, but it doesnt work as expected. I tried the
following things:

- Scan Messages = no
  Virus Scanning = &DoWeVirusScan
  Spam Checks = &DoWeSpamScan

Result: No messages are scanned at all.

- Scan Messages = yes

Result: no matter what i set in the database for spam or virus checks,
  every message gets scanned

- Scan Messages = &DoWeScan , where DoWeScan checks if either the
  spamfilter, the virusscanner or both features should be enabled.
  
Result: if one of these things is active, both checks are enabled. this is
  because the DoWeScan function contains an inclusive or logic. 


My question now is, can I enable / disable spam and virus checks
indepently?


More information about the MailScanner mailing list