How to clean a flooded mailbox

Today I opened my university mailbox, after several months of not opening it. I found it is flooded with about 300 K messages from the cron daemon, notifying me of a certain unimportant warning in a certain cron job. I stopped that cron job immediately, but now I am stuck with a huge mailbox and cannot find the important messages (if any).

I would like to automatically delete all the messages sent by the cron daemon (but not the other messages). How can I do this?

If this helps: there is pine installed on that server, in addition to the standard Unix tools.

One way to do it would be to install mutt. With mutt you can delete messages matching various criteria, f.i. messages from the cron daemon. It might be a good idea to copy a representative sample of messages in some other folder and practice the operation there before running the cleanup against your inbox.

If you’re doing this over IMAP you might also send a note to your sysadmin that you’re going to delete 300k messages, otherwise he might be at your door with a baseball bat before the operation is finished. 🙂

Answered By: lcd047
Categories: Answers Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.