Hello,
I'm looking for a hint how to rewrite header_recipient_address by replacing it with envelope_recipient_address for all the messages coming from the particular envelope_sender_address = header_sender_address, for example:
Incoming message:
EHLO domain.com
MAIL FROM:<sender@domain.com>
RCPT TO:<recipient@domain.com>
DATA
Message-Id: <xxxxxxxxxx@domain.com>[U]
To: dummy_address
Subject: Test message
From: sender@domain.com
Modified message, which Postfix should post into the queue:
EHLO domain.com
MAIL FROM:<sender@domain.com>
RCPT TO:<recipient@domain.com>
DATA
Message-Id: <xxxxxxxxxx@domain.com>
To: recipient@domain.com
Subject: Test message
From: sender@domain.com
According to the Postfix FAQ, there is no way to do it with Postfix header_checks because of the following:
65. Using header_checks or body_checks can I make conditional comparisons? Something like, for example:
/^to: joey/ AND /^subject: hot deals/ REJECT
so that certain subjects are blocked only for certain users.
This won't work because Postfix header and body checks can only consider one logical message line at a time. They're meant for simple checks.
If you need anything more sophisticated, you should set up a content filter that has the smarts you need.
Thanks In Advance!


LinkBack URL
About LinkBacks


