How to delete frozen mails from Exim mail queue

Sometimes there can be so many frozen mails in the  Exim mail queue.

To know the number of frozen mails in the mail queue, you can use the following command

exim -bpr | grep frozen | wc -l 

In order to remove all frozen mails from the Exim mail  queue, use the following command

exim -bpr | grep frozen | awk {‘print $3’} | xargs exim -Mrm 

You can also use the command given below to delete all frozen mails

exiqgrep -z -i | xargs exim -Mrm

If you want to only delete frozen messages older than a day, you can try the following

exiqgrep -zi -o 86400

where you can change the value 86400 depending on the time frame you want to keep (1 day = 86400 seconds).

 

Both comments and pings are currently closed.

Comments are closed.