On 1/10/2014 3:48 AM, Ansgar Wiechers wrote: > On 2014-01-10 Wijatmoko U. Prayitno wrote: >> On Fri, 10 Jan 2014 09:15:38 +0100 Kenneth Qvistgaard Dalbjerg wrote: >>> I have this in my header_checks files: >>> >>> /^From:.*\@ullabulla\.dk/ REDIRECT myem...@ourdomain.dk >>> >>> Thats working fine, but i will like, if mail sent to *@customer.dk is >>> not forwarded to my mail address, but instead is sent to the original >>> recipient. >>> >>> Is that posible to do? >> >> Yes it is possible, just use "!" to exclude it.. take closer look >> here: http://www.postfix.org/header_checks.5.html > > I don't think this is possible. header_checks evaluates one header at a > time, so you can't conditionally check To: and From: header in the same > rule.
Correct, header_checks cannot make decisions on multiple headers. However, you can achieve the goal by using smtpd restriction classes. Docs and examples here: http://www.postfix.org/RESTRICTION_CLASS_README.html -- Noel Jones