iRedMail. Changing the size of a mail attachment

For example, I’ll take the installed iRedMail-1.6.8 and change the maximum size of the mail attachment.

First let’s change the Postfix configuration:

nano /etc/postfix/main.cf
message_size_limit = 31457280
mailbox_size_limit = 31457280
/etc/init.d/postfix restart

Then in PHP-FPM:

nano /etc/php/8.1/fpm/php.ini
memory_limit = 256M;
upload_max_filesize = 30M;
post_max_size = 32M;
service php8.1-fpm restart

In Roundcube:

nano /opt/www/roundcubemail/config/config.inc.php
$config['max_message_size'] = '30M';

In the Nginx web server settings:

nano /etc/nginx/conf-enabled/client_max_body_size.conf
client_max_body_size 30m;
service nginx restart

Done, now you can send an email attachment up to the specified size via an email client or the roundcube web interface.

See also my other articles about iRedMail

Leave a comment

Leave a Reply