[SOLVED] Maximum message size
Hey folks,
I'm having a problem with the Maximum message size not being honored.
Current settings in the Admin -> Global Settings -> MTA:
Maximum message size (kb):* 10240
Maximum size of an uploaded file(kb):* 10240
If I use Imap/Thunderbird to upload a file that is: 8,987 KB I get a message:
"The size of the message you are trying to send exceeds the global size limit (10485760 bytes) of the server. The message was not sent, try to reduce the message size and try again."
If I use the web client, I get the error:
Could not send message: mail.SEND_FAILURE
msg - SMTP server reported: null
code - mail.SEND_FAILURE
method - ZmCsfeCommand.prototype.invoke
detail - soap:Sender
data - [object Object]
Anything over roughly 6MB fails to upload.
Any ideas on whats going on?
Thanks,
-Ken
MIME inflation may explain this. . .
You may not be dealing with a bug at all, Ken. Remember that when a binary attachment is sent by email it is first encoded into ASCII using either MIME or UUENCODE. Either results in fairly substantial inflation in message size, as explained in this article.
Let's look at your specific example. You have a file that you tell us is 8,987 KB. Multiply that by 1,024 bytes per KB and you have 9,202,688 bytes. Now give that a 30% encoding overhead (the article I referenced says 30-40%) and you're up to 11,963,494 bytes. Sticking with kilobytes, though, since that's how the Zimbra system takes its settings, 8,987 kb times 30% inflation would be 11,683 KB, again over your stated limits.
Let's do a real-world test. I have a message in my inbox that is reported by Zimbra as 10,544 KB. It's got only two lines of text, and a PDF attachment. When I save that attachment to my desktop and check its size with Windows, the resultant file is only 7.47 MB (7,835,426 bytes).
Bottom line--file size and message size should not be confused. If you really want to limit your users to 10MB attachments, you probably need to limit the message size to more like 13 or 14 MB to allow that file size to come through. This is not a bug, it's how encoding of binary attachments works.
Hope this helps,
Dan