File Attachment size setting questions

Stephen Swaney steve.swaney at
Wed Aug 9 16:50:04 IST 2006

> -----Original Message-----
> From: mailscanner-bounces at [mailto:mailscanner-
> bounces at] On Behalf Of Golden, James
> Sent: Tuesday, August 08, 2006 11:15 PM
> To: MailScanner discussion
> Subject: File Attachment size setting questions
> I am trying to accomplish 2 things.  In upgrading our MTA's (MailScanner,
> SA, ClamAV), I thought it would be best to block large attachment files
> here instead of on the mail server (conserve internal bandwidth).  In
> doing so there are 2 settings I can't figure out via my research.
> 1.  How can I NOT send the recipient the message at all?  I just want a
> message going to the sender.
> 2.  How do I not store that message locally.  Currently we store the mail
> (temporarily).
> Thanks,
> James Golden

If you using sendmail or the latest Postfix that can use milters, look at:

Milter-lengtf is a free milter form Anthony Howe. It is a Sendmail utility
milter that imposes message size limits by IP address, domain name, or
sender address on a message body length, excluding the message headers.
Sendmail's MaxMessageSize option only allows for a single global server wide
message size limit, which is insufficient for some sites that would prefer
finer granularity in the application of message size limits. This is
particularly useful for mail hosts that manage several domains and/or a
large number of users, such as an ISP.

The MTA is the right place to block oversize messages, before acceptiong tem
and then running them through MailScanner. 


Stephen Swaney
Fort Systems Ltd.
stephen.swaney at

More information about the MailScanner mailing list