Now that we have covered all the basics of setting up rules, analyzing e-mails, and generally seeing how all of the processing operations interact, we will look through a couple of examples for system-wide filtering, testing, and operations.
In Chapter 9, we will see how to integrate a complete virus checking system into the Postfix mail architecture. This will perform accurate virus signature recognition and add suitable flags to the mail headers to indicate if a virus is present in the mail. However, if it is not possible to set up such a system, this rule will provide an alternative but more brutal approach to block all e-mails with executable attachments.
If you place the following in /etc/procmailrc
, it will affect all mail traveling through the system that contains certain types of documents as attachments.
# Note: The whitespace in the [ ] in the code comprises a space and a tab character :0 * < 256000 * ! ^Content-Type: text/plain { :0B ...