On 2025-12-03 13:21, Wietse Venema via Postfix-users wrote:

> Jan Eden via Postfix-users:
> > Dec  3 13:35:13 mailjail postfix/smtp[91375]: B05367587223: 
> > to=<[email protected]>, relay=mail.example.com[2a01:239:295:c900::1]:587, 
> > delay=0.22, delays=0/0.02/0.17/0.03, dsn=5.7.1, status=bounced (host 
> > mail.example.com[2a01:239:295:c900::1] said: 553 5.7.1 
> > <[email protected]>: Sender address rejected: not owned by 
> > user [email protected] (in reply to RCPT TO command))
> 
> Apparently,
> 
> - Some aliases file has an owner-root alias. This overridee the
> original envelope sender address with owner-root or
> [email protected].

There is definitely no alias like this in /etc/aliases (or my
aliases_pattern file). I assumed the owner-root address was created by
some internal bounce mechanism.

> - Some SMTP daemon has a policy "reject_sender_login_maps" (or
> variant thereof) that does not allow [email protected]
> as envelope sender.

Yes, this is intentional, I use controlled_envelope_senders to restrict
the addresses the SASL user is allowed to use.

> You need to change at least one.

To summarize the problem again – both alias files create the same output
for "root":

# postmap -q "root" hash:/etc/aliases [email protected]
# root@mailjail:~ # postmap -q "root" 
pcre:/usr/local/etc/postfix/aliases_pattern [email protected]

aliases_pattern somehow causes this (the beginning of the
owner-owner-owner-owner... loop); the mail is forwarded locally, not
sent to [email protected]:

Dec  3 13:35:13 mailjail postfix/local[91374]: AD17B7587221: 
to=<[email protected]>, orig_to=<root>, relay=local, delay=0.02, 
delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (forwarded as B05367587223)
Dec  3 13:35:13 mailjail postfix/qmgr[91367]: B05367587223: 
from=<[email protected]>, size=438, nrcpt=1 (queue active)
...

With aliases, the result is as expected:

Dec  3 13:29:26 mailjail postfix/qmgr[90968]: 443157587227: 
from=<[email protected]>, size=438, nrcpt=1 (queue active)
Dec  3 13:29:26 mailjail postfix/qmgr[90968]: 40B067587223: removed
Dec  3 13:29:26 mailjail postfix/smtp[91152]: 443157587227: 
to=<[email protected]>, orig_to=<root>, 
relay=mail.example.com[217.154.195.8]:587, delay=0.3, delays=0/0.02/0.2/0.09, 
dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 7CA90800BE)

The difference boils down to this:

to=<[email protected]>, orig_to=<root>, relay=local
to=<[email protected]>, orig_to=<root>, relay=mail.example.com

I just cannot understand why the handling is different, based on
identical results from the mapping (s. above).

- Jan
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to