The last chance you have to reject a message from Postfix directly is by checking the contents of the message itself. Postfix offers simple content checking through the parameters:
header_checks for message headers
for MIME headers
for attached message headers
body_checks for the body of a message
These checks are an all-or-nothing feature with Postfix. There is no way to bypass checks for certain senders or recipients. For more sophisticated analysis, you should use a separate content filter specifically designed to detect spam. See Chapter 14 for more information on using filters with Postfix.
Each parameter points to a lookup table containing regular expression patterns and actions. The patterns are compared to strings within email messages. If Postfix finds a match, the specified action is executed. By default regular expression checking is not case-sensitive. See Chapter 4 for information on using regular expressions with Postfix lookup tables.
nested_header_checks use the same lookup
header_checks. If you want to distinguish checks for each one, you can
configure them separately; otherwise, configuring
nested_header_checks to use the same
header_checks. When you
assign the checking parameters, indicate both the lookup table and which type of regular expression you
are using (see Chapter 4 ...