Dan Melomedman writes:
Use qmail-qfilter. Works great.
I recommend using a dedicated attachment scanner, instead of trying to parse
attachments directly from maildrop. maildrop does not have the requisite
MIME support in order to properly parse through MIME attachment files. You
could probably throw something together by running reformime from maildrop,
with some additional crafy scripting, which would work fine for a system
with a few small mailboxes, and little mail traffic, but I don't think this
would be feasible for larger systems.
Although the technical details of adding proper MIME support to maildrop are
not that difficult, I can't really think of how to access MIME information
from within maildrop's simple filtering language. The language will need to
support arrays and structures, in order to access MIME information in a sane
way.
One possibility is to have a while loop-type construct that iterates through
the message's MIME hierarchy, a pre-order or in-order transversal, and on
each iteration through the loop initialize common variables based on the
contents of the mime headers.