Forward mail using Postfix move FROM to REPLY-TO then rewrite FROM

I am trying to do the following:

Configure SMTP relays for outgoing mail, where:
(a) All From: headers are rewritten as " no-reply@example.com "
(b) Added Reply-To: header with From: source address

I use sender_cannoical_maps and header_checks , the contents of each of which are as follows:

sender_canonical_maps:

/.*/ no-reply@example.com 

header_checks:

 /^From:(.*)$/ PREPEND Reply-To:$1 

But when the message is received, the non-response address is included in the Reply-To: field, which I do not want:

 to: end-user@example.com from: no-reply@example.com reply-to: no-reply@example.com , sender@domain.com 

If I change header_checks to use REPLACE instead of PREPEND, I lose the original sender, which is being overwritten:

 to: end-user@example.com from: no-reply@example.com reply-to: no-reply@example.com 

So I lost sender@domain.com.

What am I doing wrong here? And apologize in advance for the lack of information.

+5
source share

All Articles