Question
How do I delete unwanted email without losing legitimate mail?
Answer
It is best to be as granular as possible when removing email. If you see most of the email in the queue is from an address and also to an address, then it is best to use both the -f for From and -r for Recipient options. If the From address was sender@wantstosend.com, and the Recipient is recipient@doesnotwant.com then the following would remove emails that match that criteria:
# exiqgrep -f sender@wantstosend.com -r recipient@doesnotwant.com -i | xargs exim -Mrm
If you're certain you want to remove all email from sender@wantstosend.com, then the command would be:
# exiqgrep -f sender@wantstosend.com -i | xargs exim -Mrm
If there are a number of bounce back emails that show the From address as <>, then the following can be used to remove those emails:
# exiqgrep -f "^<>$" -i | xargs exim -Mrm
One last option, if you're certain you want to remove all frozen emails, the following can be used:
# exiqgrep -z -i | xargs exim -Mrm
Comments
0 comments
Article is closed for comments.