My mail queue has grown to over 70000 emails. Is there any way I can do a filtered delete to get rid of outgoing emails from the MAILER-DAEMON@ without losing any potentially valuable emails?
feedback
|
migrated from stackoverflow.com Sep 7 '09 at 20:05
This question came from our site for professional and enthusiast programmers.
|
you didn't mention which email server you use, assuming you use postfix mailq >q.txt grep MAILER-DAEMON q.txt | sed 's/ .*//' | sed 's/^/postsuper -h /' > md.sh sh md.sh if you want you can put everthing into one line, but if you have a lot of mails in your queue, this will take some time and putting the list into a file first saves you running the command again if something goes wrong. with postsuper -h you will put the mails into a hold queue so you will not loose them either, you can delete the mails later. | |||
|
feedback
|