Suddenly the Spam being sent via IMAP AUTHRELAY (600000+ mail’s in queue), i can’t able to delete from GUI, its stroked and very struggle to do it.
Then i have tried via shell its very useful and perfect, i have write this article to help anyone to struggle this issues, if you get the solution from this article please share your commands to improve our article.
By default the exim mail queue is located at /var/spool/exim/input directory.
To view list of the messages in the exim mail queue
exim -bp
Output:
[email protected] [~]# exim -bp 12h 8.9K 1Vaq4U-0007Ul-3q <> *** frozen *** [email protected] 11h 9.6K 1Vaqfz-0001XG-O9 <> *** frozen *** [email protected] [email protected] [~]#
To view a count of the messages in the queue
[email protected] [~]# exim -bpc 2 [email protected] [~]#
To remove the particular message from the exim mail queue
exim -Mrm {message-id}
Output: The below command is delete the particular message using message id like below “1Vaq4U-0007Ul-3q”
[email protected] [~]# exim -Mrm 1Vaq4U-0007Ul-3q Message 1Vaq4U-0007Ul-3q has been removed [email protected] [~]#
To remove the particular user message from the exim mail queue, the below command is delete magesh user mail queue’s from exim.
# exiqgrep -ir [email protected] | xargs exim -Mrm # exiqgrep -ir [email protected] | xargs exim -Mrm
To remove all the message from the exim mail queue
[email protected] [~]# exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash Message 1Vaqfz-0001XG-O9 has been removed [email protected] [~]#
To view summary of messages in the queue (count, volume, oldest, newest, domain, and totals)
[email protected] [~]# exim -bp | exiqsumm Count Volume Oldest Newest Domain ----- ------ ------ ------ ------ --------------------------------------------------------------- 0 0 0m 0000d TOTAL [email protected] [~]#
To show what Exim is doing right now
[email protected] [~]# exiwhat 28409 daemon: -q1h, listening for SMTP on port 25 (IPv4) port 587 (IPv4) and for SMTPS on port 465 (IPv4)