Re: [exim] Connection debug

Góra strony
Delete this message
Reply to this message
Autor: Phil Pennock
Data:  
Dla: tower
CC: Exim-Users
Temat: Re: [exim] Connection debug
On 2009-10-21 at 12:56 +0200, tower wrote:
> How can I debug connection problem between my exim server and some
> machine (scaner, printer, fax) which have mail client on board? I must
> do it safely because i have about 5000 clients working online on that
> server. Would be fine if i could start a separate exim process.
>
> Logs tell nothing, so i must use some tool.


You can add stuff to Exim's logging with the "log_selector"
configuration in the main section. If you just use "+foo" for each item
you add, then you're adding to what's logged. You might want:

log_selector = +smtp_connection +smtp_incomplete_transaction \
        +smtp_no_mail +smtp_protocol_error +smtp_syntax_error


With those, you can see if the device is connecting to Exim. It should
be a low-risk change to your config. You can use:
exim -C /path/to/different/config -bV
to do some basic checks before putting the new config live.

If, after adding +smtp_connection to log_selector, you still get
nothing, then the problem lies outside Exim.

If you want to get full debugging of a connection from a particular IP,
then what I'd do is:

 (1) Run a debug Exim on a different port:
     # exim -d -oX 26 -bd
 (2) Use the host packet filter to do a port redirection for traffic
     from a particular host; any modern packet filter should be capable
     of doing this.


If you need more information on a particular aspect of Exim, check the
documentation on the different sub-options for -d; eg:
# exim -d+expand+acl+auth -oX 26 -bd

With PF packet filtering, you'd use something like:

rdr on ne0 inet proto tcp from 192.0.2.30 to port 25 -> 192.0.2.4 port 26

if your mail-server is on [192.0.2.4], the network device is ne0 and you
want to get debugging info for SMTP connections from [192.0.2.30].

There will be something equivalent for iptables on Linux, I'm sure.

-Phil