How to White List from MailScanner

Julian Field MailScanner at
Sat Jul 3 14:42:31 IST 2010

If you want the "big switch" setting to put a ruleset on, it's called 
"Scan Messages".
You can whitelist a particular IP or hostname like this:
Set in MailScanner.conf:
Scan Messages = %rules-dir%/scan.messages.rules

And then in /etc/MailScanner/rules/scan.messages.rules put things like this:

From: 192.168.  no
From: no
FromOrTo: default yes

This will whitelist all machines whose IP addresses start with 192.168 
and any host whose hostname is in "" (notice the 
"host:" in this rule!). If you leave out the "host:" bit, then it will 
whitelist all mail whose sender address claims to be 
anything at which is very dangerous as the sender 
address can be trivially faked!

Hope that helps get you going.

The next finer controls than "Scan Messages" are "Virus Scanning = yes", 
"Dangerous Content Scanning = yes" and "Spam Checks = yes", if you want 
to control certain major areas of processing.


On 02/07/2010 23:21, Peter Ong wrote:
> From: "Peter Ong" < at>
>> To: "mailscanner"<mailscanner at>
>> Sent: Friday, July 2, 2010 12:12:32 PM
>> Subject: How to White List from MailScanner
>> Hello Everyone,
>> How do I whitelist a server from MailScanner? Allow me to explain.
>> I know how to whitelist someone in postfix through the access table. I
>> know how to whitelist someone from MailScanner's spamassassin through
>> the rules/spam.whitelist.rules and similarly for the virus scanning.
>> But MailScanner has a function where it disarms html tags like script,
>> img, a, etc.
>> I can whitelist an address from spam, virus, and at the MTA, but how
>> do I whitelist so that specific domains are not disarmed by
>> MailScanner?
>> p


Julian Field MEng CITP CEng
Buy the MailScanner book at

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
Follow me at and

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the MailScanner mailing list