3 dot-qmail \- control the delivery of mail messages
7 program delivers each incoming message to your system mailbox,
8 .IR homedir\fB/Mailbox ,
11 is your home directory.
14 write the mail to a different file or directory,
15 forward it to another address,
16 distribute it to a mailing list,
17 or even execute programs,
18 all under your control.
24 file in your home directory.
27 contains one or more lines.
28 Each line is a delivery instruction.
30 follows each instruction in turn.
31 There are five types of delivery instructions:
32 (1) comment; (2) program; (3) forward; (4) mbox; (5) maildir.
35 A comment line begins with a number sign:
45 A program line begins with a vertical bar:
48 |preline /usr/ucb/vacation djb
52 takes the rest of the line as a command to supply to
56 for further information.
59 A forward line begins with an ampersand:
66 takes the rest of the line as a mail address;
69 to forward the message to that address.
70 The address must contain a fully qualified domain name;
71 it must not contain extra spaces, angle brackets, or comments:
74 # the following examples are WRONG
82 &me@new.job.com (New Address)
85 If the address begins with a letter or number,
86 you may leave out the ampersand:
96 line when forwarding messages.
101 line begins with a slash or dot,
102 and does not end with a slash:
105 /home/djb/Mailbox.sos
109 takes the entire line as a filename.
110 It appends the mail message to that file,
113 file locking if possible.
115 stores the mail message in
117 format, as described in
122 anyone who can read a file can
127 Do not deliver mail to a publicly accessible file!
131 is able to lock the file, but has trouble writing to it
132 (because, for example, the disk is full),
133 it will truncate the file back to its original length.
134 However, it cannot prevent mailbox corruption if the system
135 crashes during delivery.
140 line begins with a slash or dot,
141 and ends with a slash:
148 takes the entire line as the name of a directory in
151 It reliably stores the incoming message in that directory.
158 has the execute bit set,
159 it must not contain any
169 it will stop and indicate a temporary failure.
173 is completely empty (0 bytes long), or does not exist,
177 instructions set by your system administrator;
184 appends the mail message to
191 may contain extra spaces and tabs at the end of a line.
192 Blank lines are allowed, but not for the first line of
197 is world-writable or group-writable,
199 stops and indicates a temporary failure.
200 .SH "SAFE QMAIL EDITING"
201 Incoming messages can arrive at any moment.
202 If you want to safely edit your
204 file, first set the sticky bit on your home directory:
211 will temporarily defer delivery of any message to you
212 if your home directory is sticky
213 (or group-writable or other-writable,
214 which should never happen).
222 It's a good idea to test your new
227 qmail-local -n $USER ~ $USER '' '' '' '' ./Mailbox
229 .SH "EXTENSION ADDRESSES"
233 you control all local addresses of the form
234 .IR user\fBBREAK\fIanything ,
235 as well as the address
240 is your account name.
242 .I user\fBBREAK\fIanything
243 is controlled by the file
244 .IR homedir/\fB.qmail\-\fIanything .
245 (These rules may be changed by the system administrator;
247 .BR qmail-users (5).)
251 user controls all other addresses.
254 is controlled by the file
255 .IR homedir/\fB.qmail\-\fIlocal ,
262 In the following description,
264 is handling a message addressed to
270 Here is what it does.
278 instructions set by your system administrator.
284 will try some default
296 .BR .qmail-foo-default ,
299 If none of these exist,
301 will bounce the message.
302 (Exception: for the basic
316 with colons before checking
320 converts any uppercase letters in
326 forwards a message as instructed in
329 .BR .qmail-default ),
331 .B .qmail\-\fIext\fB-owner\fP
335 .I local\fB-owner@\fIdomain
336 as the envelope sender for the forwarded message.
337 Otherwise it retains the envelope sender of the original message.
340 always retains the original envelope sender
341 if it is the empty address or
343 i.e., if this is a bounce message.
347 .B variable envelope return paths
350 .B .qmail\-\fIext\fB-owner\fP
352 .B .qmail\-\fIext\fB-owner-default\fP
354 .I local\fB\-owner\-@\fIdomain\fB-@[]
355 as the envelope sender.
356 This will cause a recipient
357 .I recip\fB@\fIreciphost
358 to see an envelope sender of
359 .IR local\fB\-owner\-\fIrecip\fB=\fIreciphost\fB@\fIdomain .
361 If a delivery instruction fails,
363 stops immediately and reports failure.
365 handles forwarding after all other instructions,
366 so any error in another type of delivery will prevent all forwarding.
368 If a program returns exit code 99,
370 ignores all succeeding lines in
372 but it still pays attention to previous forward lines.
374 To set up independent instructions,
375 where a temporary or permanent failure in one instruction
376 does not affect the others,
377 move each instruction into a separate
379 file, and set up a central
381 file that forwards to all of the
382 .BR .qmail\-\fIext s.
385 can handle any number of forward lines simultaneously.