How to Manage Exim Mail Queue?

Exim is the mail software that manages all the email delivery on your server. This software is used by the user having root administration or those who are using VPS or Dedicated server. WHM is the control panel used by root users to manage multiple task related to accounts.

Today, in this tutorial we will discuss about the procedure to manage exim mail queue in the server.

Manage Exim Mail Queue in Server
Manage Exim Mail Queue in Server

This can be done in any of the two ways, i.e,

  1. From WHM
  2. With SSH commands

#1. From WHM

You can manage the exim mail queue from WHM of root user. Let us see the procedure in detail.

Email Feature in WHM
Email Feature in WHM
Mail Queue Manager
Mail Queue Manager
  • You will be directed to next page where list of all queued mails will appear. You can filter or search for any email if required.
Manage Queued Mails in WHM
Manage Queued Mails in WHM
  • From here, you can select any or all the queued mails and then perform an action as Deliver Selected or Delete Selected as required. Refer to the given image.

Now, the queued mails can be managed via SSH commands as well. Let us see the procedure in detail.

#2. With SSH Commands

  • Login to SSH with root credentials.
  • You can use exim command with argument to get the information related to queued emails.
  1. To know the total number of queued emails, execute exim -bpc command.

    Manage Queued Emails via SSH
    Manage Queued Emails via SSH
  2. To know the detailed information about queued emails use exim -bp command.

    Get Detailed Information about Queued Emails
    Get Detailed Information about Queued Emails
  3. To diaplay the summary of mails in the queue, you can use the following command.

exim -bp | exiqsumm 

Display Summary of Queued Mails
Display Summary of Queued Mails
  • To check the reason of emails which are not being delivered, execute the following command with the Exim Message ID.
exigrep -I -l message_ID /var/log/exim_mainlog
  • You can resend any queued mail forcefully by using the below given command with message id.
exim -M message_ID
  • To check the Exim’s current activity, you can execute the following command.
exiwhat
  • You can clear one or all queued emails by using any of the below given commands.
  1. To clear selected emails from the queue, run the following command.
    exim -Mrm message_ID
  2. To clear all the queued emails, run the following command.
    find /var/spool/exim/input/ -type f -exec rm -vf {} \;

With the above given procedures and commands, you can easily manage exim mail queue from WHM and SSH. Do share it with your colleagues if you find it working. Also share your suggestions and drop your queries to start the discussion on the related topic. Lets connect on social media with the below links.

Facebook Page: https://facebook.com/redserverhost                                                                                       Twitter Page: https://twitter.com/redserverhost.com

Scroll to Top