NetBSD/gnu/dist/postfix/conf/sample-regexp-body.cf

56 lines
2.6 KiB
CFEngine3

# $NetBSD: sample-regexp-body.cf,v 1.3 2003/03/08 19:43:58 perry Exp $
#
# Sample regexp message body filter lookup "table". See regexp_table(5)
# for a description of the syntax.
#
# Mail body lines are filtered one line at a time. MIME headers are
# filtered as message headers, i.e. not as part of the mail body.
#
# The general format of a table entry is PATTERN RESULT.
#
# The pattern format is `/regexp/flags' or `!/regexp/flags' where regexp
# is a regular expression as found in re_format(7), and flags are
# i: toggle ignore case (REG_ICASE - default is to ignore case)
# x: toggle extended expression (REG_EXTENDED - default is extended)
# m: toggle multiline mode (REG_NEWLINE - default is non-multiline mode)
#
# In order for a line to match, the regexp must match. If the regexp
# is prefixed with !, it must not match. The first line with a successful
# (non)match wins, terminating processing of the ruleset.
#
# A block of table entries may be "enclosed" by a line with `if
# /pattern/flags' or `if !/pattern/flags' and a line with `endif'.
# This causes the block of table entries to be examined only when
# the pattern produces a successful (non)match. The `if..endif' may
# be nested. There currently is no `else' operator.
#
# The result is one of the following:
# REJECT [optional text...]
# Reject the entire message. The optional text is sent to the
# originator and is logged to the maillog file.
# IGNORE Silently ignore 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 together with the optional text.
# DISCARD [optional text...]
# Claim successful delivery and silently discard the message.
# The matched body line is logged together with the optional text.
# FILTER transport:nexthop
# After the message is queued, send the entire message 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. This overrides the main.cf
# content filter setting.
# Skip over base 64 encoded blocks. This saves lots of CPU cycles.
# Expressions by Liviu Daia. Amended by Victor Duchovni.
~^[[:alnum:]+/]{60,}[[:space:]]*$~ OK
# Your own body patterns go here.