SENDMAIL(8)

NAME
sendmail - Berkeley sendmail emulation for postoffice

SYNOPSIS
sendmail [flags] [address ...]

DESCRIPTION
sendmail is a more-like-Berkeley-sendmail emulation for postoffice. It sends a message to one or more recipients specified on the command line, or, with the ‘t’ option, in the headers of the mail message. sendmail is intended as a user interface routine for programs that expect that a program named sendmail will be the program that you can get from sendmail.org.

With no flags, sendmail reads its standard input up to an end-of-file and sends a copy of the message found there to all of the addresses listed. Flags are:

-bm Deliver mail in the usual way (default).

-bs Use the SMTP protocol as described in RFC821 on standard input and output.

-ddebug-option
    Do sendmail-style debugging. -d0 and -d0.1 print out the version# in the sendmail-style, but all other debug flags are silently ignored.

-Ffullname
    Set the full name of the sender (ignored).

-fname
    Sets the name of the ``from'' person (i.e., the sender of the mail). -f can only be used by ``trusted'' users (normally root) or if the person you are trying to become is the same as the person you are.

-ox value
    Set option x to the specified value. (ignored)

-qX Start a daemon to process the mail queue every X minutes.

-rname
    An alternate form of the -f flag.

-t  Read message for recipients. To:, Cc:, and Bcc: lines will be scanned for recipient addresses. The Bcc: line will be deleted before transmission. Any addresses in the argument list will be ignored.

-v  Go into verbose mode.

sendmail returns an exit status describing what it did. The codes are defined in <sysexits.h>:
EX_OK
    Successful completion on all addresses.
EX_NOUSER
    User name not recognized.
EX_UNAVAILABLE
    Catchall meaning necessary resources were not available.
EX_SYNTAX
    Syntax error in address.
EX_SOFTWARE
    Internal software error, including bad arguments.
EX_OSERR
    Temporary operating system error, such as “cannot fork”.

SEE ALSO
postoffice(8)

HISTORY
The sendmail command appeared in 4.2BSD.