Change mail attachment size

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

Change message size limit in postfix

Postfix is MTA, so we have to change its setting to transfer mail with large attachment.

To allow mail with 100Mb attachment, please change 'message_size_limit' setting like below:

# postconf -e message_size_limit='104857600'

Restart postfix to make it work:

# /etc/init.d/postfix restart

NOTES:

If you use mail clients such as Outlook, thunderbird to send mails, it's now ok to sent large attachment with above setting.

Change upload file size in webmail

If you have webmail, 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 PHP config file /etc/php.ini

memory_limit = 200M;
upload_max_filesize = 100M;
post_max_size = 100M;

Change Roundcube webmail settings to allow large attachment

Change same settings in file .htaccess under roundcube root directory:

php_value    memory_limit   200M
php_value    upload_max_filesize    100M
php_value    post_max_size  100M

Restart Apache or Nginx web server to make it work.


If you found something wrong in this document, please do contact us to fix it.


©© Creative Commons