Have read through the pickup(8) and cleanup(8) docs and understood the
workflow as follows.
When a local message is sent by sendmail it lands into the maildrop
directory. The pickup daemon then feeds it into the cleanup one.
The latter is responsible for all sorts of envelope and header
transformations including virtual and canonical mappings resolution.

pickup[18650]: D30B93F909: uid=1000 from=<u...@mydomain.com>
> cleanup[19082]: D30B93F909: message-id=<
> 20210211150656.d30b93f...@mail.mydomain.com>
> qmgr[16657]: D30B93F909: from=<u...@mydomain.com>, size=379, nrcpt=1
> (queue active)
> smtp[19084]: D30B93F909: to=<u...@gmail.com>, relay=
> gmail-smtp-in.l.google.com[64.233.162.27]:25, delay=0.87,
> delays=0.03/0.01/0.35/0.49, dsn=2.0.0, status=sent (250 2.0.0 OK
>  1613056017 z11si3995053lfe.163 - gsmtp)
> qmgr[16657]: D30B93F909: removed


 Relay messages are also feeded into the cleanup daemon but by smtpd which
initiates the probe prior to that.

smtpd[20221]: connect from mail-yb1-f170.google.com[209.85.219.170]
> smtpd[20221]: Anonymous TLS connection established from
> mail-yb1-f170.google.com[209.85.219.170]: TLSv1.3 with cipher
> TLS_AES_128_GCM_SHA256 (128/128 bits)
> cleanup[20229]: 9AE7A3F56E: message-id=<
> 20210211155932.9ae7a3f...@mail.mydomain.com>
> qmgr[20192]: 9AE7A3F56E: from=<double-bou...@mydomain.com>, size=269,
> nrcpt=1 (queue active)
> local[20230]: 9AE7A3F56E: to=<u...@mydomain.com>, relay=local,
> delay=0.02, delays=0.01/0.01/0/0, dsn=2.0.0, status=deliverable (delivers
> to mailbox)
> qmgr[20192]: 9AE7A3F56E: removed
> smtpd[20221]: 9A4A73F56E: client=mail-yb1-f170.google.com[209.85.219.170],
> sasl_method=PLAIN, sasl_username=user
> cleanup[20229]: 9A4A73F56E: message-id=<
> caepw1jvqmhbhxh_matu1uht7_54tcpbqm38cufyzsv4sa99...@mail.gmail.com>
> qmgr[20192]: 9A4A73F56E: from=<u...@mydomain.com>, size=1489, nrcpt=1
> (queue active)
> smtpd[20221]: disconnect from mail-yb1-f170.google.com[209.85.219.170]
> ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
> smtp[20231]: 9A4A73F56E: to=<u...@gmail.com>, relay=
> gmail-smtp-in.l.google.com[64.233.162.27]:25, delay=0.89,
> delays=0.29/0.01/0.32/0.27, dsn=2.0.0, status=sent (250 2.0.0 OK
>  1613059176 c9si1597016lft.196 - gsmtp)
> qmgr[20192]: 9A4A73F56E: removed


So now it is clear why the probe is not done for local mail.

Another somewhat related question is: in order to probe the smtpd needs to
resolve all virtual etc. mappings which is also done by the cleanup. Is
this resolution done twice in this case?



пт, 12 февр. 2021 г. в 02:48, Wietse Venema <wie...@porcupine.org>:

> Eugene Podshivalov:
> > >
> > > Wietse:
> >
> > The address can be transformed
> > > with canonical_maps, virtual_alias_maps, it may be routed to a
> > > different system with transport_maps, and it may be aliased with
> > > /etc/aliases to some other local or remote address
> >
> > All these things apply to locally sent messages as well, don't they? But
> > still no probe is done for them.
>
> There are no smtpd_mumble_restrictions for /usr/sbin/sendmail,
> because rejecting mail there would totally break compatibility with
> every program that submits mail that way.
>
> Instead, Postfix accepts mail, and LATER returns undeliverable mail
> to the alleged sender. Local users can be punished after an analysis
> of the logs of their activty.
>
>         Wietse
>

Reply via email to