qmail-command(8)</STRONG> for further information. (3) A forward line begins with an ampersand: &me@new.job.com <STRONG>qmail-alias</STRONG> takes the rest of the line as a mail address; it uses <STRONG>qmail-queue</STRONG> to forward the message to that address. The address must contain a fully qualified domain name; it must not contain extra spaces, angle brackets, or comments: # the following examples are WRONG &me@new &<me@new.job.com> & me@new.job.com &me@new.job.com (New Address) If the address begins with a letter or number, you <STRONG>WARNING:</STRONG> On many systems, anyone who can read a file can <STRONG>flock</STRONG> it, and thus hold up <STRONG>qmail-alias</STRONG>'s delivery forever. Do not deliver mail to a publicly accessi- ble file! If <STRONG>qmail-alias</STRONG> is able to lock the file, but has trouble writing to it (because, for example, the disk is full), it will truncate the file back to its orig- inal length. However, it cannot prevent mailbox cor- ruption if the system crashes during delivery. (5) A <EM>maildir</EM> line begins with a slash or dot, and ends with a slash: /home/djb/Maildir/ <STRONG>qmail-alias</STRONG> takes the entire line as the name of a directory in <EM>maildir</EM> format. It reliably stores the incoming message in that directory. See <STRONG>maildir(5)</STRONG> for more details. If <STRONG>.qmail</STRONG> has the execute bit set, it must not contain any program lines, <EM>mbox</EM> lines, or <EM>maildir</EM> lines. If <STRONG>qmail-</STRONG> <STRONG>alias</STRONG> sees any such lines, it will stop and indicate a temporary failure. If <STRONG>.qmail</STRONG> is completely empty (0 bytes long), or does not exist, <STRONG>qmail-alias</STRONG> appends the mail message to your system mailbox in <EM>mbox</EM> format. <STRONG>.qmail</STRONG> may contain extra spaces and tabs at the end of a line. Blank lines are allowed, but not for the first line of <STRONG>.qmail</STRONG>. If <STRONG>.qmail</STRONG> is world-writable or group-writable, <STRONG>qmail-alias</STRONG> stops and indicates a temporary failure. Incoming messages can arrive at any moment. If you want to safely edit your <STRONG>.qmail</STRONG> file, first set the sticky bit on your home directory: chmod +t $HOME <STRONG>qmail-alias</STRONG> will temporarily defer delivery of any message to you if your home directory is sticky (or group-writable or other-writable, which should never happen). Make sure to chmod -t $HOME when you are done! It's a good idea to test your new The <STRONG>alias</STRONG> user controls all other addresses. Delivery to <EM>local</EM> is controlled by the file <EM>homedir/</EM><STRONG>.qmail-</STRONG><EM>local</EM>, where <EM>homedir</EM> is <STRONG>alias</STRONG>'s home directory. In the following description, <STRONG>qmail-alias</STRONG> is handling a message addressed to <EM>local@domain</EM>, where <EM>local</EM> is con- trolled by <STRONG>.qmail-</STRONG><EM>ext</EM>. Here is what it does. If <STRONG>.qmail-</STRONG><EM>ext</EM> is completely empty, <STRONG>qmail-alias</STRONG> appends the mail message to your system mailbox. If <STRONG>.qmail-</STRONG><EM>ext</EM> doesn't exist, <STRONG>qmail-alias</STRONG> will try some default <STRONG>.qmail</STRONG> files. For example, if <EM>ext</EM> is <STRONG>foo-bar</STRONG>, <STRONG>qmail-alias</STRONG> will try first <STRONG>.qmail-foo-bar</STRONG>, then <STRONG>.qmail-</STRONG> <STRONG>foo-default</STRONG>, and finally <STRONG>.qmail-default</STRONG>. If none of these exist, <STRONG>qmail-alias</STRONG> will bounce the message. (Exception: for the basic <EM>user</EM> address, <STRONG>qmail-alias</STRONG> treats a nonexis- tent <STRONG>.qmail</STRONG> the same as an empty <STRONG>.qmail</STRONG>.) <STRONG>WARNING:</STRONG> For security, <STRONG>qmail-alias</STRONG> replaces any dots in <EM>ext</EM> with colons before checking <STRONG>.qmail-</STRONG><EM>ext</EM>. For conve- nience, <STRONG>qmail-alias</STRONG> converts any uppercase letters in <EM>ext</EM> to lowercase. When <STRONG>qmail-alias</STRONG> forwards a message as instructed in <STRONG>.qmail-</STRONG><EM>ext</EM> (or <STRONG>.qmail-default</STRONG>), it checks whether sage. Otherwise it retains the envelope sender of the original message. Exception: <STRONG>qmail-alias</STRONG> always retains the original envelope sender if it is the empty address or <STRONG>#@[]</STRONG>, i.e., if this is a bounce message. <STRONG>qmail-alias</STRONG> also supports the <STRONG>owner</STRONG> <STRONG>hack</STRONG>: if <STRONG>.qmail-</STRONG><EM>ext</EM><STRONG>-</STRONG> <STRONG>owner</STRONG> and <STRONG>.qmail-</STRONG><EM>ext</EM><STRONG>-owner-default</STRONG> both exist, it uses <EM>local</EM><STRONG>-owner-</STRONG> as the envelope sender. This will cause a recipient <EM>recip</EM><STRONG>@</STRONG><EM>reciphost</EM> to see an envelope sender of <EM>local</EM><STRONG>-owner-</STRONG><EM>recip</EM><STRONG>=</STRONG><EM>reciphost</EM><STRONG>@</STRONG><EM>domain</EM>.