Below are the most common Exim commands which help an Administrator to ease his life
Print a count of the messages in the queue:
exim -bpc
Print a listing of the messages in the queue (time queued, size, message-id, sender, recipient):
exim -bp
Print a summary of messages in the queue (count, volume, oldest, newest, domain, and total
exim -bp| exiqsumm
Print what Exim is doing right now:
exiwhat
To check if the server routes the mail properly use exim -bt
# exim -bt alias@localdomain.com user@thishost.com <-- alias@localdomain.com router = localuser, transport = local_delivery root@localhost# exim -bt user@thishost.com user@thishost.com router = localuser, transport = local_delivery root@localhost# exim -bt user@remotehost.com router = lookuphost, transport = remote_smtp host mail.remotehost.com [1.2.3.4] MX=0
Display all of Exim’s configuration settings:
exim -bp
exiqgrep
Its used for grepping through the exim queue.
search the queue for messages from a specific sender :
exiqgrep -f user@domainname.com
Search the queue for a specific recipient
exiqgrep -r user@domainname.com
To print messages older than the specified number of seconds use -o .
For example, messages older than 1 day:
exiqgrep -o 86400
To print messages younger than specified number of seconds use -y
Messages younger than one day can be listed using the command
exiqgrep -y 86400
Print just the message-id of the entire queue:
exiqgrep -i
Exim Commands to Manage the queue
Start a queue run:
exim -q -v
Start a queue run for just local deliveries:
exim -ql -v
Remove a message from the queue:
exim -Mrm <message id >
Freeze a message:
exim -Mf <message id >
Thaw a message:
exim -Mt <message id>
Deliver a message, whether it’s frozen or not, whether the retry time has been reached or not:
exim -M <message id>
Deliver a message, but only if the retry time has been reached:
exim -Mc <message_id>
Force a message to Freeze and bounce as “Canceled by Admin”
exim -Mg <message id>
Remove all frozen mails
exiqgrep -z -i | xargs exim -Mrm
Remove all messages older than five days (86400 * 5 = 432000 seconds):
exiqgrep -o 432000 -i | xargs exim -Mrm
Freeze all queued mail from a given sender
exiqgrep -i -f user@domain.com | xargs exim -Mf
View a message’s headers:
exim -Mvh <messageid>
View a message’s body:
exim -Mvb <message id>
View a message’s logs:
exim -Mvl <message id>