Configure postfix to filter email into hold queue
- by Ian
Hey,
I would like postfix to send all emails received on SMTP off to an
external process, which will decide whether to allow them through as
normal, or whether to put them into the hold queue (or another
quarantine area), where they have to wait for admin approval.
I was thinking of doing this with an after-queue content filter, which
uses pipe(8) to run a script on each message, and the script itself
will spawn "postsuper -h " if it decides to put the message
on hold.
Then the admin can do postsuper -d or -r to delete or pass the message
on as appropriate.
So, my questions are - a) will this work, and b) is this the best way
to do it? Would a milter or another type of content filter be a better
approach?