Logrotate /var/spool/mail

Latest response

Is anyone utilizing logrotate to maintain the /var/spool/mail directory?  Are these files able to be managed by logrotate without causing issues?  The current size of the files are not extremely large, a few MB in size.  However if nothing is maintaining them, they could grow larger over time.

 

Thanks

Responses

Not sure I'd use logrotate to force the size-capping of a user's default inbox files (if it's a concern, you can either use quotas or configure your MTA to enforce a mailbox size limit). Users can get pretty cranky when you screw with what shows up in their MUA. You'd also have to be very careful that whatever you're method your using doesn't end up corrupting the user's mailbox. You'll want to avoid truncate methods and, instead, go to straight rotation from /var/spool/mail/<USERID> to /home/<USERID>/mail. Your users will probably end up rather irate that after the rotation, their MUA's Inbox will show up empty, but it's better than corrupting their mailbox.