smtp_greeting_delay

The smtp_greeting_delay directive sets a delay before sending the SMTP greeting to clients upon connection.

Syntaxsmtp_greeting_delay time;
Defaultnone
Contextmail, mail server
Arguments1

Description

The smtp_greeting_delay directive is used within the NGINX Mail Core module to manage the timing of the SMTP greeting response. This directive specifies a delay (in seconds) that NGINX will introduce before presenting the greeting to SMTP clients after they connect to the mail server. This delay can help in mitigating certain types of spam or floods of connection attempts by forcing the clients to wait before receiving the response, which can provide advantages in rate limiting and controlling abusive behaviors.

This directive accepts a single argument that should indicate the time duration in seconds. The value must be a non-negative integer, and it will effectively influence the rapidity of the initial interaction between the mail server and any clients attempting to establish a session. For example, setting a value of 5 means that a client will wait 5 seconds after connecting before receiving the SMTP greeting.

When configured correctly, the smtp_greeting_delay helps in optimizing server resources and can serve as a tactical measure against certain types of denial of service (DoS) attacks, as it can slow down the rate of connections processed by the server. However, it is advisable to balance the delay to ensure that legitimate clients do not experience unnecessary waiting, which could impact their user experience negatively.

Config Example

mail {
    smtp_on;
    smtp_greeting_delay 5;
}

Setting the delay too high may frustrate legitimate users, leading to a poor user experience.

Make sure the specified time is in seconds; using non-numeric values will result in a configuration error.

← Back to all directives