Discussion Locked

clearing old mail in sendmail

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have many school districts that use us for their email. Unfortunatly when they go away for summer our sendmail server's harddrive fills with mail that wont be checked for 3 months.

Is there something I can run, command line or through webmin that will automagically clean out messages older than a certain date? Such as delete messages older than 30 days.

5 replies

by j.lupo

I believe you can just setup a server side rule. I know my office does that and you get put in 'e-mail jail' if your box gets too large and no other mail can go in or out. Also, they clean the box of messages older than 30 days so you have to make sure you clean and archive your mail if you don't want to lose it.

by notatntt

Poster rated this answer.
this states he thinks it can be done but gives no details on how to do it.

by davidatarinc

If you have the root password, you can do something like the following:

find /var/spool/mail -mtime +30 | xargs rm

Naturally, check first to be sure that's where your sendmail is storing the files (they've got names starting with qf and df, usually).

by ukszarnan

One sure way is to let your contacts know that you'll be away for 3 months. They won't be sending you mails during that period.

One suggestion is to use Outlook Express together with "MAIL WASHER" program. You can see your mails in your mailbox before downloading. You can choose mails you wish to download or delete the ones that you don't wish to.

This discussion is closed to new replies.