On the previous article we have seen how to configure postfix configuration for a mail server. In this second part we will be seeing how to configure and integrate dovecot to handle mail box.
Dovecot is an open-source Internet Message Access Protocol (IMAP) and Post Office Protocol version 3 (POP3) server application. It retrieves emails from Postfix and delivers them to the relevant mailbox on the mail server.
The main config file is /etc/dovecot/dovecot.conf, all other related files are included in the main config file.
To integrate IMAP with postfix we have already declared the parameters on /etc/postfix/main.cf files on the Part-I article,
Uncomment the protocol for accepting connections from external world,
$ vim /etc/dovecot/dovecot.conf
protocols = imap pop3
Changes to be done on authentication process file:
Disable plaintext autentication on 10-auth.conf file,
Update your authentication mechanisms to accept plain login, this auth_mechanisms parameter specifies the method that the email client uses to authenticate with Dovecot.
$ vim /etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = no
auth_mechanisms = plain login
Configuring Mail location:
The mail location can be configured by editing the /etc/dovecot/conf.d/10-mail.conf file,
$ vim /etc/dovecot/conf.d/10-mail.conf
Edit your mail location to,
mail_location = mbox:~/mail:INBOX=/var/mail/%u
This will set your mail location to /var/mail/ and respective user directory.
Comment the namespace declaration for inbox.
#namespace {
#inbox = no
#}
Enabling additional Mail plugins:
Add the below declaration inside the imap protocol in /etc/dovecot/conf.d/20-imap.conf that allows to create plugin automatically,
We have successfully configured IMAP server and SMTP server. Now we need an web interface to access our mail server and that can be done using a mail client Rouncube webmail. We will see how to setup Roundcube webmail on the following article Setting up a Mail server using Roundcube - Part-3 - Centos 7.
Comments