[Dovecot] authentication with userdb and passdb fails

2010-01-24 Thread Jure Lozar

Hello

I cannot retrieve mail via pop3 using dovecot. I have mail in my mailbox
(postfix works fine, maildir contains more then 5 mail files), I use
virtual user. I also changed auth to plaintext for debugging purpuse.

server:
Dovecot 1.0.7
CenoOS 5.4

client: Thunderbird on Kubuntu, username: j...@hrabri.org pass:jure


I tried different parameters and was closest to success with this:

Relevant parts from dovecot.conf:

auth default {
 mechanisms = plain login CRAM-MD5

 userdb passwd-file {
   args =   /home/vmail/%d/passwd
 }
 passdb passwd-file {
   args =   /home/vmail/%d/shadow
 }


log:

Jan 24 16:23:49 hermes dovecot: auth(default): new auth connection: pid=3304
Jan 24 16:23:51 hermes dovecot: auth(default): client in: AUTH  1
PLAIN   service=POP3lip=:::192.168.0.144
rip=:::192.168.0.112resp=
Jan 24 16:23:51 hermes dovecot: auth(default): client out: CONT 1
Jan 24 16:23:51 hermes dovecot: auth(default): client in: CONT  1
AGp1cmVAaHJhYnJpLm9yZwBqdXJl
Jan 24 16:23:51 hermes dovecot: auth(default): passwd-file
/home/vmail/hrabri.org/shadow: Read 1 users
Jan 24 16:23:51 hermes dovecot: auth(default):
passwd-file(j...@hrabri.org,:::192.168.0.112): lookup: user=jure
file=/home/vmail/hrabri.org/shadow
Jan 24 16:23:51 hermes dovecot: auth(default): client out: OK   1
user=j...@hrabri.org
Jan 24 16:23:51 hermes dovecot: auth(default): master in: REQUEST
1   33001
Jan 24 16:23:51 hermes dovecot: auth(default):
passwd(j...@hrabri.org,:::192.168.0.112): lookup
Jan 24 16:23:51 hermes dovecot: auth(default):
passwd(j...@hrabri.org,:::192.168.0.112): unknown user
Jan 24 16:23:51 hermes dovecot: auth(default): passwd-file
/home/vmail/hrabri.org/passwd: Read 1 users
Jan 24 16:23:51 hermes dovecot: auth(default):
passwd-file(j...@hrabri.org,:::192.168.0.112): lookup: user=jure
file=/home/vmail/hrabri.org/passwd
Jan 24 16:23:51 hermes dovecot: auth(default): master out: USER 1
j...@hrabri.org uid=501 gid=501
home=/home/vmail/hrabri.org/var/spool/mail/jure
Jan 24 16:23:51 hermes dovecot: pop3-login: Login:
user=j...@hrabri.org, method=PLAIN, rip=:::192.168.0.112,
lip=:::192.168.0.144
Jan 24 16:23:52 hermes dovecot: POP3(j...@hrabri.org): Disconnected:
Logged out top=0/0, retr=0/0, del=0/0, size=0


I don't really understand this log. Is says Client out: OK, and then
unknown user. Where? In passwd file? Adding domainname after username in
passwd only makes it worse. And why master in? I did not configure
master user.

Thanks for any help.

Jure




Re: [Dovecot] authentication with userdb and passdb fails

2010-01-24 Thread Timo Sirainen
On Sun, 2010-01-24 at 17:19 +0100, Jure Lozar wrote:
 Jan 24 16:23:51 hermes dovecot: auth(default):
 passwd(j...@hrabri.org,:::192.168.0.112): unknown user
 Jan 24 16:23:51 hermes dovecot: auth(default): passwd-file
 /home/vmail/hrabri.org/passwd: Read 1 users
..
 I don't really understand this log. Is says Client out: OK, and then
 unknown user. Where? In passwd file?

You've an extra userdb passwd {} in dovecot.conf. See dovecot -n output
for a list of all passdbs and userdbs. Make sure only the wanted ones
are there.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] authentication with userdb and passdb fails

2010-01-24 Thread Jure Lozar



Timo Sirainen wrote:

On Sun, 2010-01-24 at 17:19 +0100, Jure Lozar wrote:
  

Jan 24 16:23:51 hermes dovecot: auth(default):
passwd(j...@hrabri.org,:::192.168.0.112): unknown user
Jan 24 16:23:51 hermes dovecot: auth(default): passwd-file
/home/vmail/hrabri.org/passwd: Read 1 users


..
  

I don't really understand this log. Is says Client out: OK, and then
unknown user. Where? In passwd file?



You've an extra userdb passwd {} in dovecot.conf. See dovecot -n output
for a list of all passdbs and userdbs. Make sure only the wanted ones
are there.

  


I love you man :)
You were right - I forgot to comment out original setting.

Thank you,
Jure