Contidos dentro
Localizar Mais Documentação
Destaques de Recursos de Suporte
| 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
| Argument | Description |
| -Btype | Select the body type (7BIT or 8BITMIME). |
| -bx | Set 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. |
| -Cfile | Use a different configuration file. |
| -dlevel | Set debugging level. |
-
Table B-1 sendmail(Continued)
| Argument | Description |
| -Fname | Set the full name of this user to name. |
| -fname | An obsolete form of -r. |
| -hcnt | Set 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 id | Attempt to deliver the queued with the message-id id. |
| -n | Do not do aliasing or forwarding. |
| -oxvalue | Set configuration option x to the specified value. |
| -pprotocol | Set the sending protocol; the protocol field can be in entered as protocol:host to set both the protocol and the sending host. |
| -qtime | Try 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. |
| -qXstring | Run 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. |
| -Rstring | Attempt to deliver any message with a recipient containing string. |
| -t | Read 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. |
| -v | Use verbose mode. |
| -Xlogfile | Log 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)
| Option | Description |
| Afile | Use the named file as the alias file instead of /etc/mail/aliases.
If no file is specified, use aliases in the current directory. |
| atime | Wait 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. |
| Bvalue | Blank substitute. Default is the dot (.) character. |
| bn | Disallow empty messages to more than n recipients. |
| Cn | Check after n recipients. |
| c | If an outgoing mailer is marked as being expensive, do not connect immediately. A queue process must be run to actually send the mail. |
| D | If 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. |
| dx | Deliver in mode x. Legal modes are:
i..Deliver interactively (synchronously).
b..Deliver in background (asynchronously).
q..Queue the message (deliver during queue run).
|
| Estring | Append error messages with string; if string starts with a slash, it is assumed to be the pathname of a file containing a message. |
| ex | Dispose of errors using mode x. The values for x are:
p..Print error messages (default). |
-
Table B-2 sendmail (2 of 5)
| Option | Description |
| 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.
|
| Fn | The temporary queue file mode, in octal. Values of 644 and 600 are good choices for n. |
| f | Save UNIX-style From lines at the front of headers; normally they are assumed to be redundant and discarded. |
| gn | Set the default group ID for mailers to run in to n. |
| Hfile | Specify the help file for SMTP [Postel 82]. |
| hn | Set maximum hop count to n. |
| I | Insist that the name server be running to resolve host requests. |
| i | Ignore dots in incoming messages. |
| Jpath | Set the path for searching for users .forward files. |
| j | Send error messages in MIME format. |
| Ktimeout | Set the maximum amount of time a cached connection will be permitted to be idle. |
| kn | Select the maximum number of open connections that will be cached at a time. The default is 1. |
| Ln | Set the default log level to n. |
| l | If there is an Errors-To: header, send the error messages to the addresses listed there. |
| Mxvalue | Set the macro x to value; this is intended only for use from the command line. |
| m | Send to the sender also, even if the sender is in an alias expansion. |
| n | Validate the RHS of aliases when rebuilding the aliases database. |
| Ooptions | Set 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)
| Option | Description |
| w | Connect directly to a host as though it has no MX records at all. This option is not recommended. |
| Xn | Set 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. |
| xn | Set 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. |
| Y | Deliver each job that is run from the queue in a separate process. |
| yfactor | The 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. |
| Zfactor | The 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. |
| zfactor | The factor is added to the priority every time a job is processed. The default is 1800. |
| 7 | Strip 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
| Flag | Description |
| a | Run Extended SMTP protocol |
| b | Force a blank line at the end of a message. |
| C | Append 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)
| Flag | Description |
| From: user1@local
To: user2@local, user3@remote |
| c | D not include comments in addresses. |
| D | Look for a Date: header line. |
| E | Escape From lines to be >From (usually specified with U). |
| e | Avoid connecting to this mailer, which is expensive, normally; any necessary connection occurs during a queue run. |
| F | Look for a From: header line. |
| f | Look 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). |
| g | Send error messages from the MAILER-DAEMON instead of using the null return address. |
| h | Preserve uppercase in host names for this mailer. |
| I | Select SMTP when contacting another sendmail. |
| L | Limit the line lengths as specified in RFC 821. |
| l | Perform final delivery because this mailer is local. |
| M | Look for a Message-Id: header line. |
| m | Enable 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. |
| n | Do not insert a UNIX-style From line on the front of the message. |
| P | Look for a Return-Path: line. |
| p | Always add local host name to the MAIL From: line of SMTP, even if there already is one. |
| r | Send a -r flag. Performs the same function as -f. |
| S | Do 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)
| Flag | Description |
| s | Strip quote characters off the name before calling the mailer. |
| U | Look for UNIX-style From lines with the UUCP-style remote from <host> on the end. |
| u | Preserve uppercase in user names for this mailer. |
| X | Use 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. |
| x | Look for a Full-Name: header line. |
| 7 | Strip output to seven bits. |
|
|