My Postfix installation is currently just an email gateway and doing greylisting to drop most of the spam before it reaches our Exchange server, and relaying outgoing mail from the Exchange server.
One thing I'd really like to be able to do, is set up filters on outgoing email from the Exchange server. For example, let's say we have a secret project called "SecretProject", and we don't want anyone emailing someone on the outside world about it. I'd like to be able to set up a filter for outgoing mail that would scan all the messages for "SecretProject" with a regular expression, or even just a keyword.
Then, when a match is found, have Postfix silently refuse to deliver the email, and also drop a copy of it into a folder for examination. I'm not looking to have it scan attachments, as that'd probably be really difficult, but just a body check should be sufficient. How could I go about doing this?