Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to configure Dovecot + Postfix + PostfixAdmin with postgresql support. I successfully configured postfix to send emails to aliases for my domain, and now I want to configure actual mailboxes support on my server. I followed the configuration options for database support on dovecot 2 wiki (, dovecot starts without errors, but at the first attempt to connect by IMAP, dovecot complains on maillog:

auth: Fatal: Unknown database driver 'pgsql'

I'm sure dovecot has postgres support, here's the output for dovecot --build-options:

Build options: ioloop=epoll notify=inotify ipv6 openssl io_block_size=8192
Mail storages: cydir dbox maildir mbox mdbox raw shared
SQL driver plugins: mysql postgresql sqlite
Passdb: checkpassword ldap pam passwd passwd-file shadow sql
Userdb: checkpassword ldap(plugin) nss passwd prefetch passwd-file sql

Additional information:


passdb {
  driver = pgsql
  # Path for SQL configuration file, see example-config/dovecot-sql.conf.ext
  args = /etc/dovecot/conf.d/dovecot-sql.conf.ext

For driver section I tried: 'pgsql, 'postgresql' and 'sql', I always get the error.


connect = host=localhost dbname=postfix user=postfix password=secret
default_pass_scheme = CRYPT
password_query = SELECT userid as user, password FROM users WHERE userid = '%u'
user_query = SELECT '/home/'||home AS home, uid, gid FROM users WHERE userid = '%u'

Any idea about something I'm missing? Thank you.

share|improve this question
Fixed by myself. I was missing the dovecot-pgsql package. Pretty trivial. – lorenzo.marcon Nov 25 '11 at 21:15
Feel free to post it as an answer and accept it when you can. – quanta Nov 26 '11 at 3:13
up vote 3 down vote accepted

On CentOS 6 is necessary to install not only the dovecot package, but also the additional modules, in this case the package dovecot-pgsql is also needed for postgresql support.

The right syntax for the driver line in /etc/dovecot/conf.d/auth-sql.conf.ext is:

driver = sql

and then the right driver is specified in /etc/dovecot/conf.d/dovecot-sql.conf.ext

driver = pgsql
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.