Pages

Sunday, October 19, 2014

Dovecot Configuration with postfix MTA

We know there are some changes in new dovecot version. Let’s see how to configure new dovecot to work with postfix.


In new Dovecot package the single configuration file [dovecot.conf] has been divided in several files and stored in “/etc/dovecot/conf.d/” directory.

To get it work with postfix [without SMTP Authentication] we need to do the following.


File name: /etc/dovecot/conf.d/10-auth.conf

Unhash and Modify: disable_plaintext_auth = no


File name: /etc/dovecot/conf.d/10-mail.conf

Unhash and modify:    mail_location = mbox:~/mail:INBOX=/var/mail/%u [If you are using mailbox]

                                        mail_location = maildir:~/Maildir [If you are using Maildir]

                                        mail_privileged_group = mail

Now restart the dovecot service.


If you configure your postfix with SMTP authentication below changes are required.

File name: /etc/postfix/main.cf

Add / Modify:

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions =  permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
broken_sasl_auth_clients = yes

Dovecot Configuration with above modification:

File Name: /etc/dovecot/conf.d/10-master.conf

service auth {
# Postfix smtp-auth
        unix_listener /var/spool/postfix/private/auth {
        mode = 0666
        user = postfix
        group = postfix
  }

Restart dovecot service.