Home / Server side scripting / Linux / Remove Frozen Mails Exim

Remove Frozen Mails Exim

What are frozen emails in Exim?

The mails sent to invalid mail accounts are referred as Frozen mails. When a mail can’t be delivered for an account, the mail will be added in the queue and exim will again try to send the mail a couple of times depending on the settings saved in RETRY CONFIGURATION in exim conf file.

If the mail cannot be delivered after eight days (timeout_frozen_after) the mail will be marked as frozen.

To check the frozen mails in the mail queue, you can use the following command :

# exim -bp | grep frozen | wc -l

The below command can be used to remove all the frozen mails from the mail queue :

# exim -bp | grep frozen | awk '{print $3}' |xargs exim -Mrm

You can use the following command to check if there are any frozen mails still remaining in the queue :

# exim -bpc

You will get a shorter number as all the frozen mails are already removed by the second command.

We can also use the ‘exiqgrep’ command shown below to remove all the frozen messages :

# exiqgrep -z -i | xargs exim -Mrm

🙂 🙂

Jishnu KS
Latest posts by Jishnu KS (see all)

Leave a Reply

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

Social Media Auto Publish Powered By : XYZScripts.com