Monday, 14 April 2008

Configure MailScanner to skip checking local mail

Every day our system creates thousands of mails we send to customers and we keep a BCC so we can prove we have sent the email. Its pointless MailScanner checking these emails for virus and spam.

On checking the MailScanner configuration files I found it was very simple.

Simply edit MailScanner.conf and then change

Scan Messages = yes

to read

Scan Messages = %rules-dir%/scan.messages.rules

Then create scan.messages.rules in your rules directory and add your rules like the following example

From: /^192\.168\.12\./ no
FromOrTo: default yes

This means that any message from 192.168.12.* will not be checked

After that simply restart MailScanner, send some test messages and check the mail headers to confirm that internal messages are no longer scanned and external messages are still scanned.

For more information on rules see the EXAMPLES or README file in the rules directory.

No comments: