1

Topic: [FAQ] How to change mail attachment size

This tutorial is used to explain how to change mail attachment size in iRedMail. If they don't work for you, please post a new topic in iRedMail General Technical Support forum.
=====================

To change mail attachment size, we have to change 3 settings.

Change mail size in postfix

Postfix is MTA, so we have to change its setting to make it transfer large mail.

If you want to make it allow to transfer mail which size is less than 100Mb, just change 'message_size_limit' setting:

# ---- Run below command in terminal ----
# postconf -e message_size_limit='104857600'

# ---- Restart postfix to make it work ----
# /etc/init.d/postfix restart

Note:

  • 104857600 is equal to 100MB x 1024 KB x 1024 Bit.

  • Normally, mail will be encoded before transferred, so the actual mail size will be larger than 100MB, you can simplily increase to 110Mb or 120Mb to make it work as expected.

=============
If you use mail clients such as Outlook, thunderbird to fetch/send mails, it's enough to sent large attachments in mail.
If your users will use webmail as mail client, you have to change two more settings:

Change PHP setting to allow to upload large attachment

You should change 'memory_limit', 'upload_max_filesize' and 'post_max_size' in /etc/php.ini (RHEL/CentOS) or /etc/php5/apache2/php.ini (Debian/Ubuntu).

memory_limit = 200M;
upload_max_filesize = 100M;
post_max_size = 100M;
Change Roundcube webmail to allow to upload large attachment

Change same settings in .htaccess which under roundcube root directory, it's /var/www/roundcube/ (RHEL/CentOS)  or /usr/share/apache2/roundcube/ (Debian/Ubuntu) by default.

php_value    upload_max_filesize    100M
php_value    post_max_size    100M
Restart apache web server
# ---- For RHEL/CentOS users ----
# /etc/init.d/httpd restart

# ---- For Debian/Ubuntu users ----
# /etc/init.d/apache2 restart

----

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