replier(1)

NAME

replier - automatically respond to messages

SYNOPSIS

In .qmail:

    | replier _dir_ _address_ _prog_

DESCRIPTION

The replier program changes the working directory to _dir_, executes _prog_ with a message on standard input, and forwards the standard output from _prog_ to _address_. It adds a Mailing-List field to the message headers with the contents of _dir_ /mailinglist. It rejects the message if there is already a Mailing-List field. It adds to the message all fields listed in _dir_ /headeradd, followed by an appropriate Delivered-To line. It deletes from the message any fields with names listed in _dir_ /headerremove. It performs its header editing on the output from _prog_.

If _prog_ exits 0, then replier forwards the message to _address_ and exits 99. If prog exits 111, replier exits 111. If prog exits anything else, or does not exist, replier exits 0.

The replier program does not distribute bounce messages: if the environment variable $SENDER is set, and is either empty or #@[], then replier rejects the message.

  Environment variables

The replier program supplies several environment variables to prog. The recipient address that caused message processing by replier has one of two forms: _inlocal_ - _request_ @ _domain_, where _inlocal_ matches the first line of _dir_ /inlocal, or _request_ @ _domain_, when _dir_ /inlocal has an empty first line. In either case, replier sets the following environment variables:

NB : These environment variables are not quoted. They are under the control of the sender.

$REQUEST

The _request_ portionh of the recipient address.

$REQUEST2

The portion of _request_ in the recipient address that follows the first hyphen.

$REQUEST3

The portion of _request_ in the recipient address that follows the second hyphen.

$REQUEST4

The portion of _request_ in the recipient address that follows the third hyphen.

EXIT STATUS

If it encounters a permanent error in handling a message, replier exits 100. If it encounters a temporary error a message, replier exits 111.

AUTHOR

William Baxter <sst@superscript.com>

Version 0.56
Last updated 2015-08-23 23:24:43 CDT