View previous topic :: View next topic |
Author |
Message |
h0mer`- Apprentice
Joined: 02 Aug 2004 Posts: 215
|
Posted: Mon Jan 26, 2009 2:46 pm Post subject: [SOLVED] dovecot/mysql authentication problem |
|
|
Hi all,
i followed this guide - http://en.gentoo-wiki.com/wiki/Mail_server_using_Postfix_and_Dovecot
but i am having difficulties understanding the authentification part with mysql.
this is what i am getting in my system log:
Code: | dovecot: auth(default): client in: AUTH 1 PLAIN service=imap secured lip=[SERVERIP] rip=[CLIENTIP] lport=993 rport=21299 resp=AHBvc3RtYXN0ZXJAY2JveC5jYwBiVTFkMGczcHdu
dovecot: auth(default): client out: OK 1 user=postmaster@testdomain.com
dovecot: auth-worker(default): sql(postmaster@testdomain.com,[CLIENTIP]): query: SELECT username as user, password FROM mailbox WHERE username = 'postmaster@testdomain.com' AND active = 1
dovecot: auth(default): master in: REQUEST 1 16296 1
dovecot: auth(default): prefetch(postmaster@testdomain.com,[CLIENTIP]): passdb didn't return userdb entries
dovecot: auth(default): userdb(postmaster@testdomain.com,[CLIENTIP]): user not found from userdb prefetch
dovecot: auth(default): master out: NOTFOUND 1
dovecot: imap-login: Internal login failure (auth failed, 1 attempts): user=<postmaster@testdomain.com>, method=PLAIN, rip=[CLIENTIP], lip=[SERVERIP], TLS |
using the following query in mysql i get a valid user/password entry
Code: | SELECT username as user, password FROM mailbox WHERE username = 'postmaster@testdomain.com' AND active = 1 |
but what about those passdb and userdb errors from the system log?
this are the relevant parts of my config files
dovecot.conf
Quote: | passdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
userdb prefetch {
}
|
dovecot-sql.conf
Quote: | password_query = SELECT username as user, password FROM mailbox WHERE username = '%u' AND active = 1
user_query = SELECT CONCAT('/var/mail/', maildir) AS home, CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%u' AND active = 1
|
Last edited by h0mer`- on Tue Jan 27, 2009 11:42 am; edited 1 time in total |
|
Back to top |
|
|
magic919 Advocate
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Mon Jan 26, 2009 7:58 pm Post subject: |
|
|
Drop the prefetch. The logs are complaining that it's not returning data in the required format. |
|
Back to top |
|
|
h0mer`- Apprentice
Joined: 02 Aug 2004 Posts: 215
|
Posted: Mon Jan 26, 2009 9:44 pm Post subject: |
|
|
awesome - works. thanks.
what kind of password/login encryption should i use? |
|
Back to top |
|
|
magic919 Advocate
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Tue Jan 27, 2009 5:39 am Post subject: |
|
|
You'll be restricted to ones your clients can support. Take a look at what they can cope with. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|