# Sample regexp message header filter lookup "table". See regexp_table(5) # for a description of the syntax. # # Message headers are filtered one at a time. This filter understands # multi-line mail headers, including MIME headers in the message 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 discard the message header. # 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 together with the optional text. # DISCARD [optional text...] # Claim successful delivery and silently discard the message. # The matched header 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. /^Subject: Make Money Fast/ REJECT /^To: friend@public.com/ REJECT