sendmail -- an electronic mail transport agent


/usr/sbin/sendmail [options] [address...]


To deliver electronic mail (email), applications shall support the interface provided by sendmail (described here). This interface shall be the default delivery method for applications.

This program sends an email message to one or more recipients, routing the message as necessary. This program is not intended as a user interface routine.

With no options, 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.

If an address is preceded by a backslash, '\', it is unspecified if the address is subject to local alias expansion.

The format of messages shall be as defined in RFC 2822:Internet Message Format.

Note: The name sendmail was chosen for historical reasons, but the sendmail command specified here is intended to reflect functionality provided by smail, exim and other implementations, not just the sendmail implementation.



read mail from standard input and deliver it to the recipient addresses. This is the default mode of operation.


If the user has sufficient privilege, list information about messages currently in the mail queue.


use the SMTP protocol as described in RFC 2821:Simple Mail Transfer Protocol; read SMTP commands on standard input and write SMTP responses on standard output.

In this mode, sendmail shall accept \r\n (CR-LF), as required by RFC 2821:Simple Mail Transfer Protocol, and \n (LF) line terminators.

-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 configuration 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 shall be indicated in the message.


ignore dots alone on lines by themselves in incoming messages. If this options is not specified, a line consisting of a single dot shall terminate the input. If -bs is also used, the behavior is unspecified.


deliver any mail in background, if supported; otherwise ignored.


deliver any mail in foreground, if supported; otherwise 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.


is equivalent to -i.


indicate 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.


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 2822:Internet Message Format.

If there are any operands, the recipients list is unspecified.

This option may be ignored when not in -bm mode (the default).

Note: It is recommended that applications use as few options as necessary, none if possible.

Exit status


successful completion on all addresses. This does not indicate successful delivery.


there was an error.