Skip to content

filterto.1

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

NAME

filterto - perhaps redirect mail to another address

SYNOPSIS

in .qmail: | filterto address prog [ arg ... ] where address is an email address, and prog is one or more arguments specifying a program to run for each message.

DESCRIPTION

filterto feeds each new mail message to program with the given arguments. If prog exits 0, filterto forwards the standard output from prog to address, and then exits 99, so further commands in .qmail are ignored.

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

If program exits anything else (or does not exist), filterto exits 0, so 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.

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

If running as non-root, filterto 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).

SEE ALSO

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

Clone this wiki locally