smtp_capabilities
The smtp_capabilities directive configures the SMTP capabilities advertised by the NGINX mail server.
Description
The smtp_capabilities directive is used in the context of an NGINX mail server to specify which capabilities the server will announce to clients during the SMTP session. This directive accepts one or more arguments that represent the supported SMTP features, such as AUTH, EXPN, and others. By default, NGINX will not advertise any capabilities unless this directive is specifically defined.
When you define the smtp_capabilities directive, you need to carefully consider the features you wish to enable. Each capability indicated will be included in the EHLO response during the SMTP handshake, letting the client know which features it can use. This can enhance compatibility with various email clients that rely on specific SMTP features. To ensure that clients can make effective use of the server, all necessary capabilities should be specified. However, it is important to only advertise capabilities that are actually supported by the server configuration, as this can lead to confusion and a poor user experience for email clients attempting to utilize unsupported features.
Parameters for the smtp_capabilities directive must be formatted correctly, and it should be placed within the appropriate mail server context for it to take effect. Care should be taken to follow the correct syntax to avoid misconfiguration. Each capability should be separated by spaces, and it is essential to ensure that spaces and available options are entered without introducing unintended errors or omissions.
Config Example
mail {
server {
listen 25;
smtp_capabilities AUTH LOGIN PLAIN;
}
}Ensure that all advertised capabilities are actually supported by your NGINX configuration, as misrepresenting capabilities can lead to client errors.
Do not include unsupported or experimental capabilities in production configurations to avoid compatibility issues.