Queue File Size Limit Exceeded: Postfix Bouncing Email Larger than 1MB

The Problem

By default, Postfix limits the size of an email to 1024KB (1MB) restricting the recipient from receiving any email and/or attachments greater than 1 megabyte. This is an issue that may go unnoticed due to fact that typically most of email sent is less than 1MB. The sender of the email will receive a bounced email with the following error:

Remote host said: 552 5.3.4 Error: message file too big

Upon checking the logs in Postfix, you will discover a warning such as this one:

warning: EE99A23FB7: queue file size limit exceeded

The Solution

This setting can be quickly modified by adding the following line to the bottom of: /etc/postfix/main.cf

message_size_limit = 0

Once you have added the above line and saved the file, you will then need to reload postfix.

$ sudo /etc/init.d/postfix reload

More Info

Basically by setting the message_size_limit to 0, we essentially configured Postfix to allow email of any size to be passed through message queue. Where this will immediately solve the problem with email being bounced, however you may simply want to increase the allowed size of the email. To do this we would simply have to change the value from 0 to your desired size. Keep in mind that the value of the configuration is in bytes. For example if you would like to increase the size to 20MB, your message_size_limit would be 20480000.

References

About the author

Will works as a technical lead for Kanopi Studios and provides Drupal support for a wide range of amazing projects. He current resides in South Carolina along with his wife, son and two dogs. When not working on tech projects, Will enjoys spending time with family and photographing the stars.