1 (edited by alexfedo 2023-04-26 21:27:10)

Topic: Can't increase mail attachment size

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.2 PGSQL edition.
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Debian 11 bullseye
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hi, i want to change mail attachment size to 25MB (yes, as the gmail size). I followed docs.iredmail.org/change.mail.attachment.size.html

1. Change message size limit in postfix:

postconf | grep mailbox_size_limit
mailbox_size_limit = 26214400

postconf | grep message_size_limit
message_size_limit = 26214400

2. Excluded throttle from iRedAPD in /opt/iRedAPD-5.1/settings.py

plugins = ["reject_null_sender", "wblist_rdns", "reject_sender_login_mismatch", "greylisting", "amavisd_wblist", "sql_alias_access_policy", "sql_ml_access_policy"]

3. Change file size limits in SOGo:

WOMaxUploadSize = 25600;
SOGoMaximumMessageSizeLimit = 25600;

4. PHP and Nginx settings are changed too.

But when I attached file 19.9MB file in Outlook I got:

      'xxx@gmail.com' 26.04.2023 15:08
            552 5.3.4 Error: message file too big

Or via SOGo interface:

5.3.4 Error: message file too big

And there was in /var/log/mail.log:

Apr 26 15:43:18 mail postfix/submission/smtpd[482281]: warning: 4Q5z773GtxzDvFS: queue file size limit exceeded

----

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

2 (edited by Cthulhu 2023-04-27 07:58:35)

Re: Can't increase mail attachment size

Files get encoded as base64, which has at least 33% more bytes than the original file.

So, 19.9 * 4 / 3 = 26.53 which exceeds the message_size_limit (26214400):

26.53 * 1024 * 1024 = 27822216

So actually the limit is working, but you did not count in the base64 encoding


For nginx, the settings are okay, but message_size_limit will NEVER fit the actual desired file size due to encoding

3

Re: Can't increase mail attachment size

Thats right! Thank you Cthulhu!