Previous Section Next Section

Timeout

Set timeouts All versions

Many events can take a long time to complete—so long, in fact, that they can cause sendmail to appear to hang if they don't time out. For example, when reading commands or data from a remote SMTP connection, the other side can be so slow that it becomes necessary for the local sendmail to time out and break the connection. Similarly, when reading from its standard input, sendmail might find that the program feeding it information is taking so long that a timeout becomes necessary.

The V8 version of the sendmail program has introduced defaults for the amount of time it waits under various circumstances. The forms of the Timeout option are as follows:

O Timeout.keyword=value                          configuration file (V8.7 and later) 
-OTimeout.keyword=value                          command line (V8.7 and later) 
define(`conTO_keyword',` value')                 mc configuration (V8.7 and later) 
O Timeout=keyword=value,...                      configuration file (V8.6) 
-OTimeout=keyword=value,...                      command line (V8.6) 
define(`confREAD_TIMEOUT',``keyword=value,...'') mc configuration (V8.6) 
Orkeyword=value,...                              configuration file (V8.1 through V8.5) 
-orkeyword=value,...                             command line (V8.1 through V8.5) 
Ortime                                           configuration file (deprecated) 
-ortime                                          command line (deprecated) 

Prior to V8 sendmail, only a single time could be specified that set the timeout for all SMTP transactions. Beginning with V8 sendmail, a list of keyword and value pairs can be specified that set a wide assortment of timeouts.[65] In this section we focus on the current syntax. The recognized keyword words are listed in Table 24-25. The default and minimum value for each is described in the individual section. The minimums discussed in the subsections that follow are those recommended by RFC1123, Section 5.3.2, but they are not enforced.[66]

[65] When the argument to an m4 define command contains one or more commas, that argument should be enclosed in double half-quotes.

[66] Note that the defaults are intentionally higher than the recommended minimums. Setting timeouts too low can cause mail to fail unnecessarily.

Table 24-25. Timeout option keywords

Keyword

§

Meaning

aconnect

See this section

Wait for all connects (V8.12 and later)

auth

See this section

Wait for a reply in an SMTP AUTH dialog (V8.12 and later)

command

See this section

Wait for the next command

connect

See this section

Wait for connect(2) to return

control

See this section

Wait for control socket commands to finish (V8.10 and later)

datablock

See this section

Wait for each DATA block read

datafinal

See this section

Wait for acknowledgment of final dot

datainit

See this section

Wait for DATA acknowledgment

fileopen

See this section

Wait for an NFS file to open (V8.7 and later)

helo

See this section

Wait for HELO or EHLO

hoststatus

See this section

Duration of host status (V8.8 and later)

iconnect

See this section

Wait for connect(2) on first delivery attempt (V8.8 and later)

ident

See this section

Wait for RFC1413 identification protocol

initial

See this section

Wait for initial greeting message

lhlo

See this section

Wait for LHLO acknowledgment (V8.12 and later)

mail

See this section

Wait for MAIL FROM: acknowledgment

misc

See this section

Wait for other SMTP commands

queuereturn

See this section

Bounce if still undelivered (V8.7 and later)

queuewarn

See this section

Warn if still undelivered (V8.7 and later)

quit

See this section

Wait for QUIT acknowledgment

rcpt

See this section

Wait for RCPT TO: acknowledgment

resolver

See this section

Limits for DNS lookups (V8.10 and later)

rset

See this section

Wait for RSET acknowledgment

starttls

See this section

Wait for STARTTLS acknowledgment (V8.12 and later)

The value for each keyword is of type time (except for resolver.retry, which is numeric). The default, if a unit character is omitted, is minutes (except for resolver.retrans, which is seconds). For the queuewarn and queuereturn keywords, however, the defaults are hours and days, respectively. Note that some of the default values can seem overly long. This is intentional because some events can legitimately take a very long time. Consider, for example, a misconfigured DNS server. If you time out too soon, your performance will actually decrease because the timeouts will cause retransmits.

For the V8.7 and later mc technique, each keyword is declared with its corresponding confTO_ expression. For example, the keyword initial is declared like this:

define(`confTO_INITIAL',`5m')               mc configuration (V8.7 and later)

The particular confTO_ expression and its corresponding default value are listed with each keyword.

For compatibility with old configuration files, if no keyword= is specified, timeouts for the mail, rcpt, datainit, datablock, datafinal, and command keywords are set to the indicated value:

Or2h           set them to two hours

An example of the r option with keyword= pairs looks like this:

Orrcpt=25m,datablock=3h

With the V8.7 and later form of the Timeout option (where the earlier forms are all deprecated), individual timeouts can be listed more attractively like this:

O Timeout.rcpt      = 25m
O Timeout.datablock =  3h

For the previous two examples the timeout for acknowledgment of the RCPT TO: command (list a recipient) is 25 minutes and the timeout for acknowledgment of receipt of each line of the mail message is three hours. All the others that are not specified assume the default values.

The Timeout option is not safe. If specified from the command line, it can cause sendmail to relinquish its special privileges.

Timeout.aconnect (V8.12 and later)

When sendmail attempts to establish a network connection to another host, it uses the connect(2) system call. If the connection is going to fail, either that system call will time out (after an amount of time that varies with the operating system), or the connection will be immediately rejected. If there are additional hosts in the list of hosts to connect to, sendmail will proceed to the next host in the list and try to connect again.

If you wish to limit the total amount of time all these connection attempts will take, you can do so with this aconnect keyword to the Timeout option:

O Timeout.aconnect=timeout            configuration file (V8.12 and later) 
-OTimeout.aconnect=timeout            command line (V8.12 and later) 
define(`confTO_ACONNECT', `timeout')  mc technique (V8.12 and later) 

Here, timeoutis of type time. If the time is specified as zero (the default), no timeout is imposed.

Note that if the aconnect time limit is exceeded, delivery of the message will be deferred until the next queue run.

Also note that if the aconnect time limit is exceeded, and if the FallbackMXhost (FallbackMXhost) option was defined, a connection will be made to the host defined by the FallbackMXhost option.

Timeout.auth (V8.12 and later)

When sendmail connects to another site, it greets that site with an EHLO command. In return, the other site replies with a list of SMTP extensions it supports:

250-host.domain Hello some.domain, pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5          note this line
250-DELIVERBY
250 HELP

The local sendmail notes that the other site supports AUTH, so the local sendmail uses the AUTH command. The local sendmail then waits for the other side to begin its negotiating. The amount of time the local sendmail waits can be limited with this auth keyword, the forms of which are as follows:

O Timeout.auth=timeout            configuration file (V8.12 and later) 
-OTimeout.auth=timeout            command line (V8.12 and later) 
define(`confTO_AUTH', `timeout')  mc configuration (V8.12 and later) 

The timeout is set to 10m (10 minutes) by default. There is no recommended timeout. There is no default for the mc technique.

If authentication times out, the connection is closed.

Timeout.command (V8.6 and later)

When local sendmail is running as an SMTP server, it acknowledges any SMTP command sent to it by the other host and then waits for the next command. The amount of time the local sendmail waits for each command is defined with the command keyword, the forms of which are as follows:

O Timeout.command=timeout           configuration file (V8.6 and later) 
-OTimeout.command=timeout           command line (V8.6 and later) 
define(`confTO_COMMAND', `timeout') mc configuration (V8.6 and later) 

The default for timeout is one hour, and the minimum is specified as five minutes. The mc technique uses the confTO_COMMAND for which no default is defined. If a command is not received in time, the local sendmail assumes that the connection has hung and shuts it down.

Timeout.connect (V8.6 and later)

When sendmail attempts to establish a network connection to another host, it uses the connect(2) system call. If the connection is going to fail, that system call will time out after an amount of time that varies with the operating system. With some buggy versions of Linux, for example, the timeout is 90 minutes, whereas for other versions of Unix it is typically one to five minutes, and for newer versions of Unix it is 75 seconds.

When the amount of time to wait for a connection to fail is of concern, you can override the system value with the connect keyword to the Timeout option:[67]

[67] Note that you can decrease the system-defined timeout, but you cannot increase it.

O Timeout.connect=timeout            configuration file (V8.6 and later) 
-OTimeout.connect=timeout            command line (V8.6 and later) 
define(`confTO_CONNECT', `timeout')  mc configuration (V8.6 and later) 

If no timeout is specified, the default is to use the system-imposed timeout. No default is defined for the mc technique.

Note that if the connect(2) call times out, delivery will be deferred until the next queue run. If you wish the connect(2) to be tried again (as you might for a dial-on-demand machine), you should investigate the DialDelay option (DialDelay).

Timeout.control (V8.10 and later)

Beginning with V8.10, sendmail can now be controlled in a limited fashion via a Unix domain socket (see ControlSocketName). When it first detects that a command is ready on that socket, it sets a timeout before reading the command. That prevents sendmail from hanging if the controlling command is slow.

The timeout for the controlling socket is set like this:

O Timeout.control=timeout           configuration file (V8.10 and later) 
-OTimeout.control=timeout           command line (V8.10 and later) 
define(`confTO_CONTROL', `timeout') mc configuration (V8.10 and later) 

The default if this option is omitted is 2 minutes. The default for the mc configuration technique is to leave this timeout undefined.

Timeout.datablock (V8.6 and later)

The local sendmail buffers a mail message and sends it to the receiving site one line at a time. The amount of time that the receiving sendmail waits for a read to complete is set with the datablock keyword, the forms of which are as follows:[68]

[68] Writes by the sending sendmail are timed out on the basis of the DATA_PROGRESS_TIMEOUT macro (DATA_PROGRESS_TIMEOUT).

O Timeout.datablock=timeout           configuration file (V8.6 and later) 
-OTimeout.datablock=timeout           command line (V8.6 and later) 
define(`confTO_DATABLOCK', `timeout') mc configuration (V8.6 and later) 

The default timeout is one hour, and the specified minimum is three minutes. The mc technique uses confTO_DATABLOCK, which has no default.

Timeout.datafinal (V8.6 and later)

After the entire mail message has been transmitted, the local sendmail sends a lone dot to say that it is done, then waits for the receiving sendmail to acknowledge acceptance of that dot:

250 Mail accepted

The amount of time that the local sendmail waits for acknowledgment that the mail message was received is set with the datafinal keyword, the forms of which are as follows:

O Timeout.datafinal=timeout           configuration file (V8.6 and later) 
-OTimeout.datafinal=timeout           command line (V8.6 and later) 
define(`confTO_DATAFINAL', `timeout') mc configuration (V8.6 and later) 

The default timeout is one hour, and the specified minimum is 10 minutes. The mc technique uses confTO_DATAFINAL, which has no default. If the value is shorter than the time actually needed for the receiving site to deliver the message, the local sendmail times out before seeing the "Mail accepted" message when, in fact, the mail was accepted. This can lead to the local sendmail wrongly attempting to deliver the message later for a second time.

Timeout.datainit (V8.6 and later)

After all the recipients have been specified, the local sendmail declares that it is ready to send the mail message itself. It issues the SMTP DATA command to the other site:

DATA

The local sendmail then waits for acknowledgment, which looks like this:

354 Enter mail, end with "." on a line by itself

The amount of time that the local sendmail waits for acknowledgment of its DATA command is set with the datainit keyword, the forms of which are as follows:

O Timeout.datainit=timeout           configuration file (V8.6 and later) 
-OTimeout.datainit=timeout           command line (V8.6 and later) 
define(`confTO_DATAINIT', `timeout') mc configuration (V8.6 and later) 

The default timeout is five minutes, and the specified minimum is two minutes. The mc technique should use confTO_DATAINIT, which has no default.

Timeout.fileopen (V8.7 and later)

If a directory is remotely mounted and the server is down or not responding, an attempt to open a file in that directory can hang. Beginning with V8.7, the fileopen keyword sets the amount of time to wait for an open to complete.[69] The forms of this keyword are as follows:

[69] Note that this works only if the remote filesystem is mounted with the intr mount option.

O Timeout.fileopen=timeout           configuration file (V8.7 and later) 
-OTimeout.fileopen=timeout           command line (V8.7 and later) 
define(`confTO_FILEOPEN', `timeout') mc configuration (V8.7 and later) 

The default is 60 seconds. The mc technique uses confTO_FILEOPEN, which has no default.

Timeout.helo (V8.6 and later)

After the greeting, the local sendmail sends a HELO (or EHLO to get ESMTP) message to identify itself. That message looks something like this:

HELO here.us.edu

The other site then replies with acknowledgment of the local HELO or EHLO:

250 there.dc.gov  Hello here.us.edu, pleased to meet you

The amount of time the local sendmail waits for the other site to acknowledge the local HELO or EHLO is set with the helo keyword, the forms of which are as follows:

O Timeout.helo=timeout            configuration file (V8.6 and later) 
-OTimeout.helo=timeout            command line (V8.6 and later) 
define(`confTO_HELO', `timeout')  mc configuration (V8.6 and later) 

The default value is five minutes. There is no specified minimum, but we recommend no less than five minutes (because some sites use DNS to validate the hostname). The mc technique uses confTO_HELO, which has no default.

Timeout.hoststatus (V8.8 and later)

When processing the queue, sendmail saves the connection status of each host to which it connects and each host to which it fails to connect. It does this because an unsuccessful host should not be tried again during the same queue run. This makes sense when you consider that failures tend to remain failures for a while.

At sites that process huge queues, on the other hand, such behavior might not be appropriate. If it takes hours (rather than minutes) to process the queue, the likelihood increases that a previously failed connection might succeed. For such sites, V8.8 sendmail has introduced the Timeout.hoststatus option, the forms of which are as follows:

O Timeout.hoststatus=timeout           configuration file (V8.8 and later) 
-OTimeout.hoststatus=timeout           command line (V8.8 and later) 
define(`confTO_HOSTSTATUS', `timeout') mc configuration (V8.8 and later) 

Here, timeout is of type time. If timeout is present, it specifies the length of time that information about a host will be considered valid. If a queue run finishes faster than this interval, it has no effect. But when queue runs take longer than this interval, a previously down host will be given a second try if it appears in the queue again.

If timeout is missing, it is interpreted as zero, and no host information is ever saved. If the entire option is missing, the default is 30 minutes. The mc technique uses confTO_HOSTSTATUS, which has no default.

Note that this timeout is also used to time out persistent host status files when the purgestat(1) command is used (Section 15.1.4).

Timeout.iconnect (V8.8 and later)

When sendmail attempts to establish a network connection to another host, it uses the connect(2) system call. If the connection is going to fail, that system call will time out after an amount of time that varies with the operating system. You can override the system timeout with the connect keyword (See this section) to the Timeout option.

When outgoing mail is first processed, mail to responsive hosts should precede mail to sluggish hosts. To understand why, consider that all mail is processed serially during each queue run. If a sluggish host precedes all the other hosts in the queue, those other hosts will not even be tried until the sluggish host finishes or times out. With this in mind, the very first time sendmail attempts to deliver a message, it should enforce a shorter connect(2) timeout than it should for latter attempts.

Beginning with V8.8 sendmail, you can set an initial connect(2) timeout with the iconnect keyword to the Timeout option. Here are the forms:

O Timeout.iconnect=timeout           configuration file (V8.8 and later) 
-OTimeout.iconnect=timeout           command line (V8.8 and later) 
define(`confTO_ICONNECT', `timeout') mc configuration (V8.8 and later) 

If no timeout is specified or if the entire Timeout.iconnect option is omitted, the default is to time out the first connection the same as the timeout for all connections (i.e., it defaults to the setting for Timeout.connect). The mc technique uses confTO_ICONNECT, for which there is no default. The N line in the qf file (N line) determines whether this is the first attempt. If the value in that line is zero, this is the first delivery attempt.

Timeout.ident (V8.6 and later)

The sendmail daemon queries every outside connecting host with the RFC1413 identification protocol to record the identity of the user at the other end who made the connection and to verify the true name of the remote connecting host. The default timeout is to wait five seconds for a response. The ident keyword is used to change this timeout. If your site accepts mail from PCs running SMTP software, you might need to disable this feature. Some PCs get stuck when queried with the RFC1413 identification protocol. The forms of this keyword are as follows:

O Timeout.ident=timeout            configuration file (V8.6 and later) 
-OTimeout.ident=timeout            command line (V8.6 and later) 
define(`confTO_IDENT', `timeout')  mc configuration (V8.6 and later) 

If the timeout is zero, the ident protocol is disabled. The mc technique uses confTO_IDENT, for which there is no default.

Timeout.initial (V8.6 and later)

When sendmail first connects to a remote site, that site sends an initial greeting message. The greeting message always starts with 220 and might look something like one of these sample greetings:

220 host.domain ESMTP Sendmail 8.12.6/8.12.6; Fri, 13 Dec 2002 13:19:01 -0700 (PDT)
220 some.server.net - Maillennium ESMTP/MULTIBOX in2 #46
220 another.server.com ESMTP CommuniGate Pro 3.5.9
220 another.host.domain ESMTP mail_relay_in-xg3.9; Fri, 13 Dec 2002 16:22:35 -0400
220 organization.domain ESMTP Exim 3.34 #1 Fri, 13 Dec 2002 13:25:56 -0700

You can set an initial timeout with the initial keyword to the Timeout option, using one of these forms:

O Timeout.initial=timeout           configuration file (V8.6 and later) 
-OTimeout.initial=timeout           command line (V8.6 and later) 
define(`confTO_INITIAL', `timeout') mc configuration (V8.6 and later) 

The default for the greeting wait and the recommended minimum is five minutes.[70] The mc technique uses confTO_INITIAL, for which there is no default.

[70] Because DNS name resolution can time out and retry and can actually take up to five minutes!

Timeout.lhlo (V8.12 and later)

The sendmail program can use LMTP to deliver mail to a local delivery program. One such program is mail.local (Section 5.3). When sendmail first starts an LMTP connection, it sends the LHLO command. It then waits for the program to reply. The amount of time that sendmail waits for that reply is set with the lhlo keyword, the forms of which are as follows:

O Timeout.lhlo=timeout           configuration file (V8.12 and later) 
-OTimeout.lhlo=timeout           command line (V8.12 and later) 
define(`confTO_LHLO', `timeout') mc configuration (V8.12 and later) 

The default timeout is 2m (two minutes). There is no recommended wait interval. There is no default for the mc configuration technique.

Timeout.mail (V8.6 and later)

After sending HELO, EHLO, or LHLO, the local sendmail next sends the address of the sender (the envelope sender address) with the MAIL FROM: command:

MAIL From:<you@here.us.edu>

The local sendmail then waits for acknowledgment, which can look like this:

250 2.1.0 <you@here.us.edu>... Sender ok

The amount of time that the local sendmail waits for acknowledgment of its MAIL FROM: command is set with the mail keyword. Here are the forms:

O Timeout.mail=timeout            configuration file (V8.6 and later) 
-OTimeout.mail=timeout            command line (V8.6 and later) 
define(`confTO_MAIL', `timeout')  mc configuration (V8.6 and later) 

The default timeout is 10 minutes, and the specified minimum is five minutes. The mc technique uses confTO_MAIL, for which there is no default.

Timeout.misc (V8.6 and later)

During the course of mail transfer, the local sendmail can issue short miscellaneous commands. Examples are NOOP (which stands for no operation) and VERB (which tells the other side to enter verbose mode). The time that the local sendmail waits for acknowledgment of these miscellaneous commands is defined with the misc keyword. Here are the forms:

O Timeout.misc=timeout            configuration file (V8.6 and later) 
-OTimeout.misc=timeout            command line (V8.6 and later) 
define(`confTO_MISC', `timeout')  mc configuration (V8.6 and later) 

The default timeout is two minutes, and no minimum is specified. The mc technique uses confTO_MISC, for which there is no default.

Timeout.queuereturn (V8.7 and later)

This keyword determines a mail message's lifetime in the queue. Beginning with V8.7, this queuereturn keyword is used to set the amount of time a message must wait in the queue before it is bounced as nondeliverable. It uses these forms:

O Timeout.queuereturn=timeout           configuration file (V8.7 and later) 
-OTimeout.queuereturn=timeout           command line (V8.7 and later) 
define(`confTO_QUEUERETURN', `timeout') mc configuration (V8.7 and later) 

The queuereturn keyword can be further tuned on the basis of three possible levels of priority that a mail message can have. That is, the preceding forms set all three levels, whereas the following tune each level independently:

O Timeout.queuereturn.urgent=timeout           configuration file (V8.7 and later) 
O Timeout.queuereturn.normal=timeout           configuration file (V8.7 and later) 
O Timeout.queuereturn.non-urgent=timeout       configuration file (V8.7 and later) 
-OTimeout.queuereturn.urgent=timeout           command line (V8.7 and later) 
-OTimeout.queuereturn.normal=timeout           command line (V8.7 and later) 
-OTimeout.queuereturn.non-urgent=timeout       command line (V8.7 and later) 
define(`confTO_QUEUERETURN_URGENT',`timeout')  mc configuration (V8.7 and later) 
define(`confTO_QUEUERETURN_NORMAL',`timeout')  mc configuration (V8.7 and later) 
define(`confTO_QUEUERETURN_NONURGENT',`timeout')   mc configuration (V8.7 and later) 

The default for the mc configuration technique is to bounce all messages that remain in the queue for more than five days.

The keywords urgent, normal, and non-urgent correspond to the Precedence: header from the mail message. When the numeric equivalent of the Precedence: header as translated from the P line of the configuration file (see Section 25.10) is negative, the message is classified as nonurgent. When it is greater than zero, the message is classified as urgent. Otherwise, it is normal.

As of V8.7, a Priority: header is also available (see Priority:) to directly specify the message priority and thereby bypass the need to set the value using the Precedence: header.

Priority: urgent
Priority: normal
Priority: non-urgent

There is currently no way to specify a Priority: header's value from the sendmail command line.

Beginning with V8.10, in addition to an interval specification, you can use the literal term now to force an immediate bounce. This term is best used from the command line in conjunction with an appropriate queue specifier (see Section 11.8.2.3 and Section 11.8.2.5). For example:

% /usr/sbin/sendmail -qGbadqueue -OTimeout.queuereturn=now

Here, the messages in the queue group badqueue will all be bounced.

Timeout.queuewarn (V8.7 and later)

When a message is queued for longer than a predetermined time, sendmail sends a message to the sender explaining that the original message could not be delivered right away and that sendmail will keep trying. Beginning with V8.7, this queuewarn keyword is used to set the amount of time a message must wait in the queue before that explanation is mailed. Here are the forms:

O Timeout.queuewarn=timeout            configuration file (V8.7 and later) 
-OTimeout.queuewarn=timeout            command line (V8.7 and later) 
define(`confTO_QUEUEWARN', `timeout')  mc configuration (V8.7 and later) 

The queuewarn keyword can be futher tuned on the basis of three possible levels of priority that a mail message can have. That is, the preceding forms set all three levels, whereas the following tune each level independently:

O Timeout.queuewarn.urgent=timeout           configuration file (V8.7 and later) 
O Timeout.queuewarn.normal=timeout           configuration file (V8.7 and later) 
O Timeout.queuewarn.non-urgent=timeout       configuration file (V8.7 and later) 
-OTimeout.queuewarn.urgent=timeout           command line (V8.7 and later) 
-OTimeout.queuewarn.normal=timeout           command line (V8.7 and later) 
-OTimeout.queuewarn.non-urgent=timeout       command line (V8.7 and later) 
define(`confTO_QUEUEWARN_URGENT',`timeout')  mc configuration (V8.7 and later) 
define(`confTO_QUEUEWARN_NORMAL',`timeout')  mc configuration (V8.7 and later) 
define(`confTO_QUEUEWARN_NONURGENT',`timeout')   mc configuration (V8.7 and later) 

The defaults for the mc configuration technique are to send a warning for normal mail after four hours.

The keywords urgent, normal, and non-urgent correspond to the Precedence: header from the mail message. When the numeric equivalent of the Precedence: header as translated from the P line of the configuration file (see Section 25.10) is negative, the message is classified as nonurgent. When it is greater than zero, the message is classified as urgent. Otherwise, it is normal.

As of V8.7, a Priority: header is also available (see Priority:) to specify the message priority and thereby bypass the need to set the value using the Precedence: header:

Priority: urgent
Priority: normal
Priority: non-urgent

There is currently no way to specify a Priority: header's value from the sendmail command line.

Timeout.quit (V8.6 and later)

When the local sendmail is finished and wishes to break the connection, it sends the SMTP QUIT command:

QUIT

The other side acknowledges, and the connection is terminated:

221 2.0.0 there.dc.gov delivering mail

The time the local sendmail waits for acknowledgment of the QUIT command is defined with the quit keyword, the forms of which are as follows:

O Timeout.quit=timeout           configuration file (V8.6 and later) 
-OTimeout.quit=timeout           command line (V8.6 and later) 
define(`confTO_QUIT', `timeout') mc configuration (V8.6 and later) 

The default timeout is two minutes, and no minimum is specified. The mc technique uses confTO_QUIT, for which there is no default.

Timeout.rcpt (V8.6 and later)

After sending the MAIL FROM: command, the local sendmail issues one RCPT TO: command for each envelope recipient. One such RCPT TO: line might look like this:

RCPT To:<them@there.dc.gov>

The local sendmail then waits for acknowledgment, which looks like this:

250 2.1.5 <them@there.dc.gov>... Recipient ok

The amount of time that the local sendmail waits for acknowledgment of each RCPT TO: command is set with the rcpt keyword. Here are the forms:

O Timeout.rcpt=timeout             configuration file (V8.6 and later) 
-OTimeout.rcpt=timeout             command line (V8.6 and later) 
define(`confTO_RCPT', `timeout')   mc configuration (V8.6 and later) 

The default timeout value is one hour,[71] and the specified minimum is five minutes. The mc technique uses confTO_RCPT, for which there is no default.

[71] This timeout should be generously long because a recipient might be the name of a mailing list and the other side might take a long time to expand all the names in that list before replying.

Timeout.resolver (V8.10 and later)

The resolver library contains the routines for looking up hostnames and addresses with DNS. Those lookups can sometimes take a long time to complete, either because a host's nameserver is slow or down, or because of routing problems. Two timeout-type variables are available to limit how long these DNS lookups can take. One variable specifies the amount of time those routines wait between attempts to get the information. The other specifies the number of times those routines will retry to get the information. Beginning with V8.10 sendmail, the Timeout.resolver option allows you to alter one or the other, or both of these variables.

The Timeout.resolver option is used like this:

O Timeout.resolver.retrans=timeout          configuration file (V8.10 and later) 
O Timeout.resolver.retry=num                configuration file (V8.10 and later) 
-OTimeout.resolver.retrans=timeout          command line (V8.10 and later) 
-OTimeout.resolver.retry=num                command line (V8.10 and later) 
define(`confTO_RESOLVER_RETRANS', `timeout')    mc configuration (V8.10 and later) 
define(`confTO_RESOLVER_RETRY', `num')      mc configuration (V8.10 and later) 

Here, timeout sets the amount of time to wait between retries before a retransmission. The default is defined by your system's resolver library. A good recommended value is 5s (for five seconds).

The num is the number of retries allowed before giving up. The default is defined by your system's resolver library. A good recommended value is 4.

In addition to these gross adjustments, you can also differentiate between a first DNS lookup and subsequent DNS lookups. The first time a message is tried for delivery, you might want to set the retransmission and retry limits very low to screen out hard-to-deliver sites. Then for all the following (normal) tries, you can set those limits high so that all subsequent tries will likely succeed. You differentiate between the two by appending either a .first or .normal suffix to retrans or retry:

O Timeout.resolver.retrans.first=timeout           configuration file (V8.10 and later) 
O Timeout.resolver.retrans.normal=timeout          configuration file (V8.10 and later) 
O Timeout.resolver.retry.first=num                 configuration file (V8.10 and later) 
O Timeout.resolver.retry.normal=num                configuration file (V8.10 and later) 
-OTimeout.resolver.retrans.first=timeout           command line (V8.10 and later) 
-OTimeout.resolver.retrans.normal=timeout          command line (V8.10 and later) 
-OTimeout.resolver.retry.first=num                 command line (V8.10 and later) 
-OTimeout.resolver.retry.normal=num                command line (V8.10 and later) 
define(`confTO_RESOLVER_RETRANS_FIRST', `timeout') mc configuration (V8.10 and later) 
define(`confTO_RESOLVER_RETRANS_NORMAL', `timeout')    mc configuration (V8.10 and later) 
define(`confTO_RESOLVER_RETRY_FIRST', `num')       mc configuration (V8.10 and later) 
define(`confTO_RESOLVER_RETRY_NORMAL', `num')      mc configuration (V8.10 and later) 

Here, timeout could be short—say, 2s for the first try, and a more relaxed 10s for all subsequent delivery attempts. The num could similarly be fewer—say, 2 for the first try, and a more relaxed 5 for all subsequent delivery attempts.

Note that these retry and retrans timeouts can also be set for the dns (dns) and host (host) database-map types by using the corresponding -d and -r database-map K configuration command switches.

Timeout.rset (V8.6 and later)

If connection caching is enabled (see the ConnectionCacheSize option, ConnectionCacheSize), the local sendmail sends an SMTP RSET command to reset the other side. The time the local sendmail waits for acknowledgment of the RSET command is defined with the rset keyword. It looks like this:

O Timeout.rset=timeout            configuration file (V8.6 and later) 
-OTimeout.rset=timeout            command line (V8.6 and later) 
define(`confTO_RSET', `timeout')  mc configuration (V8.6 and later) 

The default timeout is five minutes, and no minimum is specified. The mc technique uses confTO_RSET, for which there is no default.

Timeout.starttls (V8.12 and later)

When sendmail connects to another site, it greets that site with an EHLO command. In return, the other site replies with a list of SMTP extensions it supports:

220 some.other.domain ESMTP service ready
EHLO host.your.domain
250-some.other.domain Pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-STARTTLS                         note
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
STARTTLS
220 2.0.0 Ready to start TLS         note
TLS negotiation begins here.

The local sendmail notes that the other site supports STARTTLS, so the local sendmail uses the STARTTLS command. The local sendmail then waits for the other side to begin the TLS negotiating. The amount of time the local sendmail waits can be limited with this starttls keyword:

O Timeout.starttls=timeout           configuration file (V8.12 and later) 
-OTimeout.starttls=timeout           command line (V8.12 and later) 
define(`confTO_STARTTLS', `timeout') mc configuration (V8.12 and later) 

The default timeout is one hour, and no minimum is specified. The mc technique uses confTO_STARTTLS, for which there is no default.

Previous Section Next Section