One of my users was compromised and sent a lot of spam. Some of it is still stuck in the outgoing Exim mail queue. How do I delete them without losing legitimate mail?
To remove messages from a specific email account in the mail queue, use the following command:
exiqgrep -f firstname.lastname@example.org -i | xargs exim -Mrm
To learn more about...
- exiqgrep, see the Exim utilities documentation.
- exim -Mrm, see the Exim command line documentation (hint, use search on page in your browser for "Mrm" to find it).
- xargs, see the manual page.