Debianization, and minor fixes.
[fastforward] / ALIASES
CommitLineData
8d5530c4
MW
1--- Setting up /etc/aliases
2
3Create /etc/aliases if it does not already exist. You should include
4forwarding instructions for mailer-daemon, postmaster, and root:
5
6 root: alias
7 postmaster: alias
8 mailer-daemon: alias
9
10Note that qmail never delivers mail to root. The instructions shown here
11will deliver messages to the mailbox of the ``alias'' user.
12
13For further details on the format of /etc/aliases, and a list of
14sendmail compatibility warnings, see the newaliases man page.
15
16
17--- Compiling /etc/aliases
18
19Once /etc/aliases is ready, run newaliases to compile /etc/aliases into
20/etc/aliases.cdb:
21
22 # newaliases
23
24Review /etc/aliases.cdb to make sure it has the instructions you want:
25
26 % printforward < /etc/aliases.cdb | more
27
28For the format of printforward's output, see the setforward man page.
29
30If you change /etc/aliases you will have to run newaliases again. You
31may want to add a comment at the top of /etc/aliases as a reminder.
32
33
34--- Compiling :include: files
35
36If you have an :include: file, say /etc/staff-list, compile it into
37/etc/staff-list.bin:
38
39 # newinclude /etc/staff-list
40
41See the newinclude man page for a list of sendmail compatibility
42warnings. Review /etc/staff-list.bin:
43
44 % printmaillist < /etc/staff-list.bin | more
45
46For the format of printmaillist's output, see the setmaillist man page.
47
48If you change /etc/staff-list you will have to run newinclude again. You
49may want to add a comment at the top of /etc/staff-list as a reminder.
50
51
52--- Configuring qmail to use /etc/aliases
53
54To activate /etc/aliases, put this line into ~alias/.qmail-default:
55
56 | fastforward -d /etc/aliases.cdb
57
58If qmail is already running, make sure to chmod +t ~alias before you
59edit .qmail files in ~alias, and chmod -t ~alias after.
60
61
62--- Testing aliases
63
64To check the expansion of postmaster@your.host without sending any mail:
65
66 % env DEFAULT=postmaster HOST=your.host fastforward -nd /etc/aliases.cdb
67
68Replace your.host with your fully qualified domain name. Make sure to
69include the -nd.
70
71Next, try sending a message to postmaster@your.host. Watch the qmail log
72and the final mailbox to make sure the alias works the way you want.
73
74You can check other aliases the same way.
75
76
77--- Using /etc/aliases for virtual domains
78
79To put all addresses at virt.dom under control of /etc/aliases, add
80
81 virt.dom:alias
82
83to /var/qmail/control/virtualdomains, and give qmail-send a HUP signal.
84Also add
85
86 virt.dom
87
88to /var/qmail/control/rcpthosts so that qmail accepts mail for virt.dom
89from remote hosts. Now you can handle virt.dom in /etc/aliases:
90
91 billing@virt.dom: joe, fred
92 (this line catches all other addresses)@virt.dom: joe
93
94Note that postmaster@virt.dom will go to joe; the @virt.dom instruction
95overrides the postmaster instruction. Note, however, that other .qmail
96files in ~alias override ~alias/.qmail-default, so you can set up
97~alias/.qmail-postmaster to handle postmaster@everything.
98
99Beware that sendmail does not support domain-specific instructions in
100/etc/aliases; they are a fastforward feature.