19.2. If Your Mail Doesn't Get Through

A number of features are available for troubleshooting installation problems. The first place to check is Exim's log files. On Linux systems they are normally kept in /var/log/exim/log and are named exim_mainlog, exim_rejectlog, and exim_paniclog. On other operating systems, they are often kept in /var/spool/exim/log. You can find out where the log files are by running the command:
exim -bP log_file_path

The main log lists all transactions, the reject log contains details of messages that were rejected for policy reasons, and the panic log is for messages related to configuration errors and the like.

Typical entries in the main log are shown below. Each entry in the log itself is a single line of text, starting with a date and time. They have been split into several lines here in order to fit them on the page:
2000-01-30 15:46:37 12EwYe-0004WO-00 <= jack@vstout.vbrew.com H=vstout.vbrew.com [192.168.131.111] U=exim P=esmtp S=32100 id=38690D72.286F@vstout.vbrew.com 2000-01-30 15:46:37 12EwYe-0004WO-00 => jill <jill@vbrew.com> D=localuser T=local_delivery 2000-01-30 15:46:37 12EwYe-0004WO-00 Completed

These entries show that a message from jack@vstout.vbrew.com to jill@vbrew.com was successfully delivered to a mailbox on the local host. Message arrivals are flagged with <=, and deliveries with =>.

There are two kinds of delivery errors: permanent and temporary. A permanent delivery error is recorded in a log entry like this, flagged with “**”:
2000-01-30 14:48:28 12EvcH-0003rC-00 doc-index.html f3.html i19694.html index.html lag2_0101.jpg lag2_0201.jpg lag2_0202.jpg lag2_0301.jpg lag2_0501.jpg lag2_0601.jpg lag2_0801.jpg lag2_0901.jpg lag2_0902.jpg lag2_0903.jpg lag2_0904.jpg lag2_0905.jpg lag2_0906.jpg lag2_0907.jpg lag2_0908.jpg lag2_0909.jpg lag2_1101.jpg lag2_1501.jpg lag2_1601.jpg lag2_2001.jpg lag2_2101.jpg lag2_2301.jpg lag2_aa01.jpg lag2_aa02.jpg lag2_ab01.jpg lag2_ab02.jpg x-082-2-firewall.attacks.html x-087-2-accounting.flushing.rules.html x-087-2-accounting.html x-087-2-accounting.ipfwadm.html x-087-2-accounting.kernel.config.html x-087-2-accounting.passive.collection.html x-087-2-accounting.viewing.results.html x-087-2-accounting.zeroing.counter.html x-087-2-appendix.brewery.html x-087-2-appendix.cables.html x-087-2-appendix.gpl.html x-087-2-appl.html x-087-2-appl.inetd.html x-087-2-appl.remote.html x-087-2-appl.rpc.html x-087-2-appl.services.html x-087-2-appl.tcpd.html x-087-2-cable.plip.html x-087-2-cable.serial.html x-087-2-cnews.active.html x-087-2-cnews.batcher.html x-087-2-cnews.control.html x-087-2-cnews.explist.html x-087-2-cnews.html x-087-2-cnews.maint.html x-087-2-cnews.misc.html x-087-2-cnews.nfs.html x-087-2-cnews.rnews.html x-087-2-cnews.sys.html x-087-2-create.subnets.html x-087-2-exim.delivery.html x-087-2-exim.html x-087-2-exim.options.html x-087-2-exim.queue.html x-087-2-exim.simple.html x-087-2-firewall.checkingconf.html x-087-2-firewall.example.html x-087-2-firewall.filtering.html x-087-2-firewall.filteringmethods.html x-087-2-firewall.future.html x-087-2-firewall.fwchains.html x-087-2-firewall.howto.html x-087-2-firewall.html x-087-2-firewall.introduction.html x-087-2-firewall.original.html x-087-2-firewall.tos.manipulation.html x-087-2-hardware.drivers.ethernet.html x-087-2-hardware.drivers.plip.html x-087-2-hardware.drivers.slip.html x-087-2-hardware.html x-087-2-hardware.kernel.config.html x-087-2-hardware.other.html x-087-2-hwconfig.tour.html x-087-2-iface.addresses.html x-087-2-iface.binaries.html x-087-2-iface.hostname.html x-087-2-iface.html x-087-2-iface.ifconfig.html x-087-2-iface.interface.html x-087-2-iface.netstat.html x-087-2-iface.procfs.html x-087-2-iface.simple-resolv.html x-087-2-iface.verify.arp.html x-087-2-inn.html x-087-2-intro.history.html x-087-2-intro.html x-087-2-intro.outlook.html x-087-2-intro.tcpip.html x-087-2-intro.uucp.html x-087-2-ipconfig.options.html x-087-2-ipmasq.html x-087-2-ipx.html x-087-2-ipx.interfaces.html x-087-2-ipx.kernel.html x-087-2-ipx.ncpfs.client.html x-087-2-ipx.ncpfs.printing.html x-087-2-ipx.ncpfs.server.html x-087-2-ipx.othertools.html x-087-2-ipx.router.html x-087-2-issues.arp.html x-087-2-issues.html x-087-2-issues.icmp.html x-087-2-issues.interfaces.html x-087-2-issues.ip-addresses.html x-087-2-issues.resolving.html x-087-2-issues.routing.html x-087-2-mail.address.html x-087-2-mail.delivery.html x-087-2-mail.elm.html x-087-2-mail.html x-087-2-mail.message-format.html x-087-2-mail.routing.html x-087-2-masq.configuration.html x-087-2-masq.kernel.config.html x-087-2-masq.namelookups.html x-087-2-masq.side.effects.html x-087-2-news.algorithm.html x-087-2-news.history.html x-087-2-news.html x-087-2-newsreaders.html x-087-2-newsreaders.nn.html x-087-2-newsreaders.tin.html x-087-2-newsreaders.trn.html x-087-2-news.usenet.html x-087-2-nfs.daemons.html x-087-2-nfs.exports.html x-087-2-nfs.html x-087-2-nfs.kernelv2.html x-087-2-nfs.kernelv3.html x-087-2-nfs.mountd.html x-087-2-nfs.nfsd.html x-087-2-nis.clients.html x-087-2-nis.html x-087-2-nis.nisplus.html x-087-2-nis.nsswitch.html x-087-2-nis.passwd.html x-087-2-nis.securenets.html x-087-2-nis.server.html x-087-2-nis.shadow.html x-087-2-nis.yp.html x-087-2-nntp.access.html x-087-2-nntp.authorize.html x-087-2-nntp.html x-087-2-nntp.interact.html x-087-2-nntp.nntpd.html x-087-2-nntp.protocol.html x-087-2-ppp.authentication.html x-087-2-ppp.html x-087-2-ppp.options.html x-087-2-resolv.howdnsworks.html x-087-2-resolv.html x-087-2-resolv.library.html x-087-2-resolv.named.html x-087-2-sage.app.html x-087-2-sendmail.html x-087-2-serial-configuration.html x-087-2-serial.devices.html x-087-2-serial.getty.html x-087-2-serial.hardware.html x-087-2-serial.html x-087-2-serial.software.html x-087-2-serial.ttys.html x-087-2-slip.dip.html x-087-2-slip.general.html x-087-2-slip.html x-087-2-slip.operation.html x-087-2-slip.server.html x-087-2-submitchanges.html x-087-2-uucp.config.files.html x-087-2-uucp.dialin.html x-087-2-uucp.html x-087-2-uucp.intro.grades.html x-087-2-uucp.misc.faq.html x-087-2-uucp.permissions.html x-087-2-uucp.protocols.html x10579.html x11684.html x11757.html x12.html x1312.html x13819.html x1392.html x14586.html x14607.html x14644.html x14661.html x14903.html x14923.html x15220.html x15291.html x15583.html x15649.html x15691.html x15909.html x15964.html x15999.html x16298.html x16700.html x16.html x18201.html x18278.html x18301.html x18326.html x18341.html x19004.html x19030.html x19519.html x19583.html x19588.html x19598.html x19602.html x19608.html x19644.html x19649.html x19653.html x19657.html x19660.html x19663.html x394.html x410.html x425.html x453.html x523.html x575.html x6009.html x6507.html x6560.html x6675.html x6968.html x7037.html x7261.html x7297.html x9803.html bill@lager.vbrew.com R=lookuphost T=smtp: SMTP error from remote mailer after RCPT TO: <bill@lager.vbrew.com>: host lager.vbrew.com [192.168.157.2]: 550 <bill@lager.vbrew.com>... User unknown

After a failure like this, Exim sends a delivery failure report, often called a bounce message back to the sender.

Temporary errors are flagged with “==”:
2000-01-30 12:50:50 12E9Un-0004Wq-00 == jim@bitter.vbrew.com T=smtp defer (145): Connection timed out

This error is typical for a situation in which Exim properly recognizes that the message should be delivered to a remote host, but is not able to connect to the SMTP service on that host. The host may be down or there could be a network problem. Whenever a message is deferred like this, it remains on Exim's queue and is retried at intervals. However, if it fails to be delivered for a sufficiently long time (usually several days), a permanent error occurs and the message is bounced.

If you are unable to locate your problem from the error message Exim generates, you may want to turn on debugging messages. You can do this using the –d flag, optionally followed by a number specifying the level of verbosity (a value of 9 gives maximum information). Exim then displays a report of its operation on the screen, which may give you more hints about what is going wrong.