Filename rule question

Marco Induni minduni at ti-edu.ch
Tue Jul 3 16:08:19 IST 2007


Hi All,
I try to deny some email attachments based just on the filename.
So I setup the following test rule to deny all attachment for email
sended to me at pluto.com (obviously just a real address)

- in /etc/MailScanner/Mailscanner.conf
-- Filename Rules = %rules-dir%/filename-rules.rules

- in /etc/MailScanner/rules/filename-rules.rules
-- To: me at pluto.com           /etc/MailScanner/filename-alldeny.conf
-- FromOrTo: default
/etc/MailScanner/filename-nocheck.rules.conf

- in /etc/MailScanner/filename-alldeny.conf
-- deny    .*      -		-

- in /etc/MailScanner/filename-nocheck.rules.conf
-- allow    .*      -		-


So I expect that any attachment will be denied, but is not true.
It seems that everything is passing through, and the rule is not 
matching anything.
I've done MailScanner --lint and no syntax error appear.
I've also tried the standard rules enclosed (deny .exe .reg,...), but
didn't work.

Question, for the filename rule to work, should I always setup also the
filetype rule ?

Any other ideas ?
Where I'm wrong ?


Thank you and best regards


Marco Induni




More information about the MailScanner mailing list