Topic: SMTP Error: Message size exceeds server limit (Roundcude & Other)

======== Required information ====
- iRedMail version: 1.60 Pro
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Ubuntu 12.04.2 LTS
- Related log if you're reporting an issue:

I'm trying to increase the max attachment size from 10MB to 20MB.  Not succeeding.  Problem is not isolated to Roundcube mail, getting same error with email client, Thunderbird in this case.  Could someone please tell me what I've missed?

Thank you very much!

Config Information
# 21MB
message_size_limit = 22020096

post_max_size = 21M;
upload_max_filesize = 20M;
max_file_uploads = 20

php_value    upload_max_filesize    20M
php_value    post_max_size        21M

Testing & Messages

Logs.... (Only log entry that isn't part of a successfull email send exchange
grep -nr "tonyd\@" /var/log/mail.log
/var/log/mail.log:2484336:Jul  9 12:20:00 mail3 postfix/smtpd[15469]: 630A1100816: client=localhost[], sasl_method=LOGIN, sasl_username=tonyd@mydomain.net

#my_desktop> telnet 25
Connected to
Escape character is '^]'.
220 mail3.commspeed.net ESMTP
ehlo my.host
250-SIZE 22020096
250 DSN
221 2.0.0 Bye
Connection closed by foreign host.

Post's attachments

Selection_001.png 18.65 kb, 1 downloads since 2013-07-09 

You don't have the permssions to download the attachments of this post.


Re: SMTP Error: Message size exceeds server limit (Roundcude & Other)

isn't it work as expected? It shows global size limit 22020096bytes, just the same as you set in Postfix.
What do you expect? What do you mean "Not succeeding"?


Re: SMTP Error: Message size exceeds server limit (Roundcude & Other)

Hi Zhang,

Well, as the attached image showed, the message is not getting sent with the error that the message has exceeded the global message size.  I get the same error in Roundcube.  Not sure how that can be... the test attachment is 20MB, and there's no way the email (excluding the attachment) is 1MB.  All it contains is the std header information, and an empty body.  So not sure why the MTA is rejecting the message due to size based on my config options.  Is there a formula to calculate the needed size based on attachment size + email header/body that I'm missing and therefore miss-calculating?  I would think that 21MB is sufficient.

Thank you smile


Re: SMTP Error: Message size exceeds server limit (Roundcude & Other)

1MB attachment plus empty mail body? It should be sent out if you have 20MB attachment size limit.
I changed files as you mentioned in first post, it works fine for me with Ubuntu 12.04, MySQL backend.

Usually, mail message will be encoded to base64 strings (except mail body contains just ASCII characters, no attachment, no unicode characters), and the actually file size in Postfix queue will be larger than mail header + mail body + attachment size. For example, an email with a 20MB attachment will be ABOUT 25MB (not a actual number) after encoded. So you can try to increase value of Postfix parameter "message_size_limit" and try again.