Skip to content

condredirect.1

Manvendra Bhangui edited this page Feb 25, 2024 · 8 revisions

NAME

condredirect - perhaps redirect mail to another address

SYNOPSIS

in .qmail: |condredirect [ -r ] newaddress program [ arg ... ]

DESCRIPTION

condredirect feeds each new mail message to program with the given arguments.

Without the -r option, if program exits 0, condredirect forwards the mail message to newaddress, and then exits 99, so further commands in .qmail are ignored.

With the -r option condredirect forwards the mail message to newaddress when program exits non-zero (other than 100 or 111) and then exits 99, so that further commands in .qmail are ignored.

If program exits 111, condredirect exits 111, so delivery will be retried later.

If program exits 100, condredirect exits 100, so delivery will be discarded and mail bounced back to the sender.

Without the -r option, if program exits anything else (or doesn't exist), condredirect exits 0, so the rest of .qmail will be processed as usual.

With the -r option, if program exits anything else (or doesn't exist), **condredirect forwards the mail message to **newaddress and then exits 99, so further commands in .qmail are ignored. If program exits 0, condredirect also exits 0, so that the rest of .qmail will be processed as usual.

Note that it is not safe for program to fork a child that reads the message in the background.

If running as non-root, condredirect uses environment set according to files in $HOME/.defaultqueue directory. You can skip $HOME/.defaultqueue if SKIP_LOCAL_ENVIRONMENT is set. If QUEUE_BASE environment variable is not set, it additionally uses environment set according to files in /etc/indimail/control/defaultqueue directory (for any uid).

WARNING: If you create a .qmail file to enable condredirect, make sure to also add a line specifying delivery to your normal mailbox.

condredirect rewrites the sender using Sender Rewriting Scheme if SRS** has been configured. See indimail-srs**(5) for information on how to do this.

SEE ALSO

ifaddr(1), iftocc(1), iftoccfrom(1), bouncesaying(1), condtomaildir(1), dot-qmail(5), filterto(1), except(1), dot-forward(1), fastforward(1), forward(1), printforward(1), setforward(1), preline(1), qmail-command(8), qnotify(1), qreceipt(1), replier(1), rrforward(1), indimail-srs(5), qmail-queue(8),

Clone this wiki locally