Articles in this section

Dovecot fails to start on Plesk server: Fatal: Error in configuration file /etc/dovecot/conf.d/14-plesk-sni-example.com.conf

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Dovecot service is unable to start with the following error message that can be found in /var/log/syslog:

CONFIG_TEXT: Nov 13 22:59:55 hostname systemd[1]: Starting Dovecot IMAP/POP3 email server...
Nov 13 22:59:55 hostname dovecot[16857]: doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/14-plesk-sni-example.com.conf line 7: ssl_cert: Can't open file /opt/psa/var/certificates/scfXrWfUa: No such file or directory
Nov 13 22:59:55 hostname systemd[1]: dovecot.service: Main process exited, code=exited, status=89/n/a
Nov 13 22:59:55 hostname systemd[1]: dovecot.service: Failed with result 'exit-code'.
Nov 13 22:59:55 hostname systemd[1]: Failed to start Dovecot IMAP/POP3 email server.

Cause

The certificate file name in Dovecot configuration differs from the actual certificate file configured for the domain in the Plesk psa database:

# plesk db "select ca_file from certificates where name like '%example%';"
+-----------+
| ca_file |
+-----------+
| scfOagbej |
+-----------+

Resolution

  1. Connect to a Plesk server via SSH.

  2. Open the file from the error /etc/dovecot/conf.d/14-plesk-sni-example.com.conf in a text editor. In this example, we are using the vi editor with the command:

    # vi /etc/dovecot/conf.d/14-plesk-sni-example.com.conf

  3. Modify the line that identifies the certificate file to match the one from the Plesk psa database:

    CONFIG_TEXT: /opt/psa/var/certificates/scfOagbej

  4. Save the file and restart the dovecot service:

    # systemctl restart dovecot

Was this article helpful?

Comments

1 comment
Date Votes
  • In our case, searching the Plesk database for the certificate returned no results. Additionally, the domain mentioned in the fatal error from dovecot was no longer listed under subscriptions or domains in the Plesk web interface.

    It looks like an outdated Dovecot SNI configuration file was still present. Running the following command regenerated/repaired the mail configuration and resolved the issue:

    plesk repair mail -y
    1

Please sign in to leave a comment.