1

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
/etc/postfix/main.cf
# 21MB
message_size_limit = 22020096

/etc/php5/apache/php.ini
post_max_size = 21M;
upload_max_filesize = 20M;
max_file_uploads = 20

/usr/share/apache2/roundcube/.htaccess
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[127.0.0.1], sasl_method=LOGIN, sasl_username=tonyd@mydomain.net
--

#my_desktop> telnet 216.19.2.13 25
Trying 216.19.2.13...
Connected to 216.19.2.13.
Escape character is '^]'.
220 mail3.commspeed.net ESMTP
ehlo my.host
250-mail3.commspeed.net
250-PIPELINING
250-SIZE 22020096
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.

Post's attachments

Selection_001.png
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.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

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"?

3

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

4

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.