thussvm: > > 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 documented, header_checks makes a decision one header at a time, and does not remember decisions from one header to the next. I suggest that you fix the problem in the program that creates the message. If you must repair this in Postfix, then you need to use an external content filter (http://www.postfix.org/FILTER_README.html) or a Milter application (http://www.postfix.org/MILTER_README.html). Wietse