If your system acts as a mail server for more than the people with shell accounts, you'll probably want to add some entries to the users database. 15.5.1 Adding a Few Mail-Only AccountsIn many cases, a host serves a mix of shell and mail-only accounts. If the number of mail-only accounts is small, it's not worth installing an entire virtual domain POP system. To handle my mail-only users, I created a user maildrop that owns all of the Maildirs for the mail-only users. Each user has a Maildir, so that if fred is a mail-only user, his Maildir is ~maildrop/fred/ and his mail is delivered via ~maildrop/.qmail-fred, which contains either just the name of the Maildir, ./fred/, or more likely a call to procmail to filter out viruses and spam before delivery. Fred is a subuser of maildrop, so his address would be maildrop-fred rather than fred. To make his plain address work, you can forward his mail via a qmail file ~alias/.qmail-fred or an entry in /etc/aliases forwarding to maildrop-fred. Or what I do is to use the subusers file, with entries like this: fred:maildrop:fred: (Also modify the Makefile to add subusers to the end of the line starting with assign:, so that it rebuilds the users database if the subusers file changes.) This has exactly the desired result, to treat mail to fred as though it were addressed to maildrop-fred. It also routes subaddressed mail, so if you want Fred's subaddresses to work, you should create ~maildrop/.qmail-fred-default, which in a simple case can be a link to .qmail-fred to deliver all of fred's subaddressed mail the same as his regular mail. You must also arrange for the POP server to know about the mail-only users. See Chapter 13 for advice on doing so. 15.5.2 Preparing for the POP ToasterIf you have a more complicated mail setup, you may want to add a few custom lines to the users database by putting them in append. If you run a POP toaster, a mail server for POP users with mailboxes in virtual domains, and the user mailboxes belong to user pop, but you want to put the mailboxes in /var/popmail rather than in ~pop, just add a line like this to append: +popmail-:popmail:111:222:/var/popmail:-:: (Use the user and group IDs for pop rather than 111 and 222, of course.) Once you've rebuilt the users database, any mail addressed to popmail-something will be delivered via /var/popmail/.qmail-something or /var/popmail/.qmail-default, running as user pop. I find this a convenient way to work, so I can put files of software and notes to myself in pop's home directory, and keep the mailboxes on a separate large filesystem. |