Skip to content

condtomaildir.1

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

NAME

condtomaildir - feed message to program and perhaps store message

SYNOPSIS

in .qmail: |condtomaildir [ -r ] dir program [ arg ... ]

where dir is a Maildir-format directory and program is one or more arguments specifying a program to run for each message.

DESCRIPTION

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

Without the -r option, if program exits 0, condtomaildir writes the email message to dir, and then exits 99, so further commands in .qmail are ignored.

With the -r option condtomaildir writes the email message to dir 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, condtomaildir exits 111, so delivery will be retried later.

If program exits 100, condtomaildir 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), condtomaildir 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), **condtomaildir writes the mail message to **dir and then exits 99, so further commands in .qmail are ignored. If program exits 0, condtomaildir also exits 0, so that the rest of .qmail will be processed as usual.

If condtomaildir encounters a permanent error in handling a message or writing to dir, or if the maildir quota is exceeded, condtomaildir exits 100. If it encounters a temporary error in handling a message or writing to dir, condtomaildir exits 111.

If condtomaildir encounters a permanent error attempting to run prog, it exits 100. If condtomaildir encounters a temporary error in attempting to run prog, it exits 111.

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 condtomaildir, make sure to also add a line specifying delivery to your normal mailbox.

SEE ALSO

ifaddr(1), iftocc(1), iftoccfrom(1), bouncesaying(1), condredirect(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), qmail-queue(8)

Clone this wiki locally