Monday, June 17, 2013

How to Fix Postfix File too large error

Today, I was getting an error from my Postfix mail server, when trying to send mysqldump file which is about 8 MB attachment. I checked the /var/log/maillog and found this:
sudo tail -f  /var/log/maillog

1

To view the default settings for all the parameters of Postfix:
postconf -d | grep size

2

 

These size values surprised me because I didn’t include any limits on email sizes in /etc/postfix/main.cf file but the Google search revealed me that according to Postfix the default value for a mailbox size is 51200000 bytes and max message size is 10240000 bytes.

Note: MIME encoding adds a 33.33% overhead to an attachment (3 bytes turn into 4 bytes). With a message size limit of 10 MB, the max attachment size is around 7 MB.

To resolve this issue, the maximum outgoing message size needs to be increased as well as the mailbox size. Enter the following commands(0 mean unlimited, adjust it according to your need):
sudo postconf -e mailbox_size_limit=0
sudo postconf -e message_size_limit=0

3

After that, restart the Postfix service:
sudo /etc/init.d/postfix restart

4

Hope this will help you!

No comments:

Post a Comment