The before-filter Postfix SMTP server accepts connections from the
Internet and does the usual relay access control, SASL authentication,
RBL lookups, rejecting non-existent sender or recipient addresses,
etc. The before-queue filter receives unfiltered mail content from
Postfix and does one of the following:
Re-inject the mail back into Postfix via SMTP, perhaps
after changing its content and/or destination.
Reject the mail by sending a suitable SMTP status code
back to Postfix. Postfix passes the status back to the remote
SMTP client. This way, Postfix does not have to send a bounce
The after-filter Postfix SMTP server receives mail from the
content filter. From then on Postfix processes the mail as usual.
The before-queue content filter described here works just like
the after-queue content filter described in the
document. In many cases you can use the same software, within the
limitations as discussed in the "
Cons" section below.