Manage the Exim mail queue via SSH Updated on August 16, 2021 by InMotion Hosting Contributor 2 Minutes, 18 Seconds to Read In this article I’ll review how to manage your Exim mail queue on your VPS (Virtual Private Server) or dedicated server via SSH. This will allow you to find out why sent messages haven’t possibly been successfully delivered yet. The MTA (Mail Transfer Agent) that runs on your server is called Exim and it controls your email deliveries. There are certain commands your can run over SSH that will allow you to manage the Exim mail queue and we’ll be reviewing those below. To follow this guide you’ll have to have root access to either your VPS or dedicated server so you can access the Exim commands. Viewing messages in the Exim mail queue Using the steps below, I’ll show you how to locate a message that we’ve attempted to send to [email protected], but it hasn’t arrived yet in that user’s Inbox so we’d like to investigate why. Login to your server via SSH as the root user. Run the following command to view the current Exim mail queue:exim -bp You should get back something that looks like:8m 13K 1TwJgO-0001q8-E5 <[email protected]> *** frozen *** [email protected] 7m 7.5K 1TwJhK-00037o-U8 <[email protected]> *** frozen *** [email protected] 5m 8.0K 1TwJic-00047T-70 <[email protected]> *** frozen *** [email protected] 3m 7.6K 1TwJlQ-0006MV-84 <[email protected]> *** frozen *** [email protected] In this case we can see that there are 4 messages waiting to try to deliver to [email protected], but they are all frozen. This means Exim has encountered an error while trying to deliver the message, and it has frozen it, until the next delivery retry time. Now you can take one of the Exim message IDs from the queue and further investigate it in the Exim mail log as to why the message can’t deliver with this command: exigrep -I -l 1TwJlQ-0006MV-84 /var/log/exim_mainlog This will give you back the full transaction of that message ID exposing2013-01-18 16:46:16 1TwJlQ-0006MV-84 <= [email protected] H=localhost [127.0.0.1] T="Update on employee contacts" for [email protected] 2013-01-18 16:46:16 1TwJlQ-0006MV-84 ** [email protected] R=virtual_user_maildir_overquota:Mailbox quota exceeded 2013-01-18 16:46:16 1TwJlQ-0006MV-84 Completed Now in this case we can see that this message is failing because the [email protected] server is giving back an error of Mailbox quota exceeded. If you’d like to attempt to go ahead and forcefully try to re-send the message you can run this command on the message ID: exim -M 1TwJlQ-0006MV-84 If you wanted to remove the message from the mail queue. exim -Mrm 1TwJlQ-0006MV-84 You should now know how to investigate messages in your Exim mail queue using Exim commands over SSH. Share this Article InMotion Hosting Contributor Content Writer InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals! More Articles by InMotion Hosting Related Articles How to Fix the “550 No Such User Here” Email Error How to Setup an Email AutoResponder in cPanel Logging into Horde How to Change an Email Password in cPanel and Webmail How to Purchase InMotion Hosting Professional Email in AMP What is MailChannels and How it Benefits You Email Error – Mailbox Quota Exceeded How to Archive Email Using IMAP Upgrade to iOS6 causing IMAP issues How To Set Up Gmail for POP3 and SMTP
I recommend you check our email authentication guide , check the error log for it, and contact our live support for further assistance.
Hello Sameer, Thank you for your suggestions. We have been updating our article on Linux Commands, and we will look into adding these. If you have any further questions, feel free to post them below. Thank you, -John-Paul