Another role of the sendmail program is to deliver mail messages to local users. A local user has a mailbox on the local file system. Delivering local mail is done by appending a message to the user's mailbox, by feeding the mail message to a program, or by appending the message to a file other than the user's mailbox.
In general, sendmail does not put mail messages directly into files. You saw the exception in the aliases file, in which you could specifically tell sendmail to append mail to a file. This is the exception, not the rule. Usually, sendmail calls other programs to perform delivery. Those other programs are called delivery agents.
In your sendmail.cf file you found two lines that defined local delivery agents, the ones that sendmail used to deliver mail to the local file system:
Mlocal, P=/bin/mail, F=lsDFMAw5:/|@rmn, S=10, R=20/40, Mprog, P=/bin/sh, F=lsDFMeu, S=10, R=20/40, D=$z:/,
The /bin/mail program is used to append mail to the user's mailbox. The /bin/sh program is used to run other programs that handle delivery.
The configuration file line that begins with
Under UNIX a user's mailbox is a single file that contains
a series of mail messages. The usual UNIX convention (but not the
only possibility) is that
each message in a mailbox begins with the five characters "
program neither knows nor cares what a user's
mailbox looks like. All it cares about is the name of the
program that it must run to add mail messages to that mailbox.
In the example that program is
Here, mail sent to the address
program doesn't run mail delivery programs
directly. Instead, it runs a shell and tells that shell to
run the program. The name of the shell is listed
in the configuration file in a line
that begins with
Mprog, P=/bin/sh, F=lsDFMeu, S=10, R=20/40, D=$z:/,
In this example the shell is the /bin/sh (1). Other programs can appear in this line such as /bin/ksh (1), the Korn Shell, or smrsh (1), the sendmail restricted shell that is supplied with the source distribution.