How to delete locked mails from mail queue (Exim)

Ya its something different from normal deletion of mails from exim mail queue. Here I’m explaining how to remove locked emails from queue. I got an error like this “Message 1AdTsr-0089tc-F6 is locked” This happens because the mail id ’1PN63s-0005r4-Oh’ is being processed by an exim process. As such it is required to first kill the corresponding exim process and then removing the mail from mail queue.

So first kill that process corresponding with the Message ID them remove the mail from exim mail queue.
Commands

[[email protected]]# ps aux|grep ‘message ID’
[[email protected]]# kill -9 ‘pid’
[[email protected]]# exim -Mrm ‘message ID’

In this case message ID is 1AdTsr-0089tc-F6 So commands comes like’
[[email protected]]# ps aux|grep 1AdTsr-0089tc-F6
[[email protected]]# kill -9 ‘pid’
[[email protected]]# exim -Mrm 1AdTsr-0089tc-F6

Alternate method

Stop the exim service and remove all locked mails from queue.
[[email protected]]# /etc/rc.d/init.d/exim stop
Delete the message in your Mail Queue
[[email protected]]# /etc/rc.d/init.d/exim start

Thats it… 🙂

Arunlal Ashok

Linux Server Administrator. I'm dealing with Linux servers since 2012. I started this blog to share and discuss my ideas with the world. Check My Profile!! in uPwork (oDesk) and let me know if you need any assistance. Thanks!!

You may also like...

1 Response

  1. January 25, 2014

    […] Links: Check spamming – Exim. Remove all frozen emails from mail queue. Delete locked mails from mail queue. Exim Log line flags. Exim log file paths in WHM/cPanel & […]

Leave a Reply

Your email address will not be published. Required fields are marked *