qmail-command(8)

NAME
qmail-command - user-specified mail delivery program

SYNOPSIS
in .qmailext: |command

DESCRIPTION
qmail-alias will, upon your request, feed each incoming mail message through a program of your choice. When a mail message arrives, qmail-alias runs sh -c command in your home directory. It makes the message available on command's standard input. WARNING: The mail message does not begin with qmail-alias's usual Return-Path and Delivered-To lines. Note that qmail-alias uses the same file descriptor for every delivery in your .qmail file, so it is not safe for command to fork a child that reads the message in the background while the parent exits. command's exit codes are interpreted as follows: 0 means that the delivery was successful; 99 means that the delivery was successful, but that qmail-alias should ignore all further delivery instructions; 71, 74, 75, or 111 means that the delivery failed but should be tried again in a little while; anything else means that the delivery failed permanently. qmail-alias supplies several useful environment variables to command. SENDER is the envelope sender address. NEWSENDER is the forwarding envelope sender address, as described in qmail-alias(8). RECIPIENT is the envelope recipient address, userext@domain. USER is user. HOME is your home directory, homedir. HOST is the domain part of the recipient address. EXTENSION is ext. USEREXT is userext. DTLINE and RPLINE are the usual Delivered-To and Return-Path lines, including newlines. Exceptions: When ext is nonempty and does not begin with a hyphen, USEREXT is ext and RECIPIENT is ext@domain. WARNING: These environment variables are not quoted. They may contain special characters. They are under the control of a possibly malicious remote user.

SEE ALSO
envelopes(5), qmail-alias(8)