Max Message and Attachment Sizes

Michael Mansour micoots at yahoo.com
Fri Jun 8 07:17:11 IST 2007


Hi,

The following two options seem to be the only ones to control this:

# The maximum size, in bytes, of any message including the headers.
# If this is set to zero, then no size checking is done.
# This can also be the filename of a ruleset, so you can have different
# settings for different users. You might want to set this quite small for
# dialup users so their email applications don't time out downloading huge
# messages.
Maximum Message Size = %rules-dir%/maximum.message.size.rules

# The maximum size, in bytes, of any attachment in a message.
# If this is set to zero, effectively no attachments are allowed.
# If this is set less than zero, then no size checking is done.
# This can also be the filename of a ruleset, so you can have different
# settings for different users. You might want to set this quite small for
# large mailing lists so they don't get deluged by large attachments.
Maximum Attachment Size = %rules-dir%/maximum.attachment.size.rules

My problem is that I have set one domain to limit by 10M for each of the options above, but the problem is reading each option more carefully, it doesn't seem to talk about the _total_ size of the message plus attachement, only the size limit for each attachment onto a message.

What I need is for any message for a particular domain (which I setup in each rules file above) that is over a _total_ of 10M, regardless if that 10Mb is made up of multiple xmb files or not, to be rejected with an email back to the sender explaining the email is too big.

For a history of why I need this, I route mail for a domain (virus/spam scanning) who run Exchange, so once Mailscanner does its job, it sends to their Exchange SMTP server. Their Exchange limits to 10Mb and then drops the connection.

My end keeps retrying to send every 15mins forever, so their bandwidth costs skyrocket.

I looked at blocking this at the MTA level (sendmail), but then feared that the sending smtp server would keep trying every 15mins and send our bandwidth costs through the roof. So I instead decided to let the MTA accept the message and pass it to MailScanner, which was then set to the 10Mb limit, and would also bounce the message back to the sender with the reason why (configured in MailScanner).

But instead, I'm seeing the same occurance with any emails above 10mb trying to be sent from my SMTP server to the Exchange SMTP server.

If MailScanner could say "any message totalling 10Mb is rejected" then I think this would solve the problem. Either that or find a way to tell MailScanner/sendmail to stop trying to send a message if it fails x number of times?

Any help or advice is much appreciated.

Thankyou.

Michael.


       
---------------------------------
How would you spend $50,000 to create a more sustainable environment in Australia?  Go to Yahoo!7 Answers and share your idea.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20070608/39557caf/attachment.html


More information about the MailScanner mailing list