Hi, I would like your input and advice on dealing with some email issues. We have some 40,000 emails in one of our mailboxes ([email protected]) with a single subject ("Mail delivery failed: returning message to sender") I would like to delete all of these messages with this subject. I am not able to do this using regular email clients such as outlook or thunderbird (extremely time consuming.) Is there a way I could do this via command line or a script? I would appreciate any input and help in this regard. Thanks, Fuji
each message has a individual file, and you can grep for the subject line, cut the first field delimited by a colon and then delete that list of files.
Thanks id10t - I had to use xargs since the list of files were too large for grep to handle - but overall the approach seems to work - will test it out a couple of times and then use it on the production machine
I may not totally understand but I know I have a problem that is like yours although not 40,000 of them but a lot over 1,000 I create a rule in Outlook and also mark it as read and send it to the trash. I would like to see your script if and when you get this done and tested. I would like to see if it can help in our situation. Thanks for the post / question.
If you have access to mail server, you can grep/find through mailbox for your text and delete matched files. This approach will work only if your mail server store each message in individual file.