When you’re modifying your Exim configuration, for example setting up spam filtering, virus scanning or DNS blacklisting, it’s common practice to connect to Exim over telnet to see whether your new configuration works as expected. While this works well, you can’t actually see what Exim is doing behind the scenes and thats not particularly useful when you’re debugging something that is complicated.
However, there is a little known feature in Exim that lets you run a fake SMTP session with, just as if you were connected over telnet, but it provides a full debug log! To use it, you have to pick an IP that Exim will think you’re connecting from. If you picked the IP 127.0.0.1 for example, run the following command:
exim4 -bh 127.0.0.1
That will display the following:
**** SMTP testing session as if from host 127.0.0.1
**** but without any ident (RFC 1413) callback.
**** This is not for real!
>>> host in hosts_connection_nolog? no (option unset)
>>> host in host_lookup? yes (matched "*")
>>> looking up host name for 127.0.0.1
>>> IP address lookup yielded localhost
>>> gethostbyname2 looked up these IP addresses:
>>> name=localhost address=127.0.0.1
>>> checking addresses for localhost
>>> 127.0.0.1 OK
>>> host in host_reject_connection? no (option unset)
>>> host in sender_unqualified_hosts? no (option unset)
>>> host in recipient_unqualified_hosts? no (option unset)
>>> host in helo_verify_hosts? no (option unset)
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)
220 xxxx ESMTP Exim 4.63 Tue, 31 Jul 2007 14:32:17 +1200
From then on, you just communicate with Exim like you would over telnet. No mail will actually be delivered by Exim. The debug information that Exim provides will be invaluable to you.