49MB mailbox size limit (Postfix & procmail)

Here for future reference more than anything else, and to help anyone who’s Googling for this.

I have my email delivered to a box at home running Postfix, and stored by procmail into mbox mailboxes.

I was finding that, whenever a mailbox file reached about 49MB, procmail would no longer deliver mail into that mailbox, instead dumping it into my main system mailbox.

A look at procmail’s logs would reveal:


procmail: Error while writing to "lists/cpan-testers"
procmail: Truncated file to former size

And sure enough, the file was 49MB:


[davidp@supernova:~/INBOX/lists]$ ls -lh cpan-testers
-rw——- 1 davidp users 49M 2007-07-06 16:42 cpan-testers
[davidp@supernova:~/INBOX/lists]$ ls -l cpan-testers
-rw——- 1 davidp users 51198081 2007-07-06 16:42 cpan-testers

After a bit of Googling, I found that this isn’t due to procmail but due to Postfix’s mailbox_size_limit setting. This limit is enforced via UNIX process limits, hence will apply to procmail or whatever the local delivery agent is.

Checking the default value shows:


[root@supernova:]# postconf -d mailbox_size_limit
mailbox_size_limit = 51200000

Okay… there’s the problem.

Changing it to a stupidly high value:


[root@supernova:]# postconf -ev mailbox_size_limit=99999999999999

Problem solved :)

I found the details I needed at: http://www.security-express.com/archives/postfix/2003-02/2131.html

Hope this helps somebody.

10 Responses to “49MB mailbox size limit (Postfix & procmail)”


  1. Gravatar Icon 1 TheCase

    Wow - I’ve been looking to fix this problem (and find the source) forever… thanks for the solution.

    Hardest part was finding something in some logs somewhere so I could perform a helpful Google search. Finally stumbled on the procmail logs…

  2. Gravatar Icon 2 bigpresh

    @TheCase:

    Glad it was of use to you, and thanks for taking the time to leave a comment :)

  3. Gravatar Icon 3 Azlinon

    Made my day as well. Thank you for posting this!

  4. Gravatar Icon 4 JDW

    I, too, have been trying to figure this out for ages. Thanks!

  5. Gravatar Icon 5 MailHater

    It might be worth noting that the -d flag for postconf displays the *default* value always. After changing the setting, if you want to see the currently used setting, you need to using the -n flag instead:

    postconf -n mailbox_size_limit

  6. Gravatar Icon 6 Thomas Thurman

    Thank you so much!

  7. Gravatar Icon 7 Jason

    Thanks for the page — finding it saved me considerable troubleshooting time on my similar mail setup.

    BTW, you can also set mailbox_size_limit to 0, meaning no limit.

    Jason.

  8. Gravatar Icon 8 bigpresh

    @Jason:

    Glad it was useful to you! Thanks for the comment, and for the hint on setting mailbox_size_limit to zero too!

  9. Gravatar Icon 9 John

    Many thanks for your help - saved me ages with this tip!
    Cheers,
    John

  10. Gravatar Icon 10 uli

    good job.

    really helped me out.

    thanks
    uli

Leave a Reply

In the CAPTCHA box above, you must type both words you see. If they're too hard to read, click the "Get a new challenge" button (the top one of the three to the immediate right of the text entry box). Sorry for making you jump through hoops, but I've been suffering from way too much spam lately.

Subscribe without commenting





get some tasty email addresses here