'MailboxDatabase'' ''''


Choose a mailbox database V8.12 and later

To perform delivery, sendmail needs to find information about any recipient or sender that is local. The items of interest are:

Numeric IDs

The uid and gid of the user are important because they determine what files can be read or written and which programs can be run.

Full Name

The full name for use in headers and the $x sendmail macro ($x).

Home Directory

The home directory for the user is needed to locate the user's ~/.forward file, to locate the place to write the ~/dead.letter file, or to set the correct directory for starting programs.


The user's shell is needed to determine if the user is permitted to run programs (Section 10.8.3).

In the past, all of this information was gathered using getpwent(3). Beginning with V8.12 sendmail, it is possible to specify this or a different method using an API designed to allow you to write your own method.

The MailboxDatabase option is used to specify how user information is acquired:

O MailboxDatabase=method             configuration file (V8.12 and later) 
-OMailboxDatabase=method             command line (V8.12 and later) 
define(`confMAILBOX_DATABASE',method)    mc configuration (V8.12 and later) 

Here, the method is of type string. The default (and, as of V8.12, the only) method is the literal string pw, which means to use getpwent(3). An LDAP implementation of a method is included in the source as an example. If you wish to write your own method, see the code in libsm/mbdb.c.

The MailboxDatabase option is not safe. If it is specified from the command line, it can cause sendmail to give up any special privileges.

    Part I: Build and Install
    Part II: Administration
    Part III: The Configuration File
    Chapter 21. The D (Define a Macro) Configuration Command
    Chapter 24. The O (Options) Configuration Command