iredmail increase mail attachment size
Default mail attachment size in iredmail is 10 MB. To increase mail attachment size, login to server as user root, run following commands
1 2 3 |
postconf -e message_size_limit=104857600 postconf -e mailbox_size_limit=104857600 systemctl restart postfix |
Here 104857600 is 100 MB in bytes (100 * 1024 * 1024). Change this as required. Sending very large file using mail attachment is not recommended, it is better use file sharing services like Google Drive, Dropbox, Microsoft OneDrive or another file hosting service for sharing large files.
Now edit php.ini file
1 |
vi /etc/php/7.2/fpm/php.ini |
Change value for 3 of the following settings. It can be anything above 100 MB or whatever attachment size you want to use.
1 2 3 |
memory_limit = 256M; upload_max_filesize = 100M; post_max_size = 120M; |
Restart php-fpm
1 |
systemctl restart php7.2-fpm |
Edit roundcube configuration file
1 |
vi /opt/www/roundcubemail/config/config.inc.php |
Set value for
1 |
$config['max_message_size'] = '100M'; |
Edit Nginx config file
1 |
vi /etc/nginx/conf-available/client_max_body_size.conf |
Set value for
1 |
client_max_body_size 100m; |
restart nginx
1 |
systemctl restart nginx |