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

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

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.

memory_limit = 256M;
upload_max_filesize = 100M;
post_max_size = 120M;

Restart php-fpm

systemctl restart php7.2-fpm

Edit roundcube configuration file

vi /opt/www/roundcubemail/config/config.inc.php

Set value for

$config['max_message_size'] = '100M';

Edit Nginx config file

vi /etc/nginx/conf-available/client_max_body_size.conf

Set value for

client_max_body_size 100m;

restart nginx

systemctl restart nginx
Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *