1 --- Setting up /etc/aliases
3 Create /etc/aliases if it does not already exist. You should include
4 forwarding instructions for mailer-daemon, postmaster, and root:
10 Note that qmail never delivers mail to root. The instructions shown here
11 will deliver messages to the mailbox of the ``alias'' user.
13 For further details on the format of /etc/aliases, and a list of
14 sendmail compatibility warnings, see the newaliases man page.
17 --- Compiling /etc/aliases
19 Once /etc/aliases is ready, run newaliases to compile /etc/aliases into
24 Review /etc/aliases.cdb to make sure it has the instructions you want:
26 % printforward < /etc/aliases.cdb | more
28 For the format of printforward's output, see the setforward man page.
30 If you change /etc/aliases you will have to run newaliases again. You
31 may want to add a comment at the top of /etc/aliases as a reminder.
34 --- Compiling :include: files
36 If you have an :include: file, say /etc/staff-list, compile it into
39 # newinclude /etc/staff-list
41 See the newinclude man page for a list of sendmail compatibility
42 warnings. Review /etc/staff-list.bin:
44 % printmaillist < /etc/staff-list.bin | more
46 For the format of printmaillist's output, see the setmaillist man page.
48 If you change /etc/staff-list you will have to run newinclude again. You
49 may want to add a comment at the top of /etc/staff-list as a reminder.
52 --- Configuring qmail to use /etc/aliases
54 To activate /etc/aliases, put this line into ~alias/.qmail-default:
56 | fastforward -d /etc/aliases.cdb
58 If qmail is already running, make sure to chmod +t ~alias before you
59 edit .qmail files in ~alias, and chmod -t ~alias after.
64 To check the expansion of postmaster@your.host without sending any mail:
66 % env DEFAULT=postmaster HOST=your.host fastforward -nd /etc/aliases.cdb
68 Replace your.host with your fully qualified domain name. Make sure to
71 Next, try sending a message to postmaster@your.host. Watch the qmail log
72 and the final mailbox to make sure the alias works the way you want.
74 You can check other aliases the same way.
77 --- Using /etc/aliases for virtual domains
79 To put all addresses at virt.dom under control of /etc/aliases, add
83 to /var/qmail/control/virtualdomains, and give qmail-send a HUP signal.
88 to /var/qmail/control/rcpthosts so that qmail accepts mail for virt.dom
89 from remote hosts. Now you can handle virt.dom in /etc/aliases:
91 billing@virt.dom: joe, fred
92 (this line catches all other addresses)@virt.dom: joe
94 Note that postmaster@virt.dom will go to joe; the @virt.dom instruction
95 overrides the postmaster instruction. Note, however, that other .qmail
96 files in ~alias override ~alias/.qmail-default, so you can set up
97 ~alias/.qmail-postmaster to handle postmaster@everything.
99 Beware that sendmail does not support domain-specific instructions in
100 /etc/aliases; they are a fastforward feature.