The smtpSessionIdleTimeout option specifies, whether, and if yes, how long the mail sender backend keeps after sending a mail the connection to the SMTP server, expecting further mail send orders.
smtpSessionIdleTimeout |
<time> |
<time>
Max. idle time
Default: 0, i.e. immediate connection termination.
The specified <time> counts as seconds. If 0 is specified, then after sending a mail the connection to the SMTP server is closed immediately. Otherwise every 15 seconds is checked, whether the specified time is elapsed since the last mail sending. If yes, the connection to tne SMTP server is closed and reopened with the next mail send order.
When the connection is kept for a certain time, then when sending many mails during a very short time overhead for the connection setup can be saved; this is especially true when a TLS protection of the connection is requested, because the TLS handshake is especially 'expensive'. Some SMTP server limit the number of connections a client is allowed to make in a given time interval. On the other hand SMTP server limit the life time of idling connection, because these tie up server resources, i.e. with too high values for smtpSessionIdleTimeout one has to expect that the SMTP server quits the connection. Therefore the value should be normally below one minute. Together with the 15 seconds check interval this results in 10 or 25 secondes as a reasonable compromise.