On Thu, Oct 22, 2015 at 04:46:45PM -0500, helices wrote:

> In both cases, if the To: header matches certain criteria, I need to rewrite
> both From:
> and To: headers.

Postfix has no direct means to perform "From:" header rewrites that
are dependent on the content of the "To:" header.  The right place
to ensure that the "From:" header is correct is in the MUA.

Fixing this at a Postfix MTA requires a Sieve-like milter or
a content filter with similar capabilities.

> What is the simplest way to implement this in postfix?

The best way to do this is at the MUA when the mail is sent.  MTAs
more monolithic that focus more on message transformations (Postfix
focus is on security, reliability and performance) may be more
suitable.  Exim can likely do this, with some carefully written
${if {this} {that}} directives (make sure to avoid unsafe processing
of untrusted content).

-- 
        Viktor.

Reply via email to