DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
sendmail administration

Creating a user information database

The user database is built from a text file using the makemap utility. The text file is a series of lines corresponding to user database records; each line has a key and a value separated by white space. The key is always in the format described in ``Structure of the user database''. For example:

   eric:maildrop
This text file is normally installed in a system directory; for example, it might be called /etc/userdb. To make the database version of the map, enter:

makemap btree /etc/userdb.db < /etc/userdb

Then reference the database file in the sendmail configuration file. For example, include the following line in the configuration file:

OU/etc/userdb

sendmail adds the .db suffix when doing the database search.

The location of this database is controlled with the UserDatabaseSpec option.

Structure of the user database

The database is a sorted (BTree-based) structure. User records are stored with the key:

user-name:field-name

The sorted database format ensures that user records are clustered together. Meta-information is always stored with a leading colon.

Field names define both the syntax and semantics of the value. Currently, the defined fields include:


``maildrop''
The delivery address for this user. There may be multiple values of this record. In particular, mailing lists will have one maildrop record for each user on the list.

``mailname''
The outgoing mailname for this user. For each outgoing name, there should be an appropriate maildrop record for that name to allow return mail. Also see :default:mailname information in ``User database semantics''.

User database semantics

If you have specified one or more databases using the U option, the databases will be searched for a ``user:maildrop'' entry. If found, the mail will be sent to the specified address.

If the first token passed to the user part of the ``local'' mailer is an at sign, the at sign will be stripped off and the database lookup will be skipped. The intent is that the user database will act as a set of defaults for a cluster (for example, the computer science department of a university); mail sent to a specific machine should ignore these defaults.

When mail is sent, the name of the sender is looked up in the database. If that sender has a mailname record, the value of that record is used as their outgoing name. For example, eric might have a record:

   eric:mailname   Eric.Allman@CS.Berkeley.EDU
This would cause eric's outgoing mail to be sent as Eric.Allman.

If a ``maildrop'' is found for the sender, but no corresponding ``mailname'' record exists, the record ``:default:mailname'' is consulted. If present, this is the name of a host to override the local host (for example, CS.Berkeley.EDU). The effect is that anyone known in the database gets their outgoing mail stamped as user@CS.Berkeley.EDU, but people not listed in the database use the local hostname. ``Creating a user information database''.


Next topic: Altering read timeouts
Previous topic: Changing the queue processing interval

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003