El 2015-03-09 21:31, Roger Walters escribió:
Hello,
I have a few chained content filters based on pipe, so when the first
script ends its task, it sends the processed headers to the second
script and so on.
It is clear how to get the content back to Postfix as an input, using
the sendmail command. My question is how can the last content filter
tell to Postfix that the message has been put on hold, has been
temporarily or permanently rejected?
When one has just one content filter I know that it's enough to print
the command using some sprintf-like function, but I don't know how to
do it when there are many chained content filters.
Any idea?
Thank you.
I don't know if it's the best way to go (not even if it should work) but
you could add a header in the last content filter and add an entry in
the header_checks table so that e-mail is put on hold/rejected/etc, and
use the same sendmail command you use to reinject the e-mail to Postfix.
Something like:
header_checks = regex:/etc/postfix/header_checks
/etc/postfix/header_checks:
^Your-Header-Definition$ HOLD This mail must be revised
Regards,
Nicolás