Mailing List Archive

debugging et al
>
> GV> What I REALLY REALLY would like to do is watch the SMTP
> conversation between my exim4 and its smarterhost
>
> Not directly the smtp conversation, but you can turn on -d debugging
> in an ACL, with
>     control = debug/<options>
> so you have full debugging just for messages to gmail.


Bit of a side note, but I tried many different ways (for about a day) to
turn on debugging , never really got anything useful.  I'm using Debian
(bullseye)


+ in /etc/default/exim  (set COMMONOPTIONS=''  ..to -d and =d+all)

+ setting options in /etc/exim4/conf.d/main/90_exim4-config_log_selector
( MAIN_LOG_SELECTOR == MAIN_LOG_SELECTOR +all -subject -arguments )

+ found the exim process via ps , killed it restarted with additional
-d+all (and also without -bd and with -v)


Only the last one produced any sort of output (on stdout/stderr on the
terminal) but this was just the startup ...after a second or so it
appeared to fork off some children and that was the last output I saw.


I did (belatedly) realise , I'd need to take a tad more care over this,
due to the way I send and receive mail:


    Outgoing: clients (e.g. thunderbird connect to port 25 of existing
sendmail (exim4(8)

    Incoming: (which incudes the .forward case I'm considering)
fetchamil(1) pulls the mail down and "passes" to sendmail (how?
localhost, exec a separate sendmail ...I really need to check)


So I suspect I'm not turning on debug in the right place. Your comment
about setting in a ACL I'd not seen before.


...I just spotted a comment (made by me apparently , some years ago :-) )


root@ybox:/etc/exim4/conf.d/acl# head
/etc/exim4/conf.d/acl/15_GPV_injected_mail
### acl/15_GPV_injected_mail
#################################

#
# When email arrives here (localhost) from dropmail, dropmail invokes
/usr/sbin/sendmail -oi]
# so (my reading is) is is NON SMTP mail
#
# The to address should be <name>.home
#
# The intention here is that we DO DO DMIM checking, unlike normal local
email (e.g. stuff going out)


Is there a section in the exim manual (RTFM!) with a guide to actually
*doing( debugging (rather than e.g. the debug options, which is useful
but a different point)


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: debugging et al [ In reply to ]
On 2/27/24 12:36, graeme vetterlein via Exim-users wrote:
> Bit of a side note, but I tried many different ways (for about a day) to turn on debugging , never really got anything useful.  I'm using Debian (bullseye)

Perhaps you should ask on a Deb-specific forum.

>
> + in /etc/default/exim  (set COMMONOPTIONS=''  ..to -d and =d+all)
>
> + setting options in /etc/exim4/conf.d/main/90_exim4-config_log_selector ( MAIN_LOG_SELECTOR == MAIN_LOG_SELECTOR +all -subject -arguments )

That's logging, not debug.

>
> + found the exim process via ps , killed it restarted with additional -d+all (and also without -bd and with -v)
>
>
> Only the last one produced any sort of output (on stdout/stderr on the terminal) but this was just the startup ...after a second or so it appeared to fork off some children and that was the last output I saw.

The only way I see that happening is if something else (systemd?)
killed off the daemon you'd started. Otherwise you
should get some fresh output for any new connection received by it
(did you supply one?)
>


>     Incoming: (which incudes the .forward case I'm considering) fetchamil(1) pulls the mail down and "passes" to sendmail (how? localhost, exec a separate sendmail ...I really need to check)

Yes. If it's not SMTP, then it's command-line - and the daemon
listening for SMTP connections does not get involved.

> So I suspect I'm not turning on debug in the right place. Your comment about setting in a ACL I'd not seen before.

Again, if it's no SMTP then you have to attend instead to the
not-smtp ACLs

> Is there a section in the exim manual (RTFM!) with a guide to actually *doing( debugging

Nope. You get to infer what's needed based on the general description
of how Exim processes messages. Or ask here, or on IRC.

--
Cheers,
Jeremy

PS: Anyone care about Mastodon, as an IRC alternate?

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: debugging et al [ In reply to ]
D?a 27. februára 2024 12:36:23 UTC používate? graeme vetterlein via Exim-users <exim-users@lists.exim.org> napísal:

>+ in /etc/default/exim  (set COMMONOPTIONS=''  ..to -d and =d+all)

I didn't investigate why, but that doesn't work, i guess that it can
be something with mixing systemd & sysv. As debug usually is not
good as long lived option, i didn't bother and when i need it, i stop
daemon, and run it from terminal in foreground with appropriate
options and send email. After collecting debug output, stop it by
Ctrl+C, and start "normal" deamon and investigate that output...

If you cannot to know when debugging is needed, the mentioned
ACL control is enough, i never tried/need it for outgoing mail, only
for incomming, but i got what was needed...

regards


--
Slavko
https://www.slavino.sk/

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: debugging et al [ In reply to ]
On Tue, Feb 27, 2024 at 01:02:09PM +0000, Jeremy Harris via Exim-users wrote:
> On 2/27/24 12:36, graeme vetterlein via Exim-users wrote:
> > Bit of a side note, but I tried many different ways (for about a day) to turn on debugging , never really got anything useful.? I'm using Debian (bullseye)
>
> Perhaps you should ask on a Deb-specific forum.
>
> > + in /etc/default/exim? (set COMMONOPTIONS=''? ..to -d and =d+all)

First, there was a bug in some Debian exim4-* packages: systemd unit file
(/usr/lib/systemd/system/exim4.service) have reference fo /etc/default/exim4,
while package was shipped with /etc/default/exim (without "4"), so
configuration was not applied on startup. Fixed in 4.97~RC2-1.

Second, on Debian systemd unit file uses variables EXIMSERVICE and
UPEX4OPTS, those are not mentioned in /etc/default/exim4. I don't know why,
probably content of this file is artifact of SysV era, it should be
replaced.

I see no problems with manual running "exim4 -d..." under Debian.
Maybe your debug output was sent to /var/log/exim4/mainlog.
--
Eugene Berdnikov

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: debugging et al [ In reply to ]
On Tue, Feb 27, 2024 at 12:36:23PM +0000, graeme vetterlein via Exim-users wrote:

> Incoming: (which incudes the .forward case I'm considering)
> fetchamil(1) pulls the mail down and "passes" to sendmail (how?
> localhost, exec a separate sendmail ...I really need to check)

I haven't used fetchmail in a long time, but IIRC this is configurable,
and the fetchmail manpage warns against the commandline+stdin way,
with good reason.

--
Ian

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/