[Dovecot] dovecot: auth: Fatal: sql_driver_register(mysql): Already registered

kjhkg kjkjhgkhg szoftos at gmail.com
Mon Jan 3 02:57:33 EET 2011


Hi,

i've been using dovecot2 on our server for handling virtual mailboxes and
postfix is also using it to examine if a mail has to be delivered locally or
not. Recently i upgraded to 2.0.7 (freebsd ports), but it stopped working,
says the error in the subject line.

Details:
[root at postfixjail /usr/local/etc/dovecot]# dovecot --version
2.0.7

[root at postfixjail /usr/local/etc/dovecot]# grep -hv '^ *\(#.*\)\?$'
dovecot.conf conf.d/*
protocols = imap pop3 lmtp sieve
listen = *
dict {
    quota = mysql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext
    quota_rule2 = Trash:bytes=+100M
}
mail_location = maildir:~/Maildir
passdb {
    driver = sql
    args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
}
userdb {
    driver = prefetch
}
userdb {
    driver = sql
    args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
}
ssl = yes
ssl_cert = </etc/ssl/dovecot/dovecot.pem
ssl_key = </etc/ssl/dovecot/dovecot.pem
default_login_user = nobody
auth_cache_size = 0
auth_cache_ttl = 0
auth_cache_negative_ttl = 0
mail_plugins = $mail_plugins quota
plugin {
    quota = dict:User quota::proxy::quota
}
protocol imap {
    mail_plugins = quota imap_quota
}
protocol pop3 {
    mail_plugins = quota
}
log_path = syslog
plugin {
}
service imap-login {
    service_count = 1
    process_min_avail = 3
    inet_listener imap {
    }
    inet_listener imaps {
    }
}
service pop3-login {
    service_count = 1
    process_min_avail = 3
    inet_listener pop3 {
    }
    inet_listener pop3s {
    }
}
service lmtp {
    unix_listener lmtp {
    }
}
service imap {
}
service pop3 {
}
service auth {
    unix_listener auth-userdb {
        mode = 0600
        user = vmail
        group = vmail
    }
    unix_listener /var/spool/postfix/private/auth {
        mode = 0660
        user = postfix
        group = postfix
    }
}
service auth-worker {
}
service dict {
    unix_listener dict {
        mode = 0600
        user = vmail
  }
}
protocol lda {
  mail_plugins = $mail_plugins quota sieve
}
protocol lmtp {
    mail_plugins = $mail_plugins quota sieve
}
service managesieve-login {
    inet_listener sieve {
        port = 4190
    }
    service_count = 1
    process_min_avail = 2
}
service managesieve {
    process_limit = 1024
    process_min_avail = 2
}
protocol sieve {
    managesieve_max_line_length = 65536
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}

[root at postfixjail /usr/local/etc/dovecot]# grep -hv '^ *\(#.*\)\?$'
dovecot-dict-sql.conf.ext
connect = host=127.0.0.3 dbname=mailsql user=mailsql password=somepassword
map {
  pattern = priv/quota/storage
  table = quota2
  username_field = username
  value_field = bytes
}
map {
  pattern = priv/quota/messages
  table = quota2
  username_field = username
  value_field = messages
}

[root at postfixjail /usr/local/etc/dovecot]# grep -hv '^ *\(#.*\)\?$'
dovecot-sql.conf.ext
driver = mysql
connect = host=127.0.0.3 dbname=mailsql user=mailsql password=somepassword
default_pass_scheme = PLAIN-MD5
user_query = \
    SELECT maildir AS home, 'vmail' AS uid, 'vmail' AS gid, \
    CONCAT('*:bytes=', quota) AS quota_rule \
    FROM mailbox WHERE username = '%u' AND active = 1
password_query = \
    SELECT username AS user, password, \
    maildir AS userdb_home, \
    'vmail' AS userdb_uid, 'vmail' AS userdb_gid, \
    CONCAT('*:bytes=', quota) AS userdb_quota_rule \
    FROM mailbox WHERE username = '%u' AND active = 1
iterate_query = SELECT username AS user FROM mailbox

[root at postfixjail /usr/local/etc/dovecot]# uname -a
FreeBSD postfixjail.mymachine.com 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #4:
Sat Jan  1 23:33:01 CET 2011
root at new.mymachine.com:/usr/obj/usr/src/sys/MYKERNEL
amd64

The filesystem is ZFS (is that really needed?)

Any help on that? I'm helpless, went to the irc channel, but people told
that my configs are right.

Cheers,
Laszlo


More information about the dovecot mailing list