QMAIL-QFILTER-QUEUE(8)

NAME
qmail-qfilter-queue - run a sequence of pre-queue filters

SYNOPSIS
qmail-qfilter-queue

DESCRIPTION
qmail-qfilter-queue runs an administrator-defined sequence of filters before calling qmail-queue. Filters will be run by qmail-qfilter and must adhere to that interface. If any filter rejects, the message is rejected.

qmail-qfilter-queue is most commonly invoked from qmail-smtpd and ofmipd, so that incoming and submitted messages are filtered before entering the queue.

ENVIRONMENT VARIABLES
To have qmail-smtpd and/or ofmipd invoke qmail-qfilter-queue in place of qmail-queue, set QMAILQUEUE to /var/qmail/bin/qmail-qfilter-queue in your tcpserver's tcprules (and rebuild the CDB).

To have qmail-qfilter-queue filter messages before they reach the queue, also set QMAILQUEUEFILTERS to the relevant control file (and rebuild the CDB).

CONTROL FILES
qmail-qfilter-queue expects a sequence of filter programs. Typical values for QMAILQUEUEFILTERS:

control/smtpfilters
    For incoming messages.

control/ofmipfilters
    For submitted messages.

Filter programs must be listed one per line, with no arguments. Changing the sequence takes effect immediately, no restart required. If the control file is empty, contains only comments, or doesn't exist, messages are passed to qmail-queue.

ERRORS
Some typical SMTP error messages and their likely causes:

451 mail server temporarily rejected message (#4.3.0)
    qmail-qfilter is not installed in $PATH.

451 qq internal bug (#4.3.0)
    The control file lists a program that doesn't exist or otherwise can't be executed.

EXAMPLES
See https://schmonz.com/qmail/rejectutils.

AUTHOR
Amitai Schleier <schmonz-web-rejectutils@schmonz.com>

SEE ALSO
qmail-queue(8), qmail-qfilter(1), qmail-smtpd(8), ofmipd(8), tcpserver(1), qmail-qfilter-viruscan(8), qmail-qfilter-addtlsheader(8).