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 (http://wiki.dovecot.org/AuthDatabase/SQL), 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:

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

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.

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

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.

link|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
feedback

1 Answer

up vote 0 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
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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