[Dovecot] login w/ IMAP & LDAP

Timo Sirainen tss at iki.fi
Wed Aug 13 00:19:54 EEST 2003


On Tuesday, Aug 12, 2003, at 23:40 Europe/Helsinki, Bob Hall wrote:

> I'm getting
> 	imap-login: Internal login failure: bob
> whenever I try to check mail. I'm new to mail server setup,
> new to IMAP, and I don't know a heck of a lot about authentication
> schemes.

There should be another error message before that line?

> If I try
> to test Dovecot using IMAP commands via telnet, Dovecot tells me
> 	LOGIN BAD Error in IMAP command received by server.

How did you try it? It should be:
1 login username password

> I also can't telnet via localhost; I have to specify the host name,
> so I'm connecting via the host's external interface. I have no
> problem connecting to localhost on ports not used by Dovecot.

I'd guess it's because localhost resolves to IPv6 localhost ::1, and 
Dovecot doesn't listen in IPv6 interfaces with *BSD fow now, since it 
requires two sockets.

> So I have two questions:
> 1) How do I correct my configuration to make login successful?

The real error message should be in the logs, but I'd guess it's got 
something to do with user ids. What uids have you given to users in 
LDAP? Are they smaller than 500, which is the default minimum accepted 
uid? You could change first_valid_uid in config file.

> Server configuration: IMAP
> IMAP Mailbox Location Prefix: /var/mail/bob/Mail
> Authentication Style: passwords

Don't give any IMAP prefix to clients.

> login_user = dovecot
> auth_user = dovecot

It's better not to use the same user for auth and login. Maybe I should 
add a check to disallow this entirely..



More information about the dovecot mailing list