$Id: SENDMAIL,v 1.6 1999/12/02 01:19:31 chip Exp $


		     USING DELIVER WITH SENDMAIL


Apart from a user invoking Deliver from his ".forward", there are are
other uses for Deliver within a Sendmail environment.  These uses
require defining your own mailer in the Sendmail configuration file
("/usr/lib/sendmail.cf").

First, if you are not satisfied with the version of /bin/mail supplied
for your system, here is an alternative "local" mailer definition you
might use:

 Mlocal, P=/usr/bin/deliver, F=DFMlmns, S=10, R=20, A=deliver -r $g $u

Whether or not you change your "local" mailer, you can install a
"deliver" mailer for solving unusual mail delivery problems:

 Mdeliver, P=/usr/bin/deliver, F=DFMlmns, S=10, R=20, A=deliver -r $g $u

If you use either of the above mailer definitions, you should
carefully check that the "P=" operand matches where you installed
Deliver, and that the "R=" and "S=" operands match the corresponding
options on the vendor supplied "local" mailer definition.  If your
supplied local mailer definition omits the "R=" or "S=", it is safe to
omit it also from the "deliver" mailer definition.

When you create the "deliver" mailer, you will need an associated rule
in ruleset 0 of sendmail.cf to pass it addresses.  The rule should
probably look something like:

 R$+<@deliver>		$#deliver $@$w $:$1		Use Deliver mailer

This rule will cause all addresses of the form "user@deliver" to go to
the "deliver" mailer.  Such a rule might be exercised with an entry in
the Sendmail aliases file like:

 postmaster:	postmaster@deliver

This alias arranges for all postmaster mail to be handled by the
"deliver" mailer.

When Deliver is used for the "local" mailer, it simply replaces the
original /bin/mail or other program.  Addresses are still processed
using the Sendmail aliases database and user ".forward" files (if any)
before they are passed to Deliver.  Deliver will then consult user
".deliver" files to control processing.

Note that Sendmail only uses the "local" mailer for valid user names.
In contrast, with the "deliver" mailer, user names are not checked for
validity before Deliver is executed.  This behavior allows you to use
the features of Deliver to arrange for message handling different from
simple delivery to user mailboxes.

One use of the "deliver" mailer is the storage of archive copies of
messages to other addresses, such as mailing lists.  Since Deliver
does mailbox locking, it is more reliable and flexible than the
Sendmail feature of aliasing a name to a file path.

[ Neil Rickert <rickert@cs.niu.edu> originally wrote this document,
  but it has been heavily edited by Chip Salzenberg <chip@pobox.com>. ]
