Some useful commands to manage an Exim server.
The message-IDs that Exim uses to refer to messages in its queue are mixed-case alpha-numeric, and take the form of: XXXXXX-YYYYYY-ZZ. Below bold alpha-numeric letters is
message-IDs [it's just for an example]
Quote:
2008-11-05 12:37:22 1KxhdN-0000VQ-Uq => supp0rt <supp0rt@eukhost.com> R=virtual_user T=virtual_userdelivery
2008-11-05 12:37:22 1KxhdN-0000VQ-Uq Completed
|
Most commands related to managing the queue and logging use these
message-ids.
Files in
/var/spool/exim/msglog contain logging information for each message and are named the same as the message-id.
Files in
/var/spool/exim/input are named after the message-id, plus a suffix denoting whether it is the envelope header (-H) or message data (-D).
Here are some useful
exim commands. These commands are useful, if you have an overloaded queue and need to clear it out.
Print a count of the messages in the queue
Quote:
|
root@supp0rt007# exim -bpc
|
Try to send the message with id
Quote:
|
root@supp0rt007# exim -M id
|
Count how many frozen mails in the queue
Quote:
|
root@supp0rt007# exim -bpr | grep frozen | wc -l
|
Delete frozen mails in the queue
Quote:
|
root@supp0rt007# exim -bpr | grep frozen | awk {'print $3'} | xargs exim -Mrm
|
To deliver all emails forcefully
Quote:
|
root@supp0rt007# exim -qff -v -C /etc/exim.conf &
|
Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals)
Quote:
|
root@supp0rt007# exim -bp | exiqsumm
|
Generate and display Exim stats from a logfile
Quote:
|
root@supp0rt007# eximstats /var/log/exim_mainlog
|
Generate and display Exim stats from a logfile, for one particular day
Quote:
|
root@supp0rt007# grep 2008-11-04 /var/log/exim_mainlog | eximstats
|