The default maximum attachment size limit on a new Postfix installation is 10 MB (10240000 bytes). That’s probably a bit too small for most modern use cases.
/etc/postfix/main.cf
controls the default size limit. On a new installation or default installation, you might not see the configuration variable which is message_size_limit
. To see the setting even if it’s not in the configuration file, use postconf
with -p
:
postconf -p | grep message_size_limit message_size_limit = 10240000
To change it to 30 MB, use these commands:
sudo postconf -e 'message_size_limit = 30720000' sudo postfix reload
You could even go higer. As of around ~2021 Google had a 25 MB limit, and Office 365 had a configurable 1 to 150 MB limit.
Use postconf
again to see if the changes worked:
postconf | grep message_size_limit message_size_limit = 30720000
Making the change via Webmin
Follow the screenshot below to change the message_size_limit
via Webmin.
The menu is: Webmin => Servers => Postfix Mail Server => General Resource Control
References
- https://archive.virtualmin.com/node/9406
- https://support.google.com/mail/answer/6584#zippy=%2Cattachment-size-limit
- https://www.microsoft.com/en-us/microsoft-365/blog/2015/04/15/office-365-now-supports-larger-email-messages-up-to-150-mb/