[Dovecot] question about mysql authentication

Chantal Rosmuller chantal at antenna.nl
Wed Jan 16 17:02:29 EET 2008


Hi list,

i use dovecot-1.0-1.2.rc15.el5 installed from rpm
centos 5.0

I cant get mysql authetication working: this is my /etc/dove-mysql.conf

######dove-mysql.conf should look like this##########
#db_host = 127.0.0.1
#db_port = 3306
db      = postfix
db_user = postfix
db_passwd = secret
db_client_flags = 0
default_pass_scheme = PLAIN
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'
####################ends here####################

When I use this conffile:

##############dovecot configured to work with virtual users############
base_dir = /var/run/dovecot/
protocols = imap pop3 imaps pop3s
login_dir = /var/run/dovecot-login
default_mail_env = 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 = mysql_auth
auth_userdb = mysql /etc/dovecot-mysql.conf
auth_passdb = mysql /etc/dovecot-mysql.conf
####################################ends here######################


i get this error:

Error in configuration file /etc/dovecot.conf line 13: Unknown setting: userdb

When I use this:
##############dovecot configured to work with virtual users############
base_dir = /var/run/dovecot/
protocols = imap pop3 imaps pop3s
login_dir = /var/run/dovecot-login
default_mail_env = 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 = mysql_auth
passdb sql {
   args = /etc/dovecot-mysql.conf
 }
 userdb  sql {
   args = /etc/dovecot-mysql.conf
 }
####################################ends here######################

i get the following error:

 Starting Dovecot Imap: Error: Error in configuration file /etc/dovecot.conf 
line 13: Unknown section type

What is the correct syntax?

Thank you


More information about the dovecot mailing list