I will try the Postfix built-in header_checks – PREPEND
I will also post my results.
Thank you for the details.

From: <[email protected]> on behalf of Wietse Venema 
<[email protected]>
Reply-To: Postfix users <[email protected]>
Date: Thursday, June 30, 2022 at 09:53
To: Postfix users <[email protected]>
Subject: Re: How can I set a "Reply-To" header ?

White, Daniel E. (GSFC-770.0)[AEGIS]:
I found out how to do it from command line:

echo -e "Testing Mail\nThank you" | mailx -v -s "Testing Mail" -S 
"[email protected]<mailto:[email protected]>"  
[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>

This smells like  a common webserver problem, where the webserver
submits email messages that appear to come from rhe web server's
UNIX account ([email protected]<mailto:[email protected]>). Adding a 
Reply-To: header
is the WRONG solution for that. Instead, specify the correct
envelope sender address:

    /usr/bin/sendmail -f [email protected]<mailto:[email protected]> 
recipient....

If that is not your problem, read on for more.

Is there a way to add a 'Reply-To' header from the Postfix configuration ?

You can use milter-regex to inspect email and add or change headers.

You can use Postfix built-in header_checks to PREPEND a header but
that will add the header even if the message already has a Reply-To
header.

    /^From: blah@example\.com/ PREPEND: Reply-To: 
[email protected]<mailto:[email protected]>

The example needs to be tweaked to the exact form of your
message headers.

I looked in the documentation but could not find anything about
setting such a header, conditionally or otherwise.

Yeah. There is nothing about adding REPLY-TO headers.

                Wietse

Reply via email to