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