Debianization.
[dot-forward] / dot-forward.1
1 .TH dot-forward 1
2 .SH NAME
3 dot-forward \- read a .forward file under qmail
4 .SH SYNOPSIS
5 in
6 .BR ~/.qmail :
7 .B | dot-forward
8 [
9 .B \-nN
10 ]
11 .I file ...
12 .SH OVERVIEW
13 .B dot-forward
14 forwards incoming messages according to
15 sendmail-style
16 instructions in
17 .IR file ,
18 if
19 .I file
20 exists.
21 Normally
22 .I file
23 is
24 .BR .forward .
25
26 .B WARNING:
27 If you create a
28 .B .qmail
29 file to enable
30 .BR dot-forward ,
31 make sure to add a second line specifying delivery to your normal mailbox.
32 For example:
33
34 .EX
35 |dot-forward .forward
36 .br
37 ./Mailbox
38 .EE
39
40 .B COMPATIBILITY WARNING:
41 .B dot-forward
42 does not support
43 .B :include:
44 or mbox deliveries.
45 You can use the delivery mechanism described in
46 .BR dot-qmail (5)
47 instead.
48 .SH OPTIONS
49 .TP 5
50 .B \-N
51 (Default.)
52 Read and forward a message.
53 .TP
54 .B \-n
55 Parse
56 .I file
57 and print the forwarding instructions in it, one per line;
58 do not follow the instructions.
59 You can use this option from the command line to see how your
60 .B .forward
61 file will be interpreted:
62
63 .EX
64 dot-forward -n .forward
65 .EE
66 .SH "FILE HANDLING"
67 When a message arrives,
68 .B dot-forward
69 opens
70 .I file
71 and handles it as discussed below.
72 It exits 99, so
73 .B qmail-local
74 will ignore further instructions in
75 .BR .qmail .
76 Exception: If
77 .I file
78 specifies delivery directly to you,
79 .B dot-forward
80 exits 0, so
81 .B qmail-local
82 will read further instructions in
83 .BR .qmail .
84
85 If
86 .I file
87 does not exist,
88 .B dot-forward
89 exits 0.
90 You can list several
91 .IR file s;
92 then
93 .B dot-forward
94 will try each one in turn,
95 using the first one that exists,
96 or exiting 0 if none exist.
97
98 .B COMPATIBILITY WARNING:
99 .B dot-forward
100 treats an empty
101 .I file
102 as if it did not exist.
103 Versions of
104 sendmail
105 before V8 would throw away the incoming message.
106
107 .B COMPATIBILITY WARNING:
108 If
109 .B dot-forward
110 encounters a temporary error opening
111 .IR file ,
112 it exits 111, so that
113 .B qmail-local
114 will try again later.
115 sendmail
116 assumes incorrectly that
117 .I file
118 does not exist.
119
120 .B COMPATIBILITY WARNING:
121 .I file
122 must be readable by
123 .BR dot-forward ,
124 which is normally running as the user.
125 sendmail
126 places different constraints on its
127 .B .forward
128 permissions,
129 since it is normally running as root.
130 .SH "FORWARDING"
131 Normally
132 .I file
133 contains an address.
134 .B dot-forward
135 forwards the message to that address.
136
137 The address is parsed as if it were in an RFC 822 message header.
138 Parenthesized comments and bracketed addresses are permitted:
139
140 .EX
141 bob (Bob, the postmaster) @heaven.af.mil
142 .EE
143
144 Addresses with special characters must be quoted:
145
146 .EX
147 "spaced out mailbox"@heaven.af.mil
148 .EE
149
150 Address groups are not permitted.
151
152 .I file
153 can contain any number of lines,
154 each line containing any number of addresses.
155 .B dot-forward
156 forwards the message to each address:
157
158 .EX
159 bob, fred, susan
160 .br
161 Joe Shmoe <shmoe@heaven.af.mil>
162 .EE
163
164 An address without a fully qualified domain name is handled
165 as described in
166 .BR qmail-header (5).
167 Exception: Certain addresses without domain names are handled specially,
168 as described below.
169 .SH "DIRECT DELIVERY"
170 If an address does not contain a domain name,
171 and matches the environment variable
172 .B $USER
173 (without regard to case),
174 it specifies delivery directly to you.
175
176 If an address matches
177 .B $USER@$HOST
178 (without regard to case),
179 it specifies delivery directly to you.
180
181 .B COMPATIBILITY WARNING:
182 sendmail's
183 handling of quotes and backslashes violates RFC 821 and RFC 822,
184 and is not supported by
185 .BR dot-forward .
186 .B dot-forward
187 treats
188 .B \ejoe
189 the same way as
190 .BR joe .
191 The
192 .B dot-qmail
193 delivery mechanism
194 lets each user manage several addresses,
195 so there is no need for a special syntax to get around forwarding.
196 .SH "COMMANDS"
197 If an address does not contain a domain name,
198 and begins with a vertical bar,
199 .B dot-forward
200 takes the rest of the address as a command to run:
201
202 .EX
203 bob, "|vacation bob"
204 .EE
205
206 .B dot-forward
207 feeds the message to the command,
208 preceded by the environment variables
209 .BR $UFLINE ,
210 .BR $RPLINE ,
211 and
212 .BR $DTLINE .
213
214 .B COMPATIBILITY WARNING:
215 Internet addresses can legitimately start with a slash or vertical bar.
216 .B dot-forward
217 treats anything with an unquoted @ as an address.
218 sendmail
219 appears to have various problems coping with these addresses,
220 and with commands that contain @ signs.
221 .SH "COMMENTS"
222 Any line in
223 .I file
224 that begins with # is ignored:
225
226 .EX
227 # this is a comment
228 .EE
229
230 .B COMPATIBILITY WARNING:
231 Versions of
232 sendmail
233 before V8 did not allow comments in
234 .B .forward
235 files.
236 .SH VERSION
237 This is
238 .B dot-forward
239 0.71.
240 The
241 .B dot-forward
242 home page is
243 .BR http://pobox.com/~djb/dot-forward.html .
244 .SH "SEE ALSO"
245 qmail-header(5),
246 dot-qmail(5)