Skip to content

replier config.1

Manvendra Bhangui edited this page Nov 22, 2023 · 2 revisions

NAME

replier-config - The replier-config Program

SYNOPSIS

replier-config dir dot local host [ outlocal [ outhost ] ]

where dir is a directory, dot is a .qmail file, local is the local portion of an email address, and host is a host name, outlocal is either the local portion of an email address or the empty string, and outhost is a host name. The directory dir must begin with a slash. If outlocal is not present, replier-config sets it to local. If outhost is not present, replier-config sets it to host.

If outlocal is not empty, replier-config creates a new email replier at the address outlocal-help@outhost

If outlocal is empty, replier-config creates a new email replier at the address help@outhost

In either case, replier-config sets up two .qmail files to control the help-address replier: dot-help and dot-return-default . These files should control messages to the addresses outlocal-help@outhost and outlocal-return-@outhost , respectively (or help@outhost and return-@outhost if outlocal is empty).

Within dir , replier-config creates several configuration files for replier.

The first line of dir/inlocal consists of local .

The first line of dir/inhost consists of host .

The first line of dir/outlocal consists of outlocal .

The first line of dir/outhost consists of outhost.

The first line of dir/mailinglist consists of contact helpaddress; run by replier, where helpaddress is the help address created by replier-config as described above.

The dir/headerremove file contains

return-path

return-receipt-to

content-length

The dir/headeradd file contains

Precedence: bulk

The dir/text/help file contains text sent in response to messages received at the help address.

Typical usage

To configure a replier at the address [email protected], the user joe issues the command

replier-config ~/replier ~/.qmail-replier joe-replier example.com

If email to [email protected] is delivered to [email protected], the following command may be appropriate to configure a replier at [email protected]:

replier-config ~/replier ~/.qmail-replier joe-replier joehost.example.com joe-replier example.com

If the user replier handles mail for the virtual domain replier.example.com, then the following command creates a replier at [email protected]:

replier-config ~/replier ~/.qmail replier example.com ""

Adding replier addresses

To add a new replier address that filters only the body of a message, edit the dir/bodyfilter shell script and add a new case corresponding to the new address. Then create a symbolic link from dir/qmail-bodyfilter to the .qmail file that controls the new address. That's it!

Adding a command to filter the message header is entirely analagous, but use dir/headerfilter and dir/qmail-headerfilter, while entire-message filters use dir/msgfilter and dir/qmail-msgfilter.

Bounce handling

By default, a replier created with replier-config silently throws away bounce messages. The .qmail file controlling bounces is a symbolic link pointing to dir/bouncer. Edit dir/bouncer to change the treatment of bounce messages.

Examples

as .qmail commands Save messages to [email protected]:

| condtomaildir ./Test ifaddr to cc : [email protected]

Save messages to or from @example.com:

| condtomaildir ./Test ifaddr to cc from : @example.com

Save a message if it was addressed to [email protected]:

| condtomaildir ./Test iftocc [email protected]

Email-based servers

This section provides several examples of email servers based on qtools. These are simple-minded servers, designed only to demonstrate methods of providing services, and not as examples of useful services.

help: Fetch help information on the available email filters.

cat: Return a copy of the original message.

foldlines-20: Fold lines in the message body to 20 characters and return the result.

presubject-OK: Add [OK] to the beginning of the Subject line of the message and send back the result.

revline: Reverse each line of the message body (after folding lines to 1024 characters) and send back the result.

rot13: Apply rot13 encoding to the message body and send back the result.

You can download the scripts for this example replier. The qtools package includes the programs required for the examples above, but does not install them.

Documentation for the programs used in the examples is available here.

Clone this wiki locally