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