BSD 4_3_Reno development
[unix-history] / usr / share / man / cat8 / sendmail.0
SENDMAIL(8) 1990 SENDMAIL(8)
N\bNA\bAM\bME\bE
sendmail - send mail over the internet
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
s\bse\ben\bnd\bdm\bma\bai\bil\bl [ flags ] [ address ... ]
n\bne\bew\bwa\bal\bli\bia\bas\bse\bes\bs
m\bma\bai\bil\blq\bq [ -\b-v\bv ]
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bS_\be_\bn_\bd_\bm_\ba_\bi_\bl sends a message to one or more _\br_\be_\bc_\bi_\bp_\bi_\be_\bn_\bt_\bs, routing
the message over whatever networks are necessary. _\bS_\be_\bn_\bd_\bm_\ba_\bi_\bl
does internetwork forwarding as necessary to deliver the
message to the correct place.
_\bS_\be_\bn_\bd_\bm_\ba_\bi_\bl is not intended as a user interface routine; other
programs provide user-friendly front ends; _\bs_\be_\bn_\bd_\bm_\ba_\bi_\bl is used
only to deliver pre-formatted messages.
With no flags, _\bs_\be_\bn_\bd_\bm_\ba_\bi_\bl 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.
Local addresses are looked up in a file and aliased
appropriately. Aliasing can be prevented by preceding the
address with a backslash. Normally the sender is not
included in any alias expansions, e.g., if `john' sends to
`group', and `group' includes `john' in the expansion, then
the letter will not be delivered to `john'.
Flags are:
-\b-b\bba\ba Go into ARPANET mode. All input lines must end
with a CR-LF, and all messages will be generated
with a CR-LF at the end. Also, the ``From:''
and ``Sender:'' fields are examined for the name
of the sender.
-\b-b\bbd\bd Run as a daemon. This requires Berkeley IPC.
_\bS_\be_\bn_\bd_\bm_\ba_\bi_\bl will fork and run in background listen-
ing on socket 25 for incoming SMTP connections.
This is normally run from /_\be_\bt_\bc/_\br_\bc.
-\b-b\bbi\bi Initialize the alias database.
-\b-b\bbm\bm Deliver mail in the usual way (default).
-\b-b\bbp\bp Print a listing of the queue.
Printed 7/4/90 June 1
SENDMAIL(8) 1990 SENDMAIL(8)
-\b-b\bbs\bs Use the SMTP protocol as described in RFC821 on
standard input and output. This flag implies
all the operations of the -\b-b\bba\ba flag that are com-
patible with SMTP.
-\b-b\bbt\bt Run in address test mode. This mode reads
addresses and shows the steps in parsing; it is
used for debugging configuration tables.
-\b-b\bbv\bv Verify names only - do not try to collect or
deliver a message. Verify mode is normally used
for validating users or mailing lists.
-\b-b\bbz\bz Create the configuration freeze file.
-\b-C\bC_\bf_\bi_\bl_\be Use alternate configuration file. _\bS_\be_\bn_\bd_\bm_\ba_\bi_\bl
refuses to run as root if an alternate confi-
guration file is specified. The frozen confi-
guration file is bypassed.
-\b-d\bd_\bX Set debugging value to _\bX.
-\b-F\bF_\bf_\bu_\bl_\bl_\bn_\ba_\bm_\be Set the full name of the sender.
-\b-f\bf_\bn_\ba_\bm_\be Sets the name of the ``from'' person (i.e., the
sender of the mail). -\b-f\bf can only be used by
``trusted'' users (normally _\br_\bo_\bo_\bt, _\bd_\ba_\be_\bm_\bo_\bn, and
_\bn_\be_\bt_\bw_\bo_\br_\bk) or if the person you are trying to
become is the same as the person you are.
-\b-h\bh_\bN Set the hop count to _\bN. The hop count is incre-
mented every time the mail is processed. When
it reaches a limit, the mail is returned with an
error message, the victim of an aliasing loop.
If not specified, ``Received:'' lines in the
message are counted.
-\b-n\bn Don't do aliasing.
-\b-o\bo_\bx_\bv_\ba_\bl_\bu_\be Set option _\bx to the specified _\bv_\ba_\bl_\bu_\be. Options are
described below.
-\b-q\bq[\b[_\bt_\bi_\bm_\be]\b] Processed saved messages in the queue at given
intervals. If _\bt_\bi_\bm_\be is omitted, process the
queue once. _\bT_\bi_\bm_\be is given as a tagged number,
with `s' being seconds, `m' being minutes, `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. If _\bt_\bi_\bm_\be is specified, _\bs_\be_\bn_\bd_\bm_\ba_\bi_\bl will
run in background. This option can be used
safely with -\b-b\bbd\bd.
Printed 7/4/90 June 2
SENDMAIL(8) 1990 SENDMAIL(8)
-\b-r\br_\bn_\ba_\bm_\be An alternate and obsolete form of the -\b-f\bf flag.
-\b-t\bt Read message for recipients. To:, Cc:, and Bcc:
lines will be scanned for recipient addresses.
The Bcc: line will be deleted before transmis-
sion. Any addresses in the argument list will
be suppressed, that is, they will _\bn_\bo_\bt receive
copies even if listed in the message header.
-\b-v\bv Go into verbose mode. Alias expansions will be
announced, etc.
There are also a number of processing options that may be
set. Normally these will only be used by a system adminis-
trator. Options may be set either on the command line using
the -\b-o\bo flag or in the configuration file. These are
described in detail in the _\bS_\be_\bn_\bd_\bm_\ba_\bi_\bl _\bI_\bn_\bs_\bt_\ba_\bl_\bl_\ba_\bt_\bi_\bo_\bn _\ba_\bn_\bd _\bO_\bp_\be_\br_\ba_\b-
_\bt_\bi_\bo_\bn _\bG_\bu_\bi_\bd_\be. The options are:
A_\bf_\bi_\bl_\be Use alternate alias file.
c On mailers that are considered ``expensive'' to
connect to, don't initiate immediate connection.
This requires queueing.
d_\bx Set the delivery mode to _\bx. Delivery modes are
`i' for interactive (synchronous) delivery, `b'
for background (asynchronous) delivery, and `q'
for queue only - i.e., actual delivery is done
the next time the queue is run.
D Try to automatically rebuild the alias database
if necessary.
e_\bx Set error processing to mode _\bx. Valid modes are
`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.
F_\bm_\bo_\bd_\be The mode to use when creating temporary files.
f Save UNIX-style From lines at the front of mes-
sages.
Printed 7/4/90 June 3
SENDMAIL(8) 1990 SENDMAIL(8)
g_\bN The default group id to use when calling
mailers.
H_\bf_\bi_\bl_\be The SMTP help file.
i Do not take dots on a line by themselves as a
message terminator.
L_\bn The log level.
m Send to ``me'' (the sender) also if I am in an
alias expansion.
o If set, this message may have old style headers.
If not set, this message is guaranteed to have
new style headers (i.e., commas instead of
spaces between addresses). If set, an adaptive
algorithm is used that will correctly determine
the header format in most cases.
Q_\bq_\bu_\be_\bu_\be_\bd_\bi_\br Select the directory in which to queue messages.
r_\bt_\bi_\bm_\be_\bo_\bu_\bt The timeout on reads; if none is set, _\bs_\be_\bn_\bd_\bm_\ba_\bi_\bl
will wait forever for a mailer. This option
violates the word (if not the intent) of the
SMTP specification, show the timeout should
probably be fairly large.
S_\bf_\bi_\bl_\be Save statistics in the named file.
s Always instantiate the queue file, even under
circumstances where it is not strictly neces-
sary. This provides safety against system
crashes during delivery.
T_\bt_\bi_\bm_\be Set the timeout on undelivered messages in the
queue to the specified time. After delivery has
failed (e.g., because of a host being down) for
this amount of time, failed messages will be
returned to the sender. The default is three
days.
t_\bs_\bt_\bz,_\bd_\bt_\bz Set the name of the time zone.
u_\bN Set the default user id for mailers.
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 _\bs_\be_\bn_\bd_\bm_\ba_\bi_\bl from suppressing the blanks from
between arguments. For example, a common alias is:
Printed 7/4/90 June 4
SENDMAIL(8) 1990 SENDMAIL(8)
msgs: "|/usr/bin/msgs -s"
Aliases may also have the syntax ``:include:_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be'' to
ask _\bs_\be_\bn_\bd_\bm_\ba_\bi_\bl to read the named file for a list of reci-
pients. For example, an alias such as:
poets: ":include:/usr/local/lib/poets.list"
would read /_\bu_\bs_\br/_\bl_\bo_\bc_\ba_\bl/_\bl_\bi_\bb/_\bp_\bo_\be_\bt_\bs._\bl_\bi_\bs_\bt for the list of
addresses making up the group.
_\bS_\be_\bn_\bd_\bm_\ba_\bi_\bl returns an exit status describing what it did. The
codes are defined in <_\bs_\by_\bs_\be_\bx_\bi_\bt_\bs._\bh>
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".
EX_NOHOST Host name not recognized.
EX_TEMPFAIL Message could not be sent immediately,
but was queued.
If invoked as _\bn_\be_\bw_\ba_\bl_\bi_\ba_\bs_\be_\bs, _\bs_\be_\bn_\bd_\bm_\ba_\bi_\bl will rebuild the alias
database. If invoked as _\bm_\ba_\bi_\bl_\bq, _\bs_\be_\bn_\bd_\bm_\ba_\bi_\bl will print the con-
tents of the mail queue.
F\bFI\bIL\bLE\bES\bS
Except for /etc/sendmail.cf, these pathnames are all speci-
fied in /etc/sendmail.cf. Thus, these values are only
approximations.
/etc/aliases raw data for alias names
/etc/aliases.pag
/etc/aliases.dir data base of alias names
/etc/sendmail.cf configuration file
/etc/sendmail.fc frozen configuration
/usr/share/misc/sendmail.hf help file
/var/log/sendmail.st collected statistics
/var/spool/mqueue/* temp files
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
binmail(1), mail(1), rmail(1), syslog(3), aliases(5),
mailaddr(7), rc(8);
DARPA Internet Request For Comments RFC819, RFC821, RFC822;
_\bS_\be_\bn_\bd_\bm_\ba_\bi_\bl - _\bA_\bn _\bI_\bn_\bt_\be_\br_\bn_\be_\bt_\bw_\bo_\br_\bk _\bM_\ba_\bi_\bl _\bR_\bo_\bu_\bt_\be_\br (SMM:16);
_\bS_\be_\bn_\bd_\bm_\ba_\bi_\bl _\bI_\bn_\bs_\bt_\ba_\bl_\bl_\ba_\bt_\bi_\bo_\bn _\ba_\bn_\bd _\bO_\bp_\be_\br_\ba_\bt_\bi_\bo_\bn _\bG_\bu_\bi_\bd_\be (SMM:7)
Printed 7/4/90 June 5