Skip to content

SMTP certificate check setting

When AyaNova connects to the SMTP server set in the notification settings to send email, it checks the mail server's security certificate. The certificate must be issued by a trusted certificate authority and must match the SMTP server address entered in the notification settings. This prevents someone on the network from posing as your mail server to collect the SMTP account password and the messages being sent.

Most mail servers and email providers have a certificate that passes this check and nothing needs to be done.

When the check fails

If the mail server's certificate can not be validated, email notifications are not sent. The Send test message option in the notification settings shows an error such as "The server's SSL certificate could not be validated", and failed deliveries are reported in the notification system as usual.

This can happen when:

  • the mail server uses a self-signed certificate or one issued by your organization's own internal certificate authority
  • the SMTP server address is entered as an IP address or a name that the certificate does not cover

The best fix is to correct the cause: enter the SMTP server address exactly as named in its certificate, or install your internal certificate authority as trusted on the computer running the AyaNova server. If neither is possible, the check can be switched off with this setting.

Default

If this setting is not specified the certificate is checked.

Overriding

AyaNova expects this value to be provided by a config.json property, environment variable or command line parameter named

AYANOVA_SMTP_ACCEPT_ANY_CERTIFICATE

Set it to true to accept any certificate from the mail server. Only do this for a mail server on a network you trust: without the check, the connection to the mail server is encrypted but AyaNova can not tell if it is talking to your real mail server.

When it is set, the AyaNova server log records a warning each time the server starts.

Example config.json entry

{
  ...other properties...
  "AYANOVA_SMTP_ACCEPT_ANY_CERTIFICATE": "true"
}

Example command line parameter

ayanova.exe --AYANOVA_SMTP_ACCEPT_ANY_CERTIFICATE="true"

Example environment variable

Windows

set "AYANOVA_SMTP_ACCEPT_ANY_CERTIFICATE=true"

Linux

export AYANOVA_SMTP_ACCEPT_ANY_CERTIFICATE="true"