LinuxHelps.com

A blog for Linux Lovers.

Posted by sibu on March 10, 2009

Exim Shell Commands

Print a count of the messages in the queue:
root@localhost# exim -bpc

Print a listing of the messages in the queue (time queued, size, message-id, sender, recipient):
root@localhost# exim -bp

Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals):
root@localhost# exim -bp | exiqsumm

Print what Exim is doing right now:
root@localhost# exiwhat

Test how exim will route a given address:

root@localhost# 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

Managing the exim queue

Start a queue run:
root@localhost# exim -q -v

Start a queue run for just local deliveries:
root@localhost# exim -ql -v

Remove a message from the queue:
root@localhost# exim -Mrm <message-id>

Freeze a message:
root@localhost# exim -Mf <message-id>

Force another queue run:
exim -qf

Force another queue run and attempt to flush the frozen message:
exim -qff

View the log for the message;
exim -Mvl msgid

Remove message without sending any error message;
exim -Mrm messageID

Giveup and fail message to bounce the message to the Sender:
exim -Mg messageID

How many Frozen mails in the queue:
exim -bpr | grep frozen | wc -l

Deleteing Frozen Messages:
exim -bpr | grep frozen | awk {’print $3?} | xargs exim -Mrm

Add A Comment