dovecot install notes

Home

Installing Dovecote MDA on a CentOS8 server taken from linuxbabe.com

1 Obtaining TLS Certificate with Apache Web Server

Several Steps must occur before this step. These steps below assume all services are running on one host. For my Seneca setup this is different. dns MX record for zintis.ops points to mv3.zintis.ops


vm1 runs apache and roundcubemail
vm2 runs postfix (smtp) and MTA
vm3 runs postfix (smtp) and MTA
         dovecot MDA
c8host runs MUA (Thunderbird)

I am making an important assumption here: That the apache virtual host for mail, called mail.zintis.ops is NOT the actual MX for zintis.ops which of course is vm3.zintis.ops Therefore I have underlined have changed below from linuxbabe's "mail.your-domain.com"

You need to have an Apache virtual host for mail.zintis.ops before obtaining Let’s Encrypt TLS certificate. Create the virtual host file:

sudo nano /etc/httpd/conf.d/mail.zintis.ops.conf # on vm1 the apache server Then paste the following text into the file.

   <VirtualHost *:80>        
      ServerName vm3.zintis.ops     # this the actual MX server, so vm3 ???

      DocumentRoot /var/www/html/
</VirtualHost>

Save and close the file. Reload Apache for the changes to take effect.

  • sudo systemctl reload httpd

Once virtual host is created and enabled, run the following command to obtain and install Let’s Encrypt TLS certificate.

  • sudo /usr/local/bin/certbot --apache --agree-tos --redirect --hsts --staple-ocsp --email zintis@zintis.ops -d vm3.zintis.ops

If this is a first run on your CentOS/RHEL server, you may be asked to install some dependency packages. Press y to continue.

After a while, you should see the following lines which means the certificate is successfully obtained. You can also see the directory under which your cert is stored.

2 Managing dovecot

3 dovecot files

Here are the main dovecot configuration files:

  • /etc/dovecot/dovecot.conf
  • /etc/dovecot/conf.d/10-ssl.conf
  • /etc/dovecot/conf.d/10-auth.conf
  • /etc/dovecot/conf.d/10-master.conf

4 Debugging

To turn on debug mode in Dovecot, please update below parameter in Dovecot config file dovecot.conf:

mail_debug = yes
Restart Dovecot service.

If you need authentication and password related debug message, turn on related settings and restart dovecot service.

auth_verbose = yes
auth_debug = yes
auth_debug_passwords = yes
auth_verbose_passwords = yes
If Dovecot service cannot start, please run it manually, it will print the error message on console:

dovecot -c /etc/dovecot/dovecot.conf

4.1 Home