Changing the Postfix maximum email size
I’ve recently had a customer emailing large image screenshots and Postfix has been rejecting them. I looked at the configuration showed the message size limit was set to the default so I needed to make it bigger. The following is how I achieved this.
postconf | grep message_size_limit
Just doing “postconf” on its own will show all the options so using grep on “message_size_limit” filters the output to just the setting we want. For the default setting, you’ll see this:
message_size_limit = 10240000
To change the setting to some other value, open the “main.cf” file in your favourite text editor (it’s often at a location like /etc/postfix/main.cf) and either edit or add the following line, depending if it’s already in the file or not.
message_size_limit = 20480000
In the above example I’ve changed it to 20MB. (
Then reload postfix like so:
service postfix reload
Your new setting will work immediately. You can now accept larger emails.