|SENDMAIL(8)||System Manager's Manual||SENDMAIL(8)|
sendmail — an
electronic mail transport agent
||[flags] [address ...]
sendmail sends a message to one or more
routing the message over whatever networks are necessary.
sendmail does internetwork forwarding as necessary
to deliver the message to the correct place.
sendmail is not intended as a user
interface routine; other programs provide user-friendly front ends;
sendmail is used only to deliver pre-formatted
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
Local addresses are looked up in a file and aliased appropriately. Aliasing can be prevented by preceding the address with a backslash. Beginning with 8.10, the sender is included in any alias expansions, e.g., if `john' sends to `group', and `group' includes `john' in the expansion, then the letter will also be delivered to `john'.
sendmail can be made to conduct ESMTP
transactions over TLS circuits to increase the security of mail server
transactions if TLS/SSL is enabled. See
starttls(8) for more
sendmailwill fork and run in the background listening on socket 25 for incoming SMTP connections. By default,
sendmailwill also listen on socket 587 for RFC 2476 message submission. This is normally run from /etc/rc.
-bdexcept runs in foreground.
-baflag that are compatible with SMTP.
sendmailgives up any enhanced (set-user-ID or set-group-ID) privileges if an alternate configuration file is specified.
-d0.1 prints the version of
sendmailand the options it was compiled with.
sendmail's source code.
-fshould only be used by ``trusted'' users (normally root, daemon, and network) or if the person you are trying to become is the same as the person you are. Otherwise, an X-Authentication-Warning header will be added to the message.
never’ for no notifications or a comma separated list of the values ‘
failure’ to be notified if delivery failed, ‘
delay’ to be notified if delivery is delayed, and ‘
success’ to be notified when the message is successfully delivered.
s’ being seconds, ‘
m’ being minutes (default), ‘
h’ being hours, ‘
d’ being days, and ‘
w’ being weeks. For example, ‘
-q1h30m’ or ‘
-q90m’ would both set the timeout to one hour thirty minutes. By default,
sendmailwill run in the background. This option can be used safely with
-qtime, except that instead of periodically forking a child to process the queue, sendmail forks a single persistent child for each queue that alternates between processing the queue and sleeping. The sleep time is given as the argument; it defaults to 1 second. The process will always sleep at least 5 seconds if the queue was empty in the previous queue run.
full’ to return the entire message or ‘
hdrs’ to return only the headers. In the latter case also local bounces return only the headers.
There are also a number of processing options that may be set.
Normally these will only be used by a system administrator. Options may be
set either on the command line using the
(for short names), the
-O flag (for long names), or
in the configuration file. This is a partial list limited to those options
that are likely to be useful on the command line and only shows the long
names; for a complete list (and details), consult the
Sendmail Installation and Operation Guide. The
i’ for interactive (synchronous) delivery, ‘
b’ for background (asynchronous) delivery, ‘
q’ for queue only - i.e., actual delivery is done the next time the queue is run, and ‘
d’ for deferred - the same as ‘
q’ except that database lookups for maps which have set the -D option (default for the host map) are avoided.
m’ to mail back the error message, ‘
w’ to ``write'' back the error message (or mail it back if the sender is not logged in), ‘
p’ to print the errors on the terminal (default), ‘
q’ to throw away error messages (only exit status is returned), and ‘
e’ to do special processing for the BerkNet. If the text of the message is not mailed back by modes ‘
m’ or ‘
w’ and if the sender is local to this machine, a copy of the message is appended to the file dead.letter in the sender's home directory.
USERDBoption compiled in.
m(mimefy) will convert to seven-bit MIME format,
p(pass) will pass it as eight bits (but violates protocols), and
s(strict) will bounce the message.
noneleaves the message unchanged,
add-toadds a To: header with the envelope recipients,
add-apparently-toadds an Apparently-To: header with the envelope recipients,
add-bccadds an empty Bcc: header, and
add-to-undisclosedadds a header reading ‘
In aliases, the first character of a name may be a vertical bar to
cause interpretation of the rest of the name as a command to pipe the mail
to. It may be necessary to quote the name to keep
sendmail from suppressing the blanks from between
arguments. For example:
eric: "|/usr/bin/vacation -a allman eric"
Aliases may also have the syntax
“:include:filename” to ask
sendmail to read the named file for a list of
recipients. For example, an alias such as:
would read /usr/local/lib/poets.list for the list of addresses making up the group.
If invoked as
sendmail will rebuild the alias database. If invoked
print the contents of the mail queue. If invoked as
print the persistent host status database. If invoked as
purge expired entries from the persistent host status database.
Except for the file /etc/mail/sendmail.cf itself the following pathnames are all specified in /etc/mail/sendmail.cf. Thus, these values are only approximations.
sendmail returns an exit status describing
what it did. The codes are defined in
DARPA Internet Request For Comments RFC 819, RFC 821, RFC 2822.
"Filtering Mail with Sendmail",
US Patent Numbers 6865671, 6986037.
sendmail command appeared in
sendmail often gets blamed for many
problems that are actually the result of other problems, such as overly
permissive modes on directories. For this reason,
sendmail checks the modes on system directories and
files to determine if they can be trusted. Although these checks can be
turned off and your system security reduced by setting the
DontBlameSendmail option, the permission problems
should be fixed. For more information, see:
|May 17, 2011||OpenBSD-5.1|