Commit | Line | Data |
---|---|---|
212b6f5d MW |
1 | UNIX has traditionally delivered mail into a central spool directory, |
2 | /var/spool/mail. (The original name was /usr/spool/mail; some systems | |
3 | now use /var/mail.) There are two basic problems with /var/spool/mail: | |
4 | ||
5 | * It's slow. On systems with thousands of users, /var/spool/mail has | |
6 | thousands of entries. A few UNIX systems support fast operations on | |
7 | large directories, but most don't. | |
8 | ||
9 | * It's insecure. Writing code that works safely in a world-writable | |
10 | directory is not easy. See, for example, CERT advisory 95:02. | |
11 | ||
12 | These may not be problems at your site, so you may want to leave your | |
13 | mailboxes in /var/spool/mail. | |
14 | ||
15 | This file explains several ways that you can configure qmail to use | |
16 | existing /var/spool/mail delivery tools. Please note that I do not vouch | |
17 | for the security or reliability of any of those tools. | |
18 | ||
19 | ||
20 | 1. What to configure | |
21 | ||
22 | The qmail system is started from /var/qmail/rc with | |
23 | ||
24 | qmail-start ./Mailbox splogger qmail | |
25 | ||
26 | The first argument to qmail-start, ./Mailbox, is the default delivery | |
27 | instruction. You can change it to run a program such as binmail or | |
28 | procmail. (See dot-qmail.0 for the format of delivery instructions.) | |
29 | ||
30 | ||
31 | 2. Using procmail | |
32 | ||
33 | You may already have installed procmail for mail filtering. procmail | |
34 | delivers to /var/spool/mail by default. | |
35 | ||
36 | To set up qmail to use procmail, simply copy /var/qmail/boot/proc to | |
37 | /var/qmail/rc. | |
38 | ||
39 | Note that procmail must be in your system's boot PATH; if it isn't, you | |
40 | will have edit /var/qmail/rc to include the full path. | |
41 | ||
42 | ||
43 | 3. Using sendmail's delivery agent | |
44 | ||
45 | sendmail uses binmail to deliver to /var/spool/mail. binmail is shipped | |
46 | with the operating system as /bin/mail or /usr/libexec/mail.local. | |
47 | ||
48 | There is some variation in binmail syntax among systems. The most common | |
49 | interfaces are shown in /var/qmail/boot/binm1, /var/qmail/boot/binm2, | |
50 | and /var/qmail/boot/binm3. |