To change mail attachment size, we have to change 3 settings.
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:
104857600
is 100 (MB) x 1024 (KB) x 1024 (Bit).If you use mail clients such as Outlook, thunderbird to send mails, it's now ok to sent large attachment with above setting.
If you have Roundcube webmail, please change two more settings:
You should change memory_limit
, upload_max_filesize
and post_max_size
in
PHP config file /etc/php.ini
/etc/php.ini
/etc/php5/apache2/php.ini
/usr/local/etc/php.ini
for Apache, or
/etc/php5/fpm/php.ini
for Nginx./etc/php-5.4.ini
. If you're running different PHP release,
the version number 5.4
will be different.memory_limit = 200M;
upload_max_filesize = 100M;
post_max_size = 100M;
Change same settings in file .htaccess
under roundcube root directory:
/var/www/roundcubemail/.htaccess
/usr/share/apache2/roundcubemail/.htaccess
or
/opt/www/roundcubemail/.htaccess
./usr/local/www/roundcubemail/.htaccess
/var/www/roundcubemail/.htaccess
Note: this .htaccess
file may not exist on some Linux/BSD distributions,
if it doesn't exist, you can skip this step.
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.
Find setting client_max_body_size
in Nginx config file
/etc/nginx/nginx.conf
, change it to a proper value to match your need.
``` http { ... client_max_body_size 100m; ... }
Document published under a CC BY-ND 3.0 license. If you found something wrong, please do contact us to fix it.