Upstream qmail 1.01
[qmail] / INSTALL.qsmhook
CommitLineData
2117e02e
MW
1You can set up qmail to use the same local delivery agent as sendmail,
2through a mechanism called qsmhook. This file says how.
3
4Before you do this, may I ask why? If you simply don't want the hassle
5of moving user mailboxes from /usr/spool/mail to ~, please reconsider---
6/usr/spool/mail has always been a big security problem. See, for
7example, CERT advisory 95:02.
8
9If you're trying to preserve /etc/aliases and ~user/.forward, you're
10looking the wrong way---those are handled by sendmail internally, not by
11the local delivery agent. You can use your old /etc/aliases with qmail
12by installing the qmsmac package.
13
14Perhaps you've set up an advanced agent like procmail. But most people
15use procmail for nothing more than sorting mail into several mailboxes;
16and that's much easier with qmail's local forwarding mechanism, which
17gives each user control over user-anything. If you have a few users who
18really do need procmail, they can easily run procmail from their own
19.qmail files.
20
21Do you still want to set up qsmhook? Send me some e-mail and let me know
22why. Perhaps I can provide something for you in a future qmail release.
23
24Here's what to do. First, tack ``:alias'' onto the end of each address
25in /var/qmail/control/locals, and put the results into
26/var/qmail/control/virtualdomains. For example, if control/locals has
27
28 localhost
29 silverton.berkeley.edu
30
31then control/virtualdomains should now have (without extra spaces)
32
33 localhost:alias
34 silverton.berkeley.edu:alias
35
36Second, cp /dev/null control/locals.
37
38Third, put a line into ~alias/.qmail-default, based on sendmail's Mlocal
39line. For example, if sendmail.cf has
40
41 Mlocal, P=/bin/mail, F=lsDFMPrmn, S=10, R=20, A=mail -d $u
42
43then ~alias/.qmail-default should have
44
45 |qsmhook -x alias- -lsDFMPmn /bin/mail -r %g -d %u
46
47As another example, if sendmail.cf has
48
49 Mlocal, P=/usr/lib/mail.local, F=flsSDFMmnP, S=10, R=20, A=mail.local -d $u
50
51then ~alias/.qmail-default should have
52
53 |qsmhook -x alias- -lsDFMmnP /usr/lib/mail.local -f %g -d %u