MailScanner and Zip Attachments

Julian Field MailScanner at
Tue Apr 15 22:51:12 IST 2008

Antencek wrote:
> Hello all!
> I am using MailScanner 4.66.5 with Zip Attachments setting = yes.
> Works great.
> Now I want to set rules for particular e-mail address/domain not to 
> zip attachments (FromOrTo).
> According to 
> I have made zip-attachments.rules with the content:
> FromOrTo: at no
> FromOrTo: no
> FromOrTo: default yes
> And set MailScanner.conf:
> Zip Attachments = %rules-dir%/zip-attachments.rules
> Restarted MailScanner, but this does not seem to work.
> The MailScanner is acting like Zip Attachments setting = no for everyone.
> Please help me find what I am doing wrong?
Make sure you aren't just giving it files that are too small to trigger it:
Attachments Min Total Size To Zip = 100k
is the default setting.

Also, remember that MailScanner uses the envelope sender and 
recipient(s) and not the addresses that appear in the headers.

Have you checked it with "MailScanner --lint"? Also, what happens when 
you do a command like this:
MailScanner --value=zipattachments --from user at
and then an opposite example:
MailScanner --value=zipattachments --from user at
The first one should give you a "no" result while the 2nd one should 
give you a "yes" result.

If that works, then your ruleset is correct, and so you need to get back 
to us so I can take a look and test it out myself.
> I would also like to put in use other rules for zip and attachments 
> based on FromOrTo.
Don't quite understand your point here.


Julian Field MEng CITP CEng
Buy the MailScanner book at

MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
PGP public key:

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