Andy Smith:
> On 28-01-2021 00:14, Viktor Dukhovni wrote:
>
> > On Wed, Jan 27, 2021 at 05:30:25PM -0500, Wietse Venema wrote:
>
> >
> > Indeed, though I usually avoid falling in that trap, perhaps I failed
> > in
> > this case to consider whether the user is asking the right question.
> >
> > If the problem value of the "From:" header is fixed, it can certainly
> > be
> > replaced with a better (static) value. If however the requirement is
> > to
> > replace it with some dynamic value of the "Reply-To" that varies from
> > message to message, then canonical_maps would not suffice.
>
> Correct, its a dynamic value. It can only be known by reading the
> reply-to value from the headers of the same message.
Postfix can do that with a Milter. Milters can be implemented in
many languages including scripted languages such as Perl and Python.
Search the web for "python milter" and so on. It's better than
building a scripting language into the mail server like some MTA
does.
I prefer to keep Postfix focused on MTA stuff, and to use plugins
for things like pulling the header.from and envelope.from address
from a header.
Wietse