Useful Exim Commands
In UNIX system, the message transfer agent used (MTA) is Exim. Under the
terms of GNU General Public License, the Exim is freely available. Exim
is used for locating the spam activity on the servers. Using the Exim
command, we can route the mail and facilities for checking incoming
mail. Configuration of Exim is little bit different.
1) Print a count of the messages in the queue:
root@localhost# exim -bpc
2) Print a listing of the messages in the queue (time queued, size, message-id, sender, recipient):
root@localhost# exim -bp
3) Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals):
root@localhost# exim -bp | exiqsum
4) Print what Exim is doing right now:
root@localhost# exiwhat
5) 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
6) Display all of Exim’s configuration settings:
root@localhost# exim -bP
7) Use -f to search the queue for messages from a specific sender:
root@localhost# exiqgrep -f [luser]@domain
8) Use -r to search the queue for messages for a specific recipient/domain:
root@localhost# exiqgrep -r [luser]@domain