When delivering local mail via Postfix, I would like to rewrite both the envelope and the from header. For the envelope, I configured a
sender_canonical_map
(which works well), but the header_checks
(header_checks = pcre:/etc/postfix/header_checks
) have no effect. This is the content of the header_checks
file:
`
/^From: Cron Daemon / REPLACE From: Cron Daemon
`
A test with `postmap -hmq - pcre:/etc/postfix/header_checks
Delivered-To: mailer@example.org
Received: from mail.example.org
by mail.example.org with LMTP
id XS66JXtzJGiAPCkAkvmB9w
(envelope-from )
for ; Wed, 14 May 2025 12:42:03 +0200
Received: by mail.example.org (Postfix)
id 94BA381835; Wed, 14 May 2025 12:42:03 +0200 (CEST)
Delivered-To: root@mail.example.org
Received: by mail.example.org (Postfix, from userid 0)
id 71D6C8182C; Wed, 14 May 2025 12:42:01 +0200 (CEST)
From: Cron Daemon
To: root@mail.example.org
```
What am I missing here?
Asked by janeden
(205 rep)
May 14, 2025, 10:52 AM