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

last: btmp: File too large, Read Large btmp Files

Earlier today while investigating the logs on a CentOS Linux server I noticed the btmp file had grown to over 5GB. I was curious to look into the log and when attempting to read the 5GB file using last I received an error since last will only handle files that are 2GB in size or less. So what needs to happen is to split the file into multiple pieces so they can be read via the last command. Below I describe the error in detail, how to resolve it by splitting the btmp file into multiple files, and then how to join them together if you need to read logs older than the last split file.