How to Manage Your Exim Queue


Last modified: July 1, 2021

Overview

This document describes how to manage your Exim queue. These commands can help facilitate how Exim sends and receives mail.

Note:

You must have root-user access to perform these commands. If you do not, contact your hosting provider for help with your Exim queue.

Exim commands to manage your email

  • To determine the total count of mail in the queue, use the exim -bpc command.

  • To remove a single message from the queue, use the exim -Mrm <MessageID> command:

  • To remove messages from a specific email account in the mail queue, use the following command:

        exiqgrep -f user@compromised.tld -i | xargs exim -Mrm
        

  • To delete the entire queue, use the following command:

        exiqgrep -i | xargs exim -Mrm
        

Warning:

This will remove all email from the mail queue, which may include emails you want to send or receive. You cannot recover deleted emails.

Note:

If you receive a message that an email is locked, the system is in the process of sending the message. For example, one message could be removed and another one could not:

  Message 1JoX25-1168Q4-ME has been removed
  Message ZB3747-P1rn5-23 is locked

Additional Documentation