welcome to netwrkspider

Wednesday, January 29, 2014

How to : Dovecot Dual Authentication Configuration on Centos 6.X/ Ubuntu Servers

How to : Dovecot Dual Authentication Configuration on Centos 6.X/ Ubuntu Servers

About : 
Dovecot supports defining multiple authentication databases, so that if the password doesn't match in the first database, it checks the next one. This can be useful if you want to easily support having both local system users in /etc/passwd or ldap or dual mysql and virtual users.

Currently the fallback works only with the PLAIN authentication mechanism.


The Following Steps are given below.

1 ) Open dovecot.conf configuration file on your Editor.

/usr/local/dovecot/etc/dovecot.conf

2 ) Check The following parameter on dovecot.conf configuration file.

passdb sql {
    # Path for SQL configuration file, see doc/dovecot-sql-example.conf
   args = /usr/local/dovecot/etc/dovecot-sql.conf
  }

  passdb sql {
    # Path for SQL configuration file, see doc/dovecot-sql-example.conf
   args = /usr/local/dovecot/etc/dovecot-sql2.conf
  }

# SQL database
  userdb sql {
    # Path for SQL configuration file, see doc/dovecot-sql-example.conf
    args = /usr/local/dovecot/etc/dovecot-sql.conf
  }

  userdb sql {
    # Path for SQL configuration file, see doc/dovecot-sql-example.conf
    args = /usr/local/dovecot/etc/dovecot-sql2.conf
  }

Note : I have configured two configuration file i.e dovecot-sql.conf
 and dovecot-sql2.conf for mysql-node1 and mysql-node2, If Mysql-node1 is down it'll authenticate with mysql-node2 server.

3 ) Restart the Dovecot services.

No comments: