Mail Administration Guide
  Procure somente este livro
Fazer download desta apostila em PDF

sendmail Options

B

sendmail Command-Line Arguments

Use command-line arguments on the /usr/lib/sendmail command line. These arguments are described in Table B-1.
Table B-1 sendmail
ArgumentDescription
-BtypeSelect the body type (7BIT or 8BITMIME).
-bxSet operation mode to x; operation modes are:

a Run in ARPANET mode.

d Run as a daemon.

i Initialize the alias database.

m Deliver mail (default).

p Print the mail queue.

s Use SMTP on input side.

t Run in test mode.

v Just verify recipients.
-CfileUse a different configuration file.
-dlevelSet debugging level.
Table B-1 sendmail(Continued)
ArgumentDescription
-FnameSet the full name of this user to name.
-fnameAn obsolete form of -r.
-hcntSet the "hop count" to cnt. It sets the number of times this message has been processed by sendmail (to the extent that it is supported by the underlying networks). cnt is incremented during processing, and if it reaches the value of configuration option h, sendmail returns the message with an error.
-M idAttempt to deliver the queued with the message-id id.
-nDo not do aliasing or forwarding.
-oxvalueSet configuration option x to the specified value.
-pprotocolSet the sending protocol; the protocol field can be in entered as protocol:host to set both the protocol and the sending host.
-qtimeTry to process the queued mail. If the time is given, sendmail repeatedly runs through the queue at the specified interval to deliver queued mail; otherwise, it runs only once.
-qXstringRun the queue once, limiting the jobs to those matching Xstring; the
letter X can be:

I Limit based on queue indentifier (see -M).

R Limit based on the recipient (see -R).

S Limit based on the sender.
-RstringAttempt to deliver any message with a recipient containing string.
-tRead the header for To:, Cc:, and Bcc: lines, and send to everyone listed in those lists. The Bcc: line is deleted before sending. Any names in the argument vector are deleted from the send list.
-vUse verbose mode.
-XlogfileLog all traffic in and out of sendmail in the indicated logfile.
These options are described in the next section, "sendmail Configuration Options."
You can specify several configuration options as primitive flags. These are the c, e, i, m, T, and v arguments. Also, you can specify the f configuration option as the -s argument.

sendmail Configuration Options

You can set the options shown in Table B-2 using the -o flag on the command line or the O line in the configuration file.
Table B-2 sendmail (1 of 5)
OptionDescription
AfileUse the named file as the alias file instead of /etc/mail/aliases.
If no file is specified, use aliases in the current directory.
atimeWait a set amount of time (in minutes) for an @:@ entry to exist in the alias database before starting up. If it does not appear after that time, rebuild the database.
BvalueBlank substitute. Default is the dot (.) character.
bnDisallow empty messages to more than n recipients.
CnCheck after n recipients.
cIf an outgoing mailer is marked as being expensive, do not connect immediately. A queue process must be run to actually send the mail.
DIf set, rebuild the alias database if necessary and possible. If this option is not set, sendmail never rebuilds the alias database unless explicitly requested with -bi.
dxDeliver in mode x. Legal modes are:

i..Deliver interactively (synchronously).

b..Deliver in background (asynchronously).

q..Queue the message (deliver during queue run).

EstringAppend error messages with string; if string starts with a slash, it is assumed to be the pathname of a file containing a message.
exDispose of errors using mode x. The values for x are:

p..Print error messages (default).
Table B-2 sendmail (2 of 5)
OptionDescription

q..No messages, just give exit status.

m..Mail back errors to sender.

w..Write back errors (mail if user not logged in).

e..Mail back errors and always give zero exit status.

FnThe temporary queue file mode, in octal. Values of 644 and 600 are good choices for n.
fSave UNIX-style From lines at the front of headers; normally they are assumed to be redundant and discarded.
gnSet the default group ID for mailers to run in to n.
HfileSpecify the help file for SMTP [Postel 82].
hnSet maximum hop count to n.
IInsist that the name server be running to resolve host requests.
iIgnore dots in incoming messages.
JpathSet the path for searching for users .forward files.
jSend error messages in MIME format.
KtimeoutSet the maximum amount of time a cached connection will be permitted to be idle.
knSelect the maximum number of open connections that will be cached at a time. The default is 1.
LnSet the default log level to n.
lIf there is an Errors-To: header, send the error messages to the addresses listed there.
MxvalueSet the macro x to value; this is intended only for use from the command line.
mSend to the sender also, even if the sender is in an alias expansion.
nValidate the RHS of aliases when rebuilding the aliases database.
OoptionsSet server SMTP options. The options are key=value pairs. The key can be:
Table B-2 sendmail Configuration Options (3 of 5)

 Option      Description  


Addr Address mask (the default value is INADDR_ANY). Family Address family (the default value is INET). Listen Size of listen queue (the default value is 10). Port Name/number of the listening port (the default value is smtp). o Assume that the headers may be in old format; that is, spaces delimit names. This flag actually turns on an adaptive algorithm: If any recipient name contains a comma, parenthesis, or angle bracket, it is assumed that commas already exist. If this flag is not on, only commas delimit names. Headers are always output with commas between the names. Pname Send the header from error messages from the MAILER-DAEMON to this name (which is the local postmaster). popt,opt Set privacy options. The value for opt can be: authwarnings Put X-Authentication-Warning: headers in messages. goaway Disallow SMTP status queries. needexpnhelo Insist on HELO or EHLO command before EXPN. needmailhelo Insist on HELO or EHLO command before MAIL. needvrfyhelo Insist on HELO or EHLO command before VRFY. noexpn Disallow EXPN. novrfy Disallow VRFY. public Allow open access. restrictmailq Restrict mailq command. restrictqrun Restrict -q command line flag to root and the owner of the queue. Qdir Use the named dir as the queue directory. qfactor Use factor as the multipler in the map function to decide when to just queue up jobs rather than run then; defaults to 600000.
Table B-2 sendmail Configuration Options (4 of 5)

 Option      Description  


rtimeouts Timeout reads after an interval.The timeouts argument is a list of keyword=value pairs.The recognized timeouts, their default and minimum values are: command Command read [1h, 3m]. datablock Data block read [1h, 3m]. datafinal Reply to a final "." in data [1h, 10m]. datainit Reply to DATA command [5m, 2m]. helo Reply to HELO or EHLO commands [5m, none]. ident IDENT protocol timeout [30s, none]. initial .Wait for initial greeting message [5m, 5m]. mail Reply to MAIL command [10m, 5m]. misc Reply to NOOP or VERB commands [2m, none]. quit Reply to QUIT command [2m, none]. rcpt Reply to RCPT command [1h, 5m]. rset Reply to RSET command [5m, none]. Sfile Save statistics in the named file. s Always initiate the queue file, even if you are going to try immediate delivery. sendmail always initiates the queue file before returning control to the client under any circumstance. Trtime/wtime Set the queue timeout to rtime. After this interval, messages that have not been successfully sent are returned to the sender. The wtime variable is optional and selects the time after which a warning message is sent. ttzinfo Set the time zone. un Set the default user ID for mailers to n. Mailers without the S flag in the mailer definition are run as this user. Vfallbackhost Select fallbackhost to act like a low priority MX on every host. v Run in verbose mode.
Table B-2 sendmail (5 of 5)
OptionDescription
wConnect directly to a host as though it has no MX records at all. This option is not recommended.
XnSet the load average value, so that the sendmail daemon refuses incoming SMTP connections when the system is overloaded to reduce system load. The default is 12, 0 disables this feature.
xnSet the load average value so that sendmail simply queues mail (regardless of the dx option) to reduce system load. Default is 8, 0 disables this feature.
YDeliver each job that is run from the queue in a separate process.
yfactorThe factor is added to the priority for each recipient (this lowering the
priority of the job for messages with many recipients). The default is 30000.
ZfactorThe factor is added to the priority for each recipient (this lowering the
priority of the job for messages with many recipients). The default is 90000.
zfactorThe factor is added to the priority every time a job is processed. The default is 1800.
7Strip input to seven bits for compatibility with old systems.

Mailer Flags

The flags you can set in the mailer description are described in Table B-3.
Table B-3 sendmail
FlagDescription
aRun Extended SMTP protocol
bForce a blank line at the end of a message.
CAppend the @domain clause from the sender to any names in the header that do not have an at sign (@) after being rewritten by rule set 3. This option is not recommended. This flag allows mail with headers with this form:

From: user1@local To: user2, user3@remote

to be automatically rewritten as:

Table B-3 sendmail(Continued)
FlagDescription

From: user1@local
To: user2@local, user3@remote
cD not include comments in addresses.
DLook for a Date: header line.
EEscape From lines to be >From (usually specified with U).
eAvoid connecting to this mailer, which is expensive, normally; any necessary connection occurs during a queue run.
FLook for a From: header line.
fLook for an -f from flag, but only if this is a network forward operation (that is, the mailer gives an error if the executing user does not have special permissions).
gSend error messages from the MAILER-DAEMON instead of using the null return address.
hPreserve uppercase in host names for this mailer.
ISelect SMTP when contacting another sendmail.
LLimit the line lengths as specified in RFC 821.
lPerform final delivery because this mailer is local.
MLook for a Message-Id: header line.
mEnable the mailer to send a message to multiple users on the same host in one transaction. When a $u macro occurs in the argv part of the mailer definition, that field is repeated as necessary for all qualifying users. The L= field of the mailer description can be used to limit the total length of the $u expansion.
nDo not insert a UNIX-style From line on the front of the message.
PLook for a Return-Path: line.
pAlways add local host name to the MAIL From: line of SMTP, even if there already is one.
rSend a -r flag. Performs the same function as -f.
SDo not reset the user ID before calling the mailer. This flag would be used in a secure environment where sendmail ran as root. This flag could be used to avoid forged names.
Table B-3 sendmail(Continued)
FlagDescription
sStrip quote characters off the name before calling the mailer.
ULook for UNIX-style From lines with the UUCP-style remote from <host> on the end.
uPreserve uppercase in user names for this mailer.
XUse the hidden dot algorithm as specified in RFC 821; basically, any line beginning with a dot will have an extra dot appended (to be stripped at the other end). This flag ensures that lines in the message containing a dot do not terminate the message prematurely.
xLook for a Full-Name: header line.
7Strip output to seven bits.