Postfix: cannot update mailbox /var/mail for user, File too large

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, March 27, 2016

Follow me on Twitter as @mattiasgeniar

I ran into a problem while maintaining MARC, the open source mailing list archive with some very large user groups. Especially the linux-kernel archive, with almost 10.000 messages per month.

Some of those messages stopped getting parsed, with these errors in the logs.

Mar 23 21:51:42 ma postfix/local[14420]: 3874942816: to=<linux-kernel@xxx>,
  relay=local, delay=0.42, delays=0.41/0/0/0.01, dsn=5.2.2,
  status=bounced (cannot update mailbox /var/mail/linux-kernel for
  user linux-kernel. error writing message: File too large)

Mar 23 21:51:59 ma postfix/local[14420]: 6288D42816: to=<linux-kernel@xxx>,
  relay=local, delay=0.33, delays=0.32/0/0/0.01, dsn=5.2.2,
  status=bounced (cannot update mailbox /var/mail/linux-kernel for 
  user linux-kernel. error writing message: File too large)

This message got triggered when the mailbox reached 50MB in size. This is, in fact, a default limit in Postfix called mailbox_size_limit. Here’s the default:

$ postconf -d | grep mailbox_size_limit
mailbox_size_limit = 51200000

In order to increase the limit, edit /etc/postfix/main.cf and increase the size.

$ vim /etc/postfix/main.cf
...
mailbox_size_limit = 5120000000

This changes the limit from 50MB to 5.000MB. Now reload Postfix and your new mailbox limit is in effect.

$ service postfix reload

Done.



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.