Due to some bad cron jobs I now have ~1600 mail messages, most of them containing the same error log. I would like to quickly group them by subject and delete them, while limiting the chances of missing some important message.
I couldn't figure out a way to do anything using the mail
command other than deleting each message individually. I tried installing pine
, but it seems that even there I have to go over each message individually and hit the D key.
Surely there's a way to script this. Right?
I'm using ubuntu server 10.04.
Best Answer
Mutt is really good at this. You could tag-pattern (shift-T) on the common subject string, then tag-prefix (;) delete (d) the matching messages.
"Mutt Manual, Using Tags"