How to Delete/Remove Frozen Emails in the Exim Email Queue
How to Delete/Remove Frozen Emails in the Exim Email Queue
Exim is the mail transfer agent on cPanel Servers. Mails sent to invalid non existent email address will be added to exim mail queue. Exim will try to send the undelivered emails in the exim mail queue, the email status will be changed to frozen if the email is undelivered after many retries. Many frozen emails in the server will slow down the server and email delivery.
1. Log into linux server via SSH as root
2. Type ‘exim -bpc’ command to find the number of emails in the exim queue.
Example :
2545
3. Type the command “exim -bp | grep frozen | wc -l” to find the number of frozen emails in the exim mail queue
exim -bp | grep frozen | wc -l
Example :
224
There are 224 frozen emails on the above cPanel server.
You must have server root access to delete the frozen emails in the exim mail queue. Do the below steps to delete all the frozen emails in the exim mail queue.
1. Log into your Linux Server via SSH as root.
2. Run the command “exim -bp|grep frozen|awk ‘{print $3}’ |xargs exim -Mrm” to remove frozen emails
Command : exim -bp|grep frozen|awk ‘{print $3}’ |xargs exim -Mrm
Example :
Message 1cFBdJ-0006Im-HZ has been removed
Message 1cFBeH-0000Ru-86 has been removed
Message 1cFBfF-0000Zn-JV has been removed
Message 1cFBgD-0000iz-8I has been removed
Message 1cFBhB-0000of-UO has been removed
3 Run the command ‘exim -bp | grep frozen’ to make sure it is deleted
The below command will list the Message ID of the frozen emails in the exim mail queue. The third field is the message ID of the frozen emails.
4h 18K 1axjDe-003IxX-HV <> *** frozen ***
3h 2.4K 1axjUx-003JRe-IG <> *** frozen ***
3h 18K 1axjWB-003JTJ-TD <> *** frozen ***
3h 3.3K 1axjnW-003K49-NU <> *** frozen ***
3h 2.1K 1axk95-003Kd5-NU <> *** frozen ***
3h 2.7K 1axkFe-003Ku7-9C <> *** frozen ***
2h 2.3K 1axl8J-003MaO-At <> *** frozen ***
25m 9.8K 1axmFt-003OlR-GQ <> *** frozen ***
24m 9.9K 1axmFz-003Ooc-1p <> *** frozen ***
The below command will list only the message ID of emails in the queue.
awk ‘{print $3}’ = this is used to cut the third field.
1axjDe-003IxX-HV
1axjUx-003JRe-IG
1axjWB-003JTJ-TD
1axjnW-003K49-NU
1axk95-003Kd5-NU
1axkFe-003Ku7-9C
The below command will delete all the frozen emails in the exim email queue.
Message 1axmdz-003SHR-PN has been removed
Message 1axme0-003SHk-4T has been removed
Message 1axme0-003SI3-Ft has been removed
Message 1axme0-003SIM-Sz has been removed
The below command can also be used to delete the frozen emails in the exim email queue.
Command : exiqgrep -z -i | xargs exim -Mrm
Message 1axiOJ-0006mI-EH has been removed
Message 1axiPh-0006zd-9T has been removed
Message 1axiS4-0007JG-Hj has been removed
Message 1axiTS-0007UO-Nv has been removed
Message 1axiTf-0007Vv-Hx has been removed
Message 1axiWX-0007th-1D has been removed
How to Delete/Remove Frozen emails in the Exim mail queue through WHM
Steps to Remove all Frozen emails from WHM (Webhost Manager)
1. Login to WHM (WebHost Manager) using server root password
Type the below link in the web browser (mozilla firefox, internet explorer, chrome etc) and enter the root login details to access WHM.
Link to access WHM : http://yourServerHostname:2086
OR
http://yourserverIP:2086
‘yourServerHostname’ should be replaced with hostname of your server.
‘yourserverIP’ should be replaced with IP address of your server.
Enter username and password to access WHM.
username : root
Password : Enter root password of the server provided by your hosting provider.
2. Search for ‘Mail Queue Manager’ in the WHM search bar
4. Click on ‘Mail Queue Manager’ under ‘Email’.
WHM Home » Email » Mail Queue Manager
Here you can see all the Frozen and Queued emails in the Exim Email queue. Click on ‘status’ tab to sort all the ‘frozen’ and ‘Queued’ email in the exim email queue.
‘Mail Queue Manager’ might take long time to load if there are lot of emails in the exim mail queue.
5. Tick all frozen emails and click on ‘Delete all’ to delete all the frozen emails
How to delete a single frozen email from exim mail queue?
Tick the frozen email and click on ‘Deleted selected’
How to Unfreeze / force deliver an email in exim mail queue
1. Login to WHM
2. Click on “Mail Queue Manager” under “Email”
Home » Email » Mail Queue Manager
In the above image you can see 4 icons
3. First icon will show the message content, second icon will unfreeze the email, third one will show the history and the last icon is to force deliver the frozen email.
Comments
life insurance premium
Spot on with this write-up, I absolutely believe that this amazing site needs much more attention. I’ll probably be returning to read through more, thanks for the info!|