3 setforward \- create a forwarding database
10 reads a table of forwarding instructions from its standard input.
11 It converts the table into a forwarding database.
12 The forwarding database can be used by
16 writes the forwarding database to
25 must be on the same filesystem.
27 If there is a problem creating
34 The forwarding database format is portable across machines.
35 .SH "INSTRUCTION FORMAT"
36 A forwarding instruction contains a
38 a colon, a series of commands, and a semicolon.
40 .I recipient address\fR,
42 .I external mailing list\fR,
45 Commands are separated by commas.
50 root@yp.to: god@heaven.af.mil, staff@af.mil;
55 should be forwarded to the recipient addresses
62 sees # it ignores all text from # to the end of the line:
69 ignores all other line endings,
70 so you can split a forwarding instruction across lines.
71 It also ignores spaces and tabs.
73 you can put a space (or tab or comma or whatever)
74 into a target or command by putting a backslash in front of it.
75 (However, NUL bytes are not permitted anywhere.)
79 sees the incoming address
81 it tries three targets:
86 It obeys the commands for the first target that it finds.
87 Target names are interpreted without regard to case.
89 All the commands for a single target must be listed in a single instruction.
90 Exception: an owner address can be listed in a separate instruction.
91 .SH "RECIPIENT ADDRESSES"
92 If a command begins with an ampersand,
94 takes the remaining bytes in the command as a recipient address:
97 boss@yp.to: &god@heaven.af.mil;
101 sends each incoming mail message
102 to the recipient address.
103 The recipient address must include a fully qualified domain name.
104 It cannot be longer than 800 bytes.
106 If a recipient address is itself a target in the forwarding table,
108 will recursively handle the instructions for that target.
113 wildcards do not apply here;
114 they apply only to the incoming address.
116 If a command begins with a letter or number,
118 takes the entire command as a recipient address:
121 boss@yp.to: god@heaven.af.mil;
123 .SH "OWNER ADDRESSES"
124 If a command begins with a question mark,
126 takes the remaining bytes in the command as an owner address:
129 sos@heaven.af.mil: ?owner-sos@heaven.af.mil;
133 uses that address as the envelope sender for forwarded mail,
134 so bounces will go back to that address.
135 (Normally, if a message is forwarded to a bad address,
136 it will bounce back to the original envelope sender.)
137 .SH "EXTERNAL MAILING LISTS"
138 If a command begins with a dot or slash,
140 takes the entire command as the name of a binary mailing list file created by
144 sos@heaven.af.mil: /etc/lists/sos.bin;
148 will read and obey the commands in that file.
149 The file must be world-readable
153 If a command begins with a vertical bar or exclamation point,
155 takes the rest of the command as the name of a program to run:
165 An exclamation point works the same way except that
172 in front of the message.
176 is building the recipient list for a message,
177 it keeps track of the recipient addresses and external mailing lists
179 If the same command shows up again, it skips it.
183 everybody@yp.to: programmers@yp.to, testers@yp.to;
184 programmers@yp.to: joe@yp.to, bob@yp.to;
185 testers@yp.to: joe@yp.to, fred@yp.to;
193 (This also means that addresses in an internal forwarding loop
197 If a target has an owner address,
198 commands for that target are considered different
199 from commands for ``outside'' targets.