Tuesday, April 9, 2013

Check more than one message header at time

With built-in option to check all or any conditions you can check more than one header at time. Multiple headers can be checked with logical AND or OR parameter.

I'll add two headers with value checking. In the first one I will use Wildcards when matching Content-Type value. In the second one I will use Regular expression to match User-Agent header value.

Now when both conditions are added, one from two option must be selected:

  • All conditions must met
  • Any condition must met

When defining mail server rules use various message conditions.

When All conditions must met option is selected then both header conditions must be met. So when message will not have those headers rule will be not executed.

When Any conditions must met option is selected then any header may be present in message.

Learn more about content control and flow shaping with Postfix and Sendmail.