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

From: <owner-postfix-us...@postfix.org> on behalf of Wietse Venema 
<wie...@porcupine.org>
Reply-To: Postfix users <postfix-users@postfix.org>
Date: Thursday, June 30, 2022 at 09:53
To: Postfix users <postfix-users@postfix.org>
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 
"reply-to=yom...@example.com<mailto:yom...@example.com>"  
m...@example.com<mailto:m...@example.com><mailto:m...@example.com<mailto:m...@example.com>>

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

    /usr/bin/sendmail -f yom...@example.com<mailto:yom...@example.com> 
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: 
yom...@example.com<mailto:yom...@example.com>

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