Linux > cPanel

How to delete locked mails from mail queue (Exim)?

(1/1)

joseletk:
It's something different from normal deletion of mails from exim mail queue. Here I’m explaining how to remove locked emails from queue.

While clearing the mail queue for a reason, 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.

Please do follow the commands pasted below:

Commands


--- Code: ---[root@hostname]# ps aux|grep 'message ID'

[root@hostname]# kill -9 'pid'

[root@hostname]# exim -Mrm 'message ID'


--- End code ---

In this case message ID is 1AdTsr-0089tc-F6 So commands comes like:


--- Code: ---[root@hostname]# ps aux|grep 1AdTsr-0089tc-F6

[root@hostname]# kill -9 'pid'

[root@hostname]# exim -Mrm 1AdTsr-0089tc-F6


--- End code ---

Alternate method

Stop the exim service and remove all locked mails from queue.


--- Code: ---[root@hostname]# /etc/rc.d/init.d/exim stop
--- End code ---

Delete the message in your Mail Queue

[root@hostname]# /etc/rc.d/init.d/exim start
===========================================================================

Navigation

[0] Message Index

Go to full version