On 08/11/2010 09:46 AM, Paul Hutchings wrote:
I have a box running Postfix& MailScanner.
I'd like to be able to say "If a message comes from XYZ and has Word or
PDF attachments and they contain the word ABC,<action>".
I'm sure this can be done, I doubt it's a Postfix feature, but I'm
unsure of the best (and easiest for someone like myself) product to be
looking at that hooks into Postfix, so any suggestions would be
appreciated.
Mailscanner is written in Perl? You'll have to do some hacking, but you
can probably just pass the attachments to antiword[1] or pdftotext[2]
and then match the result against a regular expression.
You could also look at writing your own content filter which would do
the same thing in e.g. shell script.
[1] http://www.winfield.demon.nl/
[2] http://poppler.freedesktop.org/