Useful commands for exim (mini cheatsheet)

5
(1)

Exim commands to manage your email

How to Manage Your Exim Queue

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

  • 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 [email protected] -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 email

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

To print a list of the messages in the queue, enter:

# exim -bp

To remove a message from the queue, enter:

# exim -Mrm {message-id}

To remove all messages from the queue, enter:

# exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash

# exim -bp | exiqgrep -i | xargs exim -Mrm

To count messages in queue

# exim -bpc

Similar Posts:

923

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

Leave a Comment

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

Scroll to Top