📄 sendmail.8
字号:
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
.IR "Sendmail Installation and Operation Guide" .
The options are:
.TP
.RI AliasFile= file
Use alternate alias file.
.TP
HoldExpensive
On mailers that are considered ``expensive'' to connect to,
don't initiate immediate connection.
This requires queueing.
.TP
.RI CheckpointInterval= N
Checkpoint the queue file after every
.I N
successful deliveries (default 10).
This avoids excessive duplicate deliveries
when sending to long mailing lists
interrupted by system crashes.
.ne 1i
.TP
.RI DeliveryMode= x
Set the delivery mode to
.IR x .
Delivery modes are
`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.
.TP
.RI ErrorMode= x
Set error processing to mode
.IR x .
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
.I dead.letter
in the sender's home directory.
.TP
SaveFromLine
Save
UNIX-style
From lines at the front of messages.
.TP
.RI MaxHopCount= N
The maximum number of times a message is allowed to ``hop''
before we decide it is in a loop.
.TP
IgnoreDots
Do not take dots on a line by themselves
as a message terminator.
.TP
SendMimeErrors
Send error messages in MIME format.
If not set, the DSN (Delivery Status Notification) SMTP extension
is disabled.
.TP
.RI ConnectionCacheTimeout= timeout
Set connection cache timeout.
.TP
.RI ConnectionCacheSize= N
Set connection cache size.
.TP
.RI LogLevel= n
The log level.
.TP
.RI MeToo= False
Don't send to ``me'' (the sender) if I am in an alias expansion.
.TP
CheckAliases
Validate the right hand side of aliases during a
newaliases(1)
command.
.TP
OldStyleHeaders
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.
.TP
.RI QueueDirectory= queuedir
Select the directory in which to queue messages.
.TP
.RI StatusFile= file
Save statistics in the named file.
.TP
.RI Timeout.queuereturn= time
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 five days.
.TP
.RI UserDatabaseSpec= userdatabase
If set, a user database is consulted to get forwarding information.
You can consider this an adjunct to the aliasing mechanism,
except that the database is intended to be distributed;
aliases are local to a particular host.
This may not be available if your sendmail does not have the
USERDB
option compiled in.
.TP
ForkEachJob
Fork each job during queue runs.
May be convenient on memory-poor machines.
.TP
SevenBitInput
Strip incoming messages to seven bits.
.TP
.RI EightBitMode= mode
Set the handling of eight bit input to seven bit destinations to
.IR mode :
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.
.TP
.RI MinQueueAge= timeout
Sets how long a job must ferment in the queue between attempts to send it.
.TP
.RI DefaultCharSet= charset
Sets the default character set used to label 8-bit data
that is not otherwise labelled.
.TP
.RI DialDelay= sleeptime
If opening a connection fails,
sleep for
.I sleeptime
seconds and try again.
Useful on dial-on-demand sites.
.TP
.RI NoRecipientAction= action
Set the behaviour when there are no recipient headers (To:, Cc: or
Bcc:) in the message to
.IR action :
none
leaves the message unchanged,
add-to
adds a To: header with the envelope recipients,
add-apparently-to
adds an Apparently-To: header with the envelope recipients,
add-bcc
adds an empty Bcc: header, and
add-to-undisclosed
adds a header reading
`To: undisclosed-recipients:;'.
.TP
.RI MaxDaemonChildren= N
Sets the maximum number of children that an incoming SMTP daemon
will allow to spawn at any time to
.IR N .
.TP
.RI ConnectionRateThrottle= N
Sets the maximum number of connections per second to the SMTP port to
.IR N .
.PP
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
.B sendmail
from suppressing the blanks from between arguments.
For example, a common alias is:
.IP
msgs: "|/usr/bin/msgs -s"
.PP
Aliases may also have the syntax
.RI ``:include: filename ''
to ask
.B sendmail
to read the named file for a list of recipients.
For example, an alias such as:
.IP
poets: ":include:/usr/local/lib/poets.list"
.PP
would read
.I /usr/local/lib/poets.list
for the list of addresses making up the group.
.PP
.B Sendmail
returns an exit status
describing what it did.
The codes are defined in
.RI < sysexits.h >:
.TP
EX_OK
Successful completion on all addresses.
.TP
EX_NOUSER
User name not recognized.
.TP
EX_UNAVAILABLE
Catchall meaning necessary resources
were not available.
.TP
EX_SYNTAX
Syntax error in address.
.TP
EX_SOFTWARE
Internal software error,
including bad arguments.
.TP
EX_OSERR
Temporary operating system error,
such as
``cannot fork''.
.TP
EX_NOHOST
Host name not recognized.
.TP
EX_TEMPFAIL
Message could not be sent immediately,
but was queued.
.PP
If invoked as
.BR newaliases ,
.B sendmail
will rebuild the alias database. If invoked as
.BR mailq ,
.B sendmail
will print the contents of the mail queue.
If invoked as
.BR hoststat ,
.B sendmail
will print the persistent host status database.
If invoked as
.BR purgestat ,
.B sendmail
will purge expired entries from the persistent host status database.
If invoked as
.BR smtpd ,
.B sendmail
will act as a daemon, as if the
.B \-bd
option were specified.
.SH NOTES
.B 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,
.B 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
.BR DontBlameSendmail
option,
the permission problems should be fixed.
For more information, see:
.I http://www.sendmail.org/tips/DontBlameSendmail.html
.SH FILES
Except for the file
.I /etc/mail/sendmail.cf
itself the following pathnames are all specified in
.IR /etc/mail/sendmail.cf .
Thus,
these values are only approximations.
.PP
.TP
/etc/mail/aliases
raw data for alias names
.TP
/etc/mail/aliases.db
data base of alias names
.TP
/etc/mail/sendmail.cf
configuration file
.TP
/etc/mail/helpfile
help file
.TP
/etc/mail/statistics
collected statistics
.TP
/var/spool/mqueue/*
temp files
.SH SEE ALSO
binmail(1),
mail(1),
rmail(1),
syslog(3),
aliases(5),
mailaddr(7),
rc(8)
.PP
DARPA
Internet Request For Comments
.IR RFC819 ,
.IR RFC821 ,
.IR RFC822 .
.IR "Sendmail Installation and Operation Guide" ,
No. 8, SMM.
.PP
http://www.sendmail.org/
.SH HISTORY
The
.B sendmail
command appeared in
4.2BSD.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -