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:
root@2daygeek [~]# exim -bp 12h 8.9K 1Vaq4U-0007Ul-3q <> *** frozen *** [email protected] 11h 9.6K 1Vaqfz-0001XG-O9 <> *** frozen *** [email protected] root@2daygeek [~]#
To view a count of the messages in the queue
root@2daygeek [~]# exim -bpc 2 root@2daygeek [~]#
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”
root@2daygeek [~]# exim -Mrm 1Vaq4U-0007Ul-3q Message 1Vaq4U-0007Ul-3q has been removed root@2daygeek [~]#
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
root@2daygeek [~]# exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash Message 1Vaqfz-0001XG-O9 has been removed root@2daygeek [~]#
To view summary of messages in the queue (count, volume, oldest, newest, domain, and totals)
root@2daygeek [~]# exim -bp | exiqsumm Count Volume Oldest Newest Domain ----- ------ ------ ------ ------ --------------------------------------------------------------- 0 0 0m 0000d TOTAL root@2daygeek [~]#
To show what Exim is doing right now
root@server [~]# exiwhat 28409 daemon: -q1h, listening for SMTP on port 25 (IPv4) port 587 (IPv4) and for SMTPS on port 465 (IPv4)