Our forums are currently in maintenance mode and the ability to post is disabled. We will be back up and running as soon as possible. Thanks for your patience!

General discussion


clearing old mail in sendmail

By notatntt ·
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.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by j.lupo In reply to clearing old mail in send ...

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.

Collapse -

by notatntt In reply to

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

Collapse -

by davidATarinc In reply to clearing old mail in send ...

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).

Collapse -

by ukszarnan In reply to clearing old mail in send ...

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.

Collapse -

by captainZ In reply to clearing old mail in send ...

Try expiremail by Marc Tremblay. It can be found at You can have it delete mail from any mailbox that is older than a specified nymber of days.

Related Discussions

Related Forums