First, install dovecot from the plesk panel.
it will likely fail to start, and that’s due to the ssl cert not being present according to the defaults, the default config looks like this:
#ssl_cert = #ssl_key =
We will reuse the ssl cert used by courier, which lives in /usr/share/imapd.pem
edit /etc/dovecot/dovecot.conf
you’ll see the defaults look like this:
#ssl_cert = </etc/dovecot/private/ssl-cert-and-key.pem
#ssl_key = </etc/dovecot/private/ssl-cert-and-key.pem
and change ssl_cert
and ssl_key
to:
ssl_cert = </usr/share/imapd.pem
ssl_key = </usr/share/imapd.pem
and restart dovecot:
service dovecot restart
— if for any reason you get an error like:
service dovecot start
Starting Dovecot Imap: Error: service(pop3-login): listen(*, 110) failed: Address already in use
Error: service(pop3-login): listen(*, 995) failed: Address already in use
Error: service(imap-login): listen(*, 143) failed: Address already in use
Error: service(imap-login): listen(*, 993) failed: Address already in use
then something is blocking the port (993 is what i cared, the about secure imap port), so i checked what was currently using it:
netstat -pan | grep 993
and it was being used by /portreserve
, so i killed its pid.
then started dovecot without any problems.