How to delete the exim mail queue from the command line

AHATEMA

Registered
Jan 5, 2007
4
0
151
Hello,

How can I delete the Exim MTA queue from the command line? :eek:

I have tried with the:

/usr/local/cpanel/whostmgr/bin/whostmgr2 killeximq

as advised in a post in this forum, but it simply returns:

HTTP/1.0 200 OK
Connection: close
Server: whostmgr/10.8.0
Content-type: text/html

and exits.

Brandon
 
Last edited:

jayh38

Well-Known Member
Mar 3, 2006
1,212
0
166
Use this
exim -bpru|awk {'print $3'}|xargs exim -Mrm

I would suggest deleting mails in the queue that are older than 5 mins perhaps.
At least give a change to deliver so you do not remove legit mails that might
arrive at that moment.


exiqgrep -o 300 -i | xargs exim -Mrm

This will remove mails older than 5 mins (300 seconds). adjust your time accordingly.