Too many attachments - Enhancement request

Brad Beckenhauer bbecken at aafp.org
Wed Mar 4 15:37:45 GMT 2009


Running MailScanner v4.74.16

Yesterday I got a call that a client was not receiving "digest" email from a Lyris List Server.   I scanned the mail logs and found the following message:

maillog.1:Mar 03 00:00:34 mxxx MailScanner[26495]: Too many attachments (221) in 382851CA8007.738AC


At first I thought it was the "Maximum Attachments Per Message" in MailScanner.conf, but that was set to '200'.

Maximum Attachments Per Message = 200

I then checked MailWatch to and discovered that the error was related to Viruses, so I looked at the following settings:

# In every batch of virus-scanning, limit the maximum
# a) number of unscanned messages to deliver
# b) number of potentially infected messages to unpack and scan
# c) total size of unscanned messages to deliver
# d) total size of potentially infected messages to unpack and scan

Max Unscanned Bytes Per Scan = 100m
Max Unsafe Bytes Per Scan = 50m
Max Unscanned Messages Per Scan = 30
Max Unsafe Messages Per Scan = 30

First thing I noted was that the items are out of order "a) != Max Unscanned Bytes Per Scan = 100m

Perhaps Julian could change the order of these items in the next release?

Since the email in question had over 40 attachments, that left two possible choices:
Max Unscanned Messages Per Scan = 30
Max Unsafe Messages Per Scan = 30

One of these is the possible culprit for me to tinker with.

Enhancement request:   
Rather than just long "Too many attachments" could the message log also include what MailScanner "setting" triggered the error.

example message log:
Before:
maillog.1:Mar 03 00:00:34 mxxx MailScanner[26495]: Too many attachments (221) in 382851CA8007.738AC

After:
maillog.1:Mar 03 00:00:34 mxxx MailScanner[26495]: Too many attachments (Max Unsafe Messages Per Scan) (221) in 382851CA8007.738AC

Also, how is the MailScannerCounter of 221 in the message log useful?  How is it used for debugging?

thanks!
Brad




More information about the MailScanner mailing list