Technology Errors

Postfix Error: cannot update mailbox /var/mail/user for user user. error writing message: File too large

Earlier while troubleshooting an error with PHP’s mail function I noticed an error in the maillog on a CentOS server. I know I have run into this error before and previously I fixed the issue by setting a larger size limit on the Postfix mailboxes. Below is information about the Postfix error in the maillog explaining mail cannot be delivered to a specific user because the mailbox has reached the maximum size allowed as configured in the Postfix main.cf file.

Technology Errors

Cannot Update Mailbox /var/mail/root For User Root. Error Writing Message: File Too Large

Earlier today while looking into an issue on a CentOS Linux server I noticed an error message in the maillog file. The mail server running on this Linux server is Postfix and it appeared to have been complaining of the size of root’s mailbox located at /var/mail/root. When I first started investigating I figured I was going to see root’s mailbox at a size of 1GB or 2GB but I was surprised when looking into the issue that root’s mailbox was only about 48MB in size so at first I thought there might be another problem. After some digging around in /etc/postfix I figured out that Postfix limits the size of local mailboxes to 51200000 bytes or 48.8MB. Below is information on how I discovered the issue as well as how to modify the size that Postfix limits local mailboxes to.