[Dovecot] mysql authentication problems

Dumitru Negara dumitru at itcnetworks.ro
Fri Apr 28 09:49:55 EEST 2006


This settings worked for me:

dovecot.conf
-----------------------
protocols = imap imaps pop3 pop3s
ssl_cert_file = /etc/dovecot/tls/dovecot.cert
ssl_key_file = /etc/dovecot/tls/dovecot.key
login = imap
login = pop3
first_valid_uid = 111 #id of user vmail
mail_extra_groups = mail
default_mail_env = maildir:/space/vmail/%d/%n
auth = default
auth_mechanisms = plain
auth_userdb = mysql /etc/dovecot/dovecot-mysql.conf
auth_passdb = mysql /etc/dovecot/dovecot-mysql.conf
auth_user = root
-----------------------

dovecot-mysql.conf
-----------------------
db_host = 127.0.0.1
db_port = 3306
db = postfix
db_user = dbuser
db_passwd = dbpass
db_client_flags = 0
default_pass_scheme = PLAIN
password_query = SELECT password FROM mailbox WHERE username = '%u'
user_query = SELECT maildir, 111 AS uid, 106 AS gid FROM mailbox WHERE 
username = '%u' #106 - id of group postfix
-----------------------

I followed this howto 
http://bliki.rimuhosting.com/space/knowledgebase/linux/mail/postfixadmin+on+debian+sarge

Regards,
Dumitru

Pedro Vieira wrote:
> Already did it... now i have this error:
>
> dovecot-auth: MySQL: Can't connect to database dovecot: Can't connect 
> to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2)
>
>
> I already have smoke comming out of my head.... :S
>
> Jon Baker wrote:
>> Um... uncomment your socket line perhaps?
>>
>> On Apr 27, 2006, at 5:46 PM, Pedro Vieira wrote:
>>
>>> db_host = localhost
>>> db_port = 3306
>>> #db_unix_socket = /var/run/mysqld/mysql.sock
>>> db = mydovecotdb
>>> db_user = mydovecotuser
>>> db_passwd = mydbpasswd
>>> db_client_flags = 0
>>
>


More information about the dovecot mailing list