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
On 1/16/2008, Chantal Rosmuller (chantal at antenna.nl) wrote:> i use dovecot-1.0-1.2.rc15.el5 installed from rpm > centos 5.0Old... upgrade... -- Best regards, Charles
On Wed, 2008-01-16 at 16:02 +0100, Chantal Rosmuller wrote:> When I use this:Starting from dovecot-example.conf would have worked better than trying to modify 0.99 configuration to work with v1.0.> auth = mysql_authReplace with: auth default {> passdb sql { > args = /etc/dovecot-mysql.conf > } > userdb sql {There's an extra space, probably doesn't matter, maybe does.> args = /etc/dovecot-mysql.conf > }} -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080116/eed66695/attachment-0002.bin>
On Wednesday 16 January 2008 17:32:33 you wrote:> On Wed, 2008-01-16 at 16:02 +0100, Chantal Rosmuller wrote: > > When I use this: > > Starting from dovecot-example.conf would have worked better than trying > to modify 0.99 configuration to work with v1.0.actually I got the configuration from a howto, maybe I should have looked at the example instead :)> > > auth = mysql_auth > > Replace with: > > auth default { > > > passdb sql { > > args = /etc/dovecot-mysql.conf > > } > > userdb sql { > > There's an extra space, probably doesn't matter, maybe does. > > > args = /etc/dovecot-mysql.conf > > } > > }Thanks! That works! However now I get an error in the logfiles: auth(default): Error in configuration file /etc/dovecot-mysql.conf line 4: Unknown setting: db Is there something wrong with my mysql configuration as well? ######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####################