/usr/sbin/sendmail specification proposal, draft 4
Draft 4.
Changes:
* extended first paragraph of description (please read)
* description recommends using sendmail with as few flags as possible
* in -bs mode, \r is discarded when before \n
One question is whether we should allow LSB compliant applications to
use SMTP/IMAP/POP instead of /usr/sbin/sendmail (when /usr/sbin/sendmail
is present). Since some existing applications such as Netscape
Navigator seem to avoid sendmail entirely (using SMTP, POP, or IMAP
instead), it seems sensible to allow these and other internet email
protocols as an option for LSB applications.
------- start of cut text --------------
NAME
/usr/sbin/sendmail - an electronic mail transport agent
SYNOPSIS
sendmail [flags] [address ...]
DESCRIPTION
This program sends an email message to one or more recipients,
routing the message as necessary. Applications shall use the
interface provided by this program when delivering email messages
via the local system. Applications may alternatively deliver
email messages via a standard internet email protocol such as
SMTP, IMAP, or POP (to the local host or a remote host). This
program is not intended as a user interface routine.
With no flags, sendmail reads its standard input up to an
end-of-file or a line consisting only of a single dot and sends a
copy of the message found there to all of the addresses listed.
It determines the network(s) to use based on the syntax and
contents of the addresses.
It is recommended that applications use as few flags as
necessary, none if possible.
Some agents allow aliasing on the local system to be prevented
by preceding the address with a backslash.
The format of messages must be as defined in RFC 822.
OPTIONS
-bm Read mail from standard input and deliver to the
recipient addresses. This is the default mode of
operation.
-bp List information about messages currently in the input
mail queue.
-bs Use the SMTP protocol as described in RFC 821. (Read
SMTP commands on standard input and write SMTP responses
on standard output.)
Note that RFC 821 specifies \r\n (CR-LF) be used at the
end of each line, but Unix pipes almost always use \n
(LF) instead. To deal with this, agents will accept both
\r\n and \n at the end of each line. When accepting
\r\n, the \r before the \n is silently discarded.
-F fullname
Explicitly set the full name of the sender for incoming
mail unless the message already contains a From: message
header.
If the user running sendmail is not sufficiently trusted,
then the actual sender may be indicated in the message,
depending on the behavior of the agent.
-f name
Explicitly set the envelope sender address for incoming
mail. If there is no From: header, the address specified
in the From: header will also be set.
If the user running sendmail is not sufficiently trusted,
then the actual sender will be indicated in the message.
-i Ignore dots alone on lines by themselves in incoming
messages. This option is ignored when -bs is used.
-odb If supported, deliver any mail in background. Otherwise,
this option is ignored.
-odf If supported, deliver any mail in foreground. Otherwise,
this option is ignored.
-oem or -em
Mail errors back to the sender (default).
-oep or -ep
Write errors to the standard error output.
-oeq or -eq
Do not send notification of errors to the sender. This
only works for mail delivered locally.
-oew or -ew
Write errors to the sender's terminal using the write(1)
command, if he is logged in. Otherwise, mail errors back
to the sender. If not supported, report errors in the
same manner as -oem.
-oi Same as -i.
-om This option means 'me too', indicating that the sender of
a message should receive a copy of the message if the
sender appears in an alias expansion. Ignored if aliases
are not supported.
-t Read the message to obtain recipients from the To:, Cc:,
and Bcc: headers in the message instead of from the
command arguments. If a Bcc: header is present, it is
removed from the message unless there is no To: or Cc:
header, in which case a Bcc: header with no data is
created, in accordance with RFC 822.
If there are any arguments, they specify addresses to
which the message is not to be delivered. That is, the
argument addresses are removed from the recipients list
obtained from the headers. Note: some agents implement
this behavior in reverse, adding addresses instead of
removing them. Others may disallow addresses in
argument list. Therefore, applications should not put
addresses in the argument list if -t is used.
This option is sometimes ignored when not in -bm mode
(the default).
-v Be more verbose. Additional -v options may make the
software increasingly verbose.
EXIT STATUS
0 Successful completion on all addresses. This does not
indicate successful delivery.
>0 There was an error.
------- end ----------------------------
Reply to: