Require a specific email header field with postfix

Posted by Stefan Amyotte on Server Fault See other posts from Server Fault or by Stefan Amyotte
Published on 2012-11-21T21:31:35Z Indexed on 2012/11/21 23:01 UTC
Read the original article Hit count: 283

Filed under:

I want to setup postfix so that email lacking a specific email header are rejected.

Is it possible to use header_check to reject emails that do not include a specific header field entry.

The solution that I believe may work is the following:

/^x-tituslabs-classifications-30: (<>)?$/ REJECT Classification field required

I want to make sure that any email going through postfix contains a x-tituslabs-classifications-30 entry.

© Server Fault or respective owner

Related posts about postfix