5.2 User Issues

There are two important differences visible to mail users when moving from sendmail to qmail: mailbox format and location, and .forward files. The standard qmail distribution includes some examples in /var/qmail/boot to set up for various degrees of sendmail compatibility, discussed in Chapter 4.

5.2.1 Mailbox Format and Location

Sendmail invariably delivers mail into mbox format mailboxes, which are usually all located in /var/mail or /var/spool/mail. Qmail can deliver to either mbox or Maildir files, but normally puts each user's mailbox in the user's home directory. You have several options during a conversion.

The easiest option is to leave all the mailboxes in /var/mail or a similar shared directory. The disadvantage is that /var/mail isn't a very good place to put mail, because mail doesn't count toward individual disk quotas, and minor protection errors on mailboxes make it possible to snoop on mail. Because qmail doesn't have a built-in delivery agent that puts mail in /var/mail, you must tell it to use an external one such as /usr/libexec/mail.local (4.4 BSD and descendants) or /bin/mail (older versions of BSD, System V, and Linux).

It is not a good idea to leave mail in /var/mail other than for testing. A reasonable compromise is to have qmail deliver to mbox files in the home directories, and leave sendmail delivering to /var/mail. Then when you're happy with qmail, copy all the old mailboxes to the new location using scripts described later in this chapter. You must also adjust the .profile and .login files so that they set the MAILBOX environment variable to point to the new location.

Although Maildir mailboxes have many operational advantages over mboxes, switching users over on systems with shell users is painful due to the dearth of Maildir mail clients. On systems where most or all of your users pick up mail with POP or IMAP, switching to Maildirs is easier, and I recommend it. Again, set up qmail with Maildirs, then when you stop sendmail, copy the contents of the old mailboxes into the new ones, converting mbox to Maildir at that time.

Qmail comes with a pair of scripts called pinq and elq, which copy the user's incoming mail from ~/Maildir to ~/Mailbox and then run pine or elm. While they work fine, if a user is going to use a mail client that expects an mbox, it makes more sense to deliver to the mbox in the first place. One semiplausible reason to use pinq or elq is if the filesystem to which the mail is delivered is on a different host than the one uses to read mail, with the files mounted using NFS. Because NFS has locking problems with mboxes, it makes sense to do the deliveries into Maildirs, which work reliably. Assuming the user runs only one copy of pinq or elq at a time, it can safely copy mail from the Maildir into an mbox on his local disk, and then run pine or elm.

5.2.2 Qmail and .forward Files

Sendmail shell users frequently have .forward files to handle their mail deliveries. The most common uses are to forward mail to another address and feed incoming mail to procmail for filtering and sorting, but the .forward scheme is quite general, albeit not very well specified.

Qmail offers two migration paths for .forward. The format of .qmail files is similar enough to .forward files that the most common .forward files can be turned into .qmail files with little or no tweaking. If you have a small number of shell users, turn them into .qmail files when you convert, to get rid of .forward files once and for all.

Alternatively, if you have a lot of .forward files, Dan has an add-on package called dot-forward that provides most of the sendmail .forward features. You can run qmail and make the default delivery instructions to be to run dot-forward. This means that anyone without a .qmail file will use dot-forward to interpret a .forward file, if any, while users who have created .qmail files will use those instead. This is the best approach for larger shell setups.

Keep in mind that dot-forward doesn't do everything that sendmail does, so some .forward files, notably those that use :include: to forward to a mailing list or group of people, won't work. The conversion to .qmail isn't hard, but someone has to do it before stopping sendmail.



qmail
qmail
ISBN: 1565926285
EAN: 2147483647
Year: 2006
Pages: 152

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net