Administering Exim

There are a number of things that you need to keep monitoring, also you need to understand how to interpret the log files.

Log Files

Exim uses three different log files

You can change the log file using the option log_file_path, it a good idea to rotate the logs using your favorite log rotator. It is also possible to log directly to syslog.

Logging Options

You can use the option log_selector to add additional logging

log_selector options

*acl_warn_skipped
address_rewrite
all_parents
arguments
*connection_reject
*delay_delivery
deliver_time
delivery_size
*dnslist_defer
*etrn
*host_lookup_failed
ident_timeout
incoming_interface
incoming_port
*lost_incoming_connection
outgoing_port
*queue_run
queue_time
queue_time_overall
received_recipients
received_sender
*rejected_header
*retry_defer
return_path_on_delivery
sender_on_delivery
*sender_verify_fail
*size_reject
*skip_delivery
smtp_confirmation
smtp_connection
smtp_incomplete_transaction
smtp_protocol_error
smtp_syntax_error
subject
tls_certificate_verified
*tls_cipher
tls_peerdn
unknown_in_list
all

Note * = default

Log Format

The log entries are single lines of text, there is a two character flag that identifies the reception or delivery of the message

<=
for an arrival
=>
for a successful delivery
==
for deferment of delivery until later
**
for a delivery failure

There are a number of fields that can appear on long lines on text in the log file, here is a summary of what the fields mean

A
Authenticator name
C
SMTP confirmation on delivery
CV
Certificate verification status
DN
DN from peer certificate
DT
Delivery time for one delivery
F
Sender address
H
Host name and IP address
I
Incoming interface
id
Message id for incoming message
P
Protocol for incoming message
QT
Time spent on queue
R
Router Name
S
Size of message
ST
Shadow transport name
T
Transport name
U
Local user or RFC 1413 identity
X
TLS cipher suite

Exim Utilities

There are a number of utilities that you can use to help you day to day administration

exigrep bit like grep that can be used on the log files
eximstats obtains statistics from the log files (lots of information)
exiqsumm inspect the messages on the queue, used with "exim -bp"
exinext display the next time a delivery will be made for a address

Hints Database Maintenance

There are a number of utilities that you can use to help you day to day administration regarding the hints database

Display the contains of a hints database

# exim -bP spool_directory

# exim_dumpdb <spool_directory> callout

# exim_dumpdb <spool_directory> retry

# exim_dumpdb <spool_directory> wait-remote_smtp

Cleardown the databases

/usr/sbin/exim_tidydb

# You can cleardown by hour or day
exim_tidydb -t 1h /var/spool/exim retry
exim_tidydb -t 1d /var/spool/exim retry

Modify the databases /usr/sbin/exim_fixdb