I've been trying to get Postfix and Dovecot set up for days and I think I have resolved all problems except for one that just came up. When I try to restart Dovecot I get the following error message:
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: ssl enabled, but ssl_cert not set [....] Restarting IMAP/POP3 mail server: dovecotdoveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: ssl enabled, but ssl_cert not set
When I check dovecot.conf, there is nothing regarding ssl so I assume the error is referencing the settings in
10-ssl.conf. I noticed that the settings are commented out:
# ssl = no # ssl_cert = </etc/ssl/dovecot.pem # ssl_key = </etc/ssl/private/dovecot.pem
I know these were uncommented earlier but if I uncomment now, I get a different error at startup about unexpected value ssl in 10-ssl.conf. From the Dovecot wiki this value must be set even if it is overwritten by a specific protocol elsewhere.
If I leave the ssl values commented out I get the first error message about ssl being enabled but not set.
Earlier I had created a self-signed certificate using OpenSSL and was not receiving any error messages about ssl not being configured. In fact, I was able to login to pops from another client machine and it gave the usual warning about the certificate being untrusted. I did notice however that the cert referenced an incorrect hostname and this was caused earlier after I rebuilt my VPS and foolishly installed and configured Dovecot with incorrect hostname being set.
Well I purged all files and reinstalled. I have again deleted all keys and regenerated with OpenSSL a couple times but now I cannot even start Dovecot because of this error. I'm stuck and was wondering how I should approach this. Is it possible that something in Postfix referencing Dovecot is causing this?
Some sites say to check your syntax such as
ssl_cert = </etc vs
ssl_cert = /etc but this has not made a difference. I would also be happy to just temporarily disable ssl to get around the error, but that fails as well.
Just now I tried to create a symbolic link to the prebuilt keys in
/etc/dovecot.pem but I get the same message.