15.3 How Qmail Uses the Users Database

Once you've created the users database, qmail checks it for each local delivery. First it checks for an exact match of the mailbox as a nonwildcard address. If that doesn't work, it tries for the longest match against a wildcard, starting with the full mailbox and shrinking a character at a time until there's a match. (To speed up this process, qmail-newu makes a list of the final characters used by all the wildcard entries and stores it in the CDB file. When looking up a mailbox, qmail-lspawn only checks substrings where the last character of the substring is one of those final characters.) The wildcard match always succeeds, either against one of the subuser entries, or else against the default wildcard entry created by qmail-newu, which looks like this:

+:alias:uid:gid:/var/qmail/alias:-::

Once qmail-lspawn has the user data, either from the database or from qmail-getpw, it changes to the user ID, group ID, and home directory, then runs qmail-local to read the .qmail file and perform the delivery.



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