-bm
Be a mail sender All versions
The -bm
command-line switch (the default) causes
sendmail to run once in the
foreground. A list of recipients is taken from the
command line (unless the -t
command-line switch is used), and
the message is read from the standard input and
delivered.
This is the mode MUAs use when they invoke
sendmail on the user’s
behalf. The sendmail program
processes the recipients first, then the message
header, then the message body. Usually, the envelope
recipients are those on the command line. But if the
-t
command-line
switch is also used, the recipients are taken from
the message header. The envelope sender is more
difficult to determine:
Trusted users, and programs running under the identity of those users, can specify the address of the sender by using the
-f
command-line switch[109] (-f on page 241) when running sendmail. Trusted users are those that are declared with aT
configuration command (Declare trusted users (ignored V8.1 through V8.6) on page 174). If anyone other than a trusted user uses the-f
command-line switch, anX-Authentication-Warning
: header (X-Authentication-Warning: on page 1167) will be added to the message to show that the sender was changed by an unauthorized user.Otherwise, sendmail tries to use the user identity of the invoking program to determine the sender.
When generating a mail bounce message, the sender becomes the name specified by the value of the
$n
sendmail macro ($n on page 836), usually mailer-daemon.
[109] * The -r
is ...
Get sendmail, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.