auth: Fatal: Unknown database driver ‘pgsql’

If you’re setting up Dovecot with PostgreSQL as a SQL backend, you need to set the kind of driver Dovecot will use in each authentication request.

If the setting is mistaken :

dovecot: auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_pgsql.so
dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
dovecot: auth: Fatal: Unknown passdb driver ‘pgsql’

Within RHEL 6, the driver parameter must be set within two different files :

/etc/dovecot/conf.d/auth-sql.conf.ext

driver = sql

/etc/dovecot/dovecot-sql.conf.ext

driver = pgsql

If this parameter is set properly, restart Dovecot and have a look at the log file used by Dovecot (/var/log/maillog for instance) :

root@localhost:~#service dovecot restart

root@localhost:~#grep -i dovecot /var/log/maillog

dovecot: auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_pgsql.so
dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so

No more mistake. You can go on and test the IMAP authentication.

For those using CentOS, please see this answer on Serverfault which may help you as well.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s