Hi. In a new install of Postfix 3.4.7-0+deb10u1 on Debian buster, I would like Postfix to append $myhostname instead of $myorigin to local mail with a From header containing just a username, like cron or fail2ban emails. This server is listed in mx records for example.com. In older Postfix installations (3.1) it seemed that only setting the below would be enough for local mail to be addressed from, for example, r...@mx.example.com. Wondering what I am missing or what to check next.
myhostname = mx.example.com myorigin = example.com mydestination = mx.example.com, localhost /etc/mailname is mx.example.com Feb 7 10:45:00 mx postfix/pickup[27300]: EF3E31C0CA0: uid=0 from=<root> Feb 7 11:02:04 mx postfix/pickup[27300]: 49A2D1C0CA0: uid=114 from=<logcheck> Feb 7 11:02:04 mx postfix/pickup[27300]: EAD661C112C: uid=110 from=<bac...@example.com> Feb 7 11:02:06 mx postfix/pickup[27300]: 85CF81C112C: uid=110 from=<bac...@example.com> Feb 7 11:06:06 mx postfix/pickup[27300]: AC8851C112C: uid=110 from=<pepwellness.da...@doggydumbbell.com> Feb 7 11:06:54 mx postfix/pickup[28725]: CF91B1C0CA0: uid=0 from=<root> Feb 7 11:12:28 mx postfix/pickup[28725]: D5D581C0CA0: uid=0 from=<fail2ban> Feb 7 11:16:42 mx postfix/pickup[29054]: AADAC1C0CA0: uid=0 from=<root> Feb 7 11:16:42 mx postfix/pickup[29054]: AADAC1C0CA0: uid=0 from=<root> Feb 7 11:16:42 mx postfix/cleanup[29078]: AADAC1C0CA0: warning: header Subject: test from local; from=<r...@example.com> Feb 7 11:16:42 mx postfix/cleanup[29078]: AADAC1C0CA0: message-id=<20200207171642.aadac1c0...@mx.example.com> Feb 7 11:16:42 mx postfix/qmgr[29055]: AADAC1C0CA0: from=<r...@example.com>, size=420, nrcpt=1 (queue active) Feb 7 11:16:42 mx postfix/smtp[29080]: AADAC1C0CA0: to=<r...@example.com>, orig_to=<root>, relay=mail.example.com[<snip>]:25, delay=0.23, delays=0.03/0.02/0.02/0.16, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BA2DA4E014F) Feb 7 11:16:42 mx postfix/qmgr[29055]: AADAC1C0CA0: removed Possibly relevant?: always_add_missing_headers = yes header_from_format = obsolete