Content-Checking
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_checksfor message headersmime_header_checksfor MIME headersnested_header_checksfor attached message headersbody_checksfor 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.
Content Checking Configuration
By default mime_header_checks and nested_header_checks use the same lookup
tables as header_checks. If you want to distinguish checks for each one, you can
configure them separately; otherwise, configuring header_checks causes mime_header_checks and nested_header_checks to use the same
patterns as 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access