On 2010-12-10 thussvm wrote:
> Because of a domain move we're doing, we're trying to add a reply-to
> header in postfix when no reply-to header is already present. The rule
> we're using is:
> 
> !/^Reply-To/ prepend Reply-To: "Support" <supp...@ourdomain.org>
> 
> However, since the check is being applied to each header line we get a
> bunch of reply-to's prepended instead of just one. Is there a regex we
> can use to say:
> 
> If no reply-to header exists anywhere in the headers
>    then prepend one reply-to header

As others have already said: header_checks inspects one header at a time,
not all headers as a whole.

If your mail goes through Postfix only once, you could try prepending
some unique header (e.g. Subject or Message-ID) with the Reply-To
header:

  if /^message-id:/
    /^message-id:/ PREPEND Reply-To: "Support" <supp...@example.org>
  endif

However, that's merely a workaround (and an ugly one at that), not a
real solution.

And please use RFC 2606 domain names instead of some made-up fake domain
that may actually be a real domain belonging to someone else. That's why
the domains in RFC 2606 are reserved after all.

Regards
Ansgar Wiechers
-- 
"Abstractions save us time working, but they don't save us time learning."
--Joel Spolsky

Reply via email to