How do I view and change the postfix default message size limit?

A quick look at the postfix configuration showed the message size limit was the default so I needed to increase it. This post looks at how to see what the current email message size limit is with Postfix and how to change it.

The configuration option is “message_size_limit” and by default is set to 10240000 bytes which is roughly 10MB. You can see what setting your postfix install is currently using by issuing the following command:

 [root@customer ~]# 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:

[root@customer ~]# 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.

[root@customer ~]# message_size_limit = 20480000

In the above example I’ve changed it to ~20MB.

Then reload postfix like so:

[root@customer ~]# service postfix reload

You can query postconf again if you want to check all is as expected.