On Wed, Jan 05, 2011 at 10:02:12PM +0000, Ian Halperin wrote: > > > 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 <queue_id>" if it decides to put the message > > > on hold. > > > > No this is wrong. Just tag the message, and put appropriate header_checks > > in the post-filter Postfix smtpd+cleanup. > > > > Viktor, thanks for the advice. Would this mean that I need to implement a > server with a SMTP interface to act as a proxy? Currently I just have a > script that makes a decision, so ideally I'm trying to keep it simple.
A script is fine if its performance and security meet your needs. The script can add headers in the same way that an SMTP proxy would and then send the message unconditionally to the nexthop MTA. > Also, ideally I would like this to be totally transparent, so adding header > tags is undesirable. The header tags can be stripped when messages are released, or even as they enter the quarantine, via header checks in the quaratnine instance. It all depends on what useful information the tags contain, and where in the processing pipeline you can afford to lose any such information. -- Viktor.