How to delete user’s mail from exim mail queue

It happens often when skillful hackers try to send tons of mails from a cPanel hosting account cPanel hosting account. Attack works until server prohibits sending mails from that account after a few thousand mail. At that point Exim queue starts to grow bigger and bigger, but what can we do with this frozen Spam mails?First we need to stop sender script but this worth some new blog post. If we can’t find the script just suspend the account from cPanel WHM. After we can use this command:

exim -bp | grep user | cut -b11-26 | xargs exim -Mrm

It works this way: list exim queue content what we can filter by user name or address. Cut message id and forward it to exim for delete. Working sample:

exim -bp | grep "<tarhelypark@" | cut -b11-26 | xargs exim -Mrm

Useful exim reference: Exim Cheatsheet

Kövess minket!