Jan Eden via Postfix-users:
> Hi,
> 
> I configured two hosts to forward messages for local accounts to a relay
> host like this:
> 
> myhostname = social.eden.one
> myorigin = /etc/mailname
> alias_maps = hash:/etc/aliases
> sender_canonical_maps = hash:/etc/postfix/sender_canonical
> mydestination = $myhostname, localhost.localdomain, localhost
> relayhost = [mail.eden.one]:587
> mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
> inet_interfaces = loopback-only
> inet_protocols = all
> smtp_sasl_auth_enable = yes
> smtp_sasl_password_maps = hash:/etc/postfix/relay_passwd
> smtp_sasl_security_options = noanonymous
> 
> The only difference is $myhostname (social and socialnew, respectively).
> 
> /etc/aliases contains "root: [email protected]" on both hosts. Strangely
> enough, the hosts handle messages to the local root account differently.
> When sending a message with
> 
> echo "Test" | mail -s "Test" root
> 
> this is what happens:
> 
> # social
> 
> 2026-01-16T09:01:45.304481+01:00 social postfix/pickup[1033769]: 4A28540108: 
> uid=0 from=<[email protected]>
> 2026-01-16T09:01:45.314262+01:00 social postfix/cleanup[1033779]: 4A28540108: 
> message-id=<[email protected]>
> 2026-01-16T09:01:45.316038+01:00 social postfix/qmgr[1033771]: 4A28540108: 
> from=<[email protected]>, size=325, nrcpt=1 (queue active)
> 2026-01-16T09:01:45.325662+01:00 social postfix/cleanup[1033779]: 4F45940059: 
> message-id=<[email protected]>
> 2026-01-16T09:01:45.329087+01:00 social postfix/local[1033781]: 4A28540108: 
> to=<[email protected]>, orig_to=<root>, relay=local, delay=0.04, 
> delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (forwarded as 4F45940059)
> 2026-01-16T09:01:45.329315+01:00 social postfix/qmgr[1033771]: 4F45940059: 
> from=<[email protected]>, size=456, nrcpt=1 (queue active)
> 2026-01-16T09:01:45.329400+01:00 social postfix/qmgr[1033771]: 4A28540108: 
> removed

Above, the destination 'root'  becomes 'root@something', that
'something' MATCHES MYDESTINATION, the scheduler talks to a Postfix
local delivery agent, and the local delivery agent forwards the
message elsewhere.

> # socialnew
> 
> 2026-01-16T09:50:48.132515+01:00 socialnew postfix/pickup[1902]: 204178035A: 
> uid=0 from=<[email protected]>
> 2026-01-16T09:50:48.137059+01:00 socialnew postfix/cleanup[1912]: 204178035A: 
> message-id=<[email protected]>
> 2026-01-16T09:50:48.137838+01:00 socialnew postfix/qmgr[1903]: 204178035A: 
> from=<[email protected]>, size=335, nrcpt=1 (queue active)
> 2026-01-16T09:50:48.801409+01:00 socialnew postfix/smtp[1914]: 204178035A: 
> to=<[email protected]>, relay=mail.eden.one[2a01:4f8:1c1f:876d:8000::10]:587, 
> delay=0.67, delays=0.01/0.02/0.28/0.37, dsn=2.0.0, status=sent (250 2.0.0 
> 3b1bfbad Message accepted for delivery)
> 2026-01-16T09:50:48.801507+01:00 socialnew postfix/qmgr[1903]: 204178035A: 
> removed

Above, the destination 'root' becomes 'root@something, that 'something'
DOES NOT MATCH MYDESTINATION, the scheduler talks to a Postfix
client, and that SMTP client delivers the message elsewhere.

You need to compare outputs from:

    postcnf myorigin
    postconf mydestination

from both systems.

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

Reply via email to