Manual Reference Pages - SETFORWARD (1)
setforward - create a forwarding database
setforward reads a table of forwarding instructions from its standard input.
It converts the table into a forwarding database.
The forwarding database can be used by
setforward writes the forwarding database to
tmp; it then moves
cdb must be on the same filesystem.
If there is a problem creating
setforward complains and leaves
The forwarding database format is portable across machines.
A forwarding instruction contains a
target, a colon, a series of commands, and a semicolon.
Each command is a
external mailing list, or
program. Commands are separated by commas.
email@example.com: firstname.lastname@example.org, email@example.com;
says that mail for
firstname.lastname@example.org should be forwarded to the recipient addresses
setforward sees # it ignores all text from # to the end of the line:
# this is a comment
setforward ignores all other line endings,
so you can split a forwarding instruction across lines.
It also ignores spaces and tabs.
you can put a space (or tab or comma or whatever)
into a target or command by putting a backslash in front of it.
(However, NUL bytes are not permitted anywhere.)
fastforward sees the incoming address
email@example.com, it tries three targets:
user@. It obeys the commands for the first target that it finds.
Target names are interpreted without regard to case.
All the commands for a single target must be listed in a single instruction.
Exception: an owner address can be listed in a separate instruction.
If a command begins with an ampersand,
setforward takes the remaining bytes in the command as a recipient address:
fastforward sends each incoming mail message
to the recipient address.
The recipient address must include a fully qualified domain name.
It cannot be longer than 800 bytes.
If a recipient address is itself a target in the forwarding table,
fastforward will recursively handle the instructions for that target.
user@ wildcards do not apply here;
they apply only to the incoming address.
If a command begins with a letter or number,
setforward takes the entire command as a recipient address:
If a command begins with a question mark,
setforward takes the remaining bytes in the command as an owner address:
fastforward uses that address as the envelope sender for forwarded mail,
so bounces will go back to that address.
(Normally, if a message is forwarded to a bad address,
it will bounce back to the original envelope sender.)
EXTERNAL MAILING LISTS
If a command begins with a dot or slash,
setforward takes the entire command as the name of a binary mailing list file created by
fastforward will read and obey the commands in that file.
The file must be world-readable
and accessible to
If a command begins with a vertical bar or exclamation point,
setforward takes the rest of the command as the name of a program to run:
For a vertical bar,
fastforward feeds the message
to that program.
An exclamation point works the same way except that
$DTLINE in front of the message.
fastforward is building the recipient list for a message,
it keeps track of the recipient addresses and external mailing lists
it has used.
If the same command shows up again, it skips it.
firstname.lastname@example.org: email@example.com, firstname.lastname@example.org;
email@example.com: firstname.lastname@example.org, email@example.com;
firstname.lastname@example.org: email@example.com, firstname.lastname@example.org;
A message to
email@example.com will be sent to
firstname.lastname@example.org only once.
(This also means that addresses in an internal forwarding loop
If a target has an owner address,
commands for that target are considered different
from commands for outside targets.
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.