Dovecot is an IMAP/POP3 server, which is needed if users of your server want to access their mails using a mail client like Thunderbird.

Before installing Dovecot, you should have installed Postfix.

Using hints from:


Install the Debian packages:

$ sudo apt install dovecot-imapd dovecot-pop3d

Edit one line in your /etc/dovecot/dovecot.conf file:

listen = *, ::

Edit your /etc/dovecot/conf.d/10-auth.conf file:

disable_plaintext_auth = no
auth_mechanisms = plain login

Edit your /etc/dovecot/conf.d/10-mail.conf file:

mail_location = maildir:~/Maildir

IMPORTANT: Mail location parameters should be in sync. Above means that the postfix config parameter is home_mailbox = Maildir/.

Edit your /etc/dovecot/conf.d/10-master.conf file:

unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = postfix
    group = postfix
Edit your /etc/dovecot/conf.d/10-ssl.conf file::

ssl = yes ssl_cert = </etc/letsencrypt/live/ ssl_key = </etc/letsencrypt/live/

Control the dovecot service:

$ sudo systemctl enable dovecot.service
$ sudo systemctl stop dovecot.service
$ sudo systemctl start dovecot.service
$ sudo systemctl status dovecot.service