# DO NOT EDIT THIS FILE. EDIT THE MAIN.CF FILE INSTEAD. THE STUFF # HERE JUST SERVES AS AN EXAMPLE. # # This file contains example settings for miscellaneous Postfix # content filtering parameters. # The header_checks parameter specifies an optional table with patterns # that each logical message header is matched against, including # headers that span multiple physical lines. Patterns are matched # in the specified order, and the search stops upon the first match. # # For examples of pattern syntax see the sample-regexp-header.cf and # sample-pcre-header.cf files. # # When a pattern matches, what happens next depends on the associated # action that is specified in the right-hand side of the table: # # REJECT [optional text...] # Reject the entire message. The optional text is sent to the # originator and is logged to the maillog file. # IGNORE Silently discard the header line. # WARN [optional text...] # Log the message header and the optional text. This is useful # for testing. When the pattern is OK, change the WARN into a # REJECT or into a DISCARD. # HOLD [optional text...] # Place the message on the hold queue. Mail on hold can be # inspected with the postcat command, and can be destroyed or # taken off hold (i.e. delivered) with the postsuper command. # The matched header is logged with the optional text. # DISCARD [optional text...] # Claim successful delivery and silently discard the message. # The matched header is logged with the optional text. # FILTER transport:nexthop # after the message is queued, the message is sent through # a content filter. This requires different cleanup servers # before and after the filter, with header/body checks turned # off in the second cleanup server. More info about content # filtering is in the Postfix FILTER_README file. This feature # overrides the main.cf content_filter setting. # # By default, these patterns apply the primary message headers, to # MIME headers, and to the headers of attached messages. With older # Postfix versions, MIME and attached message headers were treated # as body text. # header_checks = regexp:/etc/postfix/header_checks # The mime_header_checks specifies an optional table with patterns # that each MIME header is matched against. This applies to MIME # related headers in message headers, and to the headers that follow # multipart boundary strings. Headers may span multiple physical lines. # Patterns are matched in the specified order, and the search stops # upon the first match. # # For examples of pattern syntax see the sample-regexp-header.cf and # sample-pcre-header files. # # When a pattern matches, what happens next depends on the associated # action that is specified in the right-hand side of the table: # # REJECT [optional text...] # Reject the entire message. The optional text is sent to the # originator and is logged to the maillog file. # IGNORE Silently discard the body line # WARN [optional text...] # Log the body line and the optional text. This is useful # for testing. When the pattern is OK, change the WARN into a # REJECT or into a DISCARD. # HOLD [optional text...] # Place the message on the hold queue. Mail on hold can be # inspected with the postcat command, and can be destroyed or # taken off hold (i.e. delivered) with the postsuper command. # The matched body line is logged with the optional text. # DISCARD [optional text...] # Claim successful delivery and silently discard the message. # The matched body line is logged with the optional text. # FILTER transport:nexthop # after the message is queued, the message is sent through # a content filter. This requires different cleanup servers # before and after the filter, with header/body checks turned # off in the second cleanup server. More info about content # filtering is in the Postfix FILTER_README file. This feature # overrides the main.cf content_filter setting. # # By default, the same patterns are applied as for header_checks. # mime_header_checks = $header_checks # The nested_header_checks specifies an optional table with patterns # that each attached message header is matched against (except for # MIME related headers). Headers may span multiple physical lines. # Patterns are matched in the specified order, and the search stops # upon the first match. # # For examples of pattern syntax see the sample-regexp-header.cf and # sample-pcre-header.cf files. # # When a pattern matches, what happens next depends on the associated # action that is specified in the right-hand side of the table: # # REJECT the entire message is rejected. # REJECT text.... The text is sent to the originator. # IGNORE the header line is silently discarded. # WARN the header is logged (not rejected) with a warning message. # WARN text... as above, and the text is logged, too. # FILTER transport:nexthop # after the message is queued, the message is sent through # a content filter. This requires different cleanup servers # before and after the filter, with header/body checks turned # off in the second cleanup server. More info about content # filtering is in the Postfix FILTER_README file. This feature # overrides the main.cf content_filter setting. # # By default, the same patterns are applied as for header_checks. # nested_header_checks = $header_checks # The body_checks parameter specifies an optional table with patterns # that each physical line in the message body is matched against # (including MIME headers inside the message body - Postfix does not # recognize multi-line MIME headers in the message body). # Lines are matched one at a time. Long lines are matched in chunks # of at most $line_length_limit characters. Patterns are matched in # the specified order, and the search stops upon the first match. # # For examples of pattern syntax see the sample-regexp-body.cf and # sample-pcre-body.cf files. # # When a pattern matches, what happens next depends on the associated # action that is specified in the right-hand side of the table: # # REJECT the entire message is rejected. # REJECT text.... The text is sent to the originator. # IGNORE the body line is silently discarded. # WARN the body line is logged (not rejected) with a warning message. # WARN text... as above, and the text is logged, too. # FILTER transport:nexthop # after the message is queued, the message is sent through # a content filter. This requires different cleanup servers # before and after the filter, with header/body checks turned # off in the second cleanup server. More info about content # filtering is in the Postfix FILTER_README file. This feature # overrides the main.cf content_filter setting. # body_checks = regexp:/etc/postfix/body_checks # The body_checks_max_size parameter controls how much text in a # message body segment (or attachment, if you prefer to use that # term) is subjected to body_checks inspection. # # By default, only the first 50 kbytes of a message body segment are # inspected with body_checks patterns. # body_checks_max_size = 51200