View Full Version : Dovecot MySQL broken on FC8?

21st January 2008, 09:00 PM
I have been searching for this all day, to no avail...

I have dovecot running with the mysql driver for the username and password. The section in dovecot.conf is this:

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


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

the content of /etc/dovecot-mysql.conf is:

driver = mysql
connect = user=XXXXX host=XXXXX dbname=XXXXX password=XXXXX
default_pass_scheme = PLAIN-MD5
password_query = SELECT vmailbox_password password FROM vmailbox WHERE vmailbox_user = '%u'
user_query = select concat('/var/mail/vhosts/', domain_name, '/', vmailbox_user) as mail, 5000 as uid, 5000 as gid from vmailbox, domain where vmailbox_user = '%u' and vmailbox.domain_id = domain.domain_id

This was working just fine in FC7. I just upgraded to FC8, and now get this in my logs:

Jan 21 11:59:25 liesl dovecot: Dovecot v1.0.7 starting up
Jan 21 11:59:25 liesl dovecot: auth(default): Unknown database driver 'mysql'
Jan 21 11:59:25 liesl dovecot: Auth process died too early - shutting down

The output of /usr/sbin/dovecot --build-options:

Build options: ioloop=poll notify=inotify ipv6 openssl
SQL drivers: mysql postgresql sqlite
Passdb: checkpassword ldap pam passwd passwd-file shadow sql
Userdb: checkpassword ldap passwd prefetch passwd-file sql static

It says the mysql driver is there but it doesn't recognize it. Like I said, this was working just fine under FC7, did something change as far as how it needs to be configured?


29th January 2008, 07:35 PM
We were facing a similar issue and succesfully nailed it down. You have to install dovecot-mysql as a seperate package on your newly upgraded fc8. It seems the mysql driver for dovecot doesnt come bundled for fc8.


29th January 2008, 07:59 PM
That did it, thanks!

24th February 2008, 08:17 PM
Hi guys, could someone post configuration fiel for virtual users. I currently use this and with the original it run well but with that it starts and then fails imidietly. Whaat I should put listen? imap_listen [::] does not work. Perhaps domain:993?

base_dir = /var/run/dovecot/
protocols = imap pop3 imaps pop3s
listen = *
login_dir = /var/run/dovecot-login
#protocol pop3 {}
#protocol imap {}
mail_location = mbox:/var/vmail/%d/%n
log_timestamp = "%Y-%m-%d %H:%M:%S "
log_path = /var/log/maillog
mail_extra_groups = mail
first_valid_uid = 150
last_valid_uid = 150
maildir_copy_with_hardlinks = yes
auth_debug = yes
auth_verbose = yes
auth default {
passdb sql {
args = /etc/dovecot/dovecot-mysql.conf
userdb sql {
args = /etc/dovecot/dovecot-mysql.conf

I edit this since I make study about the literature and found correct way to set up configuration. Now I have problems with mysql-config file where this file poin out. Does anyone have functional code?

Right.. I work with following but there is some mistake. So the issue is open.

driver = mysql
connect = user=mail host= dbname=mail password=mail
default_pass_scheme = PLAIN-MD5
password_query = SELECT password FROM mailbox WHERE username = '%u'
user_query = SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n' as mail, 150 AS uid, 12 AS gid,

concat('dirsize:storage=',quota) AS quota FROM mailbox WHERE username ='%u' AND active ='1'

Last row seem to the most dificult. What it does mean actualy and what it shoul look like?