Managing the Mail Queue in Exim

Exim binaries (/usr/sbin/exim) are used with various attributes to manage Email messages in the queue. Most of these command needs one or more message-IDs to be specified in the command line, which is where `exiqgrep -i` comes handy.
exiqgrep -i lists the message IDs. For Usage you can visit Exiqgrep Options & Usages

Start a queue run:

root@localhost# exim -q -v

Start a queue run for just local deliveries:

root@localhost# exim -ql -v

Summary of messages in the queue (count, volume, oldest, newest, domain, and totals):

exim -bp | exiqsumm

Display what Exim is doing right now:


Display all Exim configuration settings:

exim -bP

Remove a message from the queue:

root@localhost# exim -Mrm <message-id> [  ... ]

Freeze a message:

root@localhost# exim -Mf <message-id> [  ... ]

Throw a message:

root@localhost# exim -Mt <message-id>  [  ... ]

Deliver(Force) a message, whether it’s frozen or not, whether the retry time has been reached or not:

root@localhost# exim -M <message-id>  [  ... ]

Deliver a message, but only if the retry time has been reached:

root@localhost# exim -Mc <message-id> [  ... ]

Force a message to fail and bounce as “cancelled by administrator”:

root@localhost# exim -Mg <message-id> [  ... ]

Remove all frozen messages:

root@localhost# exiqgrep -z -i | xargs exim -Mrm

Remove all messages older than five days (86400 * 5 = 432000 seconds):

root@localhost# exiqgrep -o 432000 -i | xargs exim -Mrm

Freeze all queued mail from a given sender:

root@localhost# exiqgrep -i -f luser@example.tld | xargs exim -Mf

View message’s headers:

root@localhost# exim -Mvh <message-id>

See a message’s body:

root@localhost# exim -Mvb <message-id>

View a message’s logs:

root@localhost# exim -Mvl

Add a recipient to a message:

root@localhost# exim -Mar <message-id> <address> [<address> …]
Edit the sender of a message:

root@localhost# exim -Mes <message-id> <address>
For more details related to management of exim . Please visit Exim documentation.
Hope this Post was Helpful for you.
Please follow and like us:

One thought on “Managing the Mail Queue in Exim

Leave a Reply

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