[Dovecot] Just setup Dovecot and having a small problem.
I've just installed Dovecot and am running into a bit of a problem with it. I'm using virtual email accounts and everything seems to be working up to a certain point. Let me break down how the server is setup.
Each domain belongs under the directory /mail so it's path is basically: /mail/domain.tld. Within each domain directory there are two sub-directories etc and mail. Under /mail/domain.tld/etc I have two files setup aliases and passwd, the aliases file handles all mail aliasing for that domain and the passwd file holds the users account name and password. The password file has the accounts stored in the following format:
user@domain.tld:(encrypted password):500:500:Virtual User:/mail/domain.tld/mail/user:/dev/null
The password enctryption is basically htpasswd() style encryption. Now the
problem I'm having is I keep getting authentication errors when I try to
login via POP3 (I'm testing via command line so I do telnet localhost 110
). At first I had only auth_debug_passwords=yes set and I was seeing
this in the log file:
Apr 23 18:54:19 www dovecot: auth(default): client in: AUTH^I1^IPLAIN^Iservice=POP3^Isecured^Ilip= 127.0.0.1^Irip=127.0.0.1^Iresp=AHRvbUBkZXRyb2l0b25saW5lLmNvbQBuZXdiZXJn Apr 23 18:54:19 www dovecot: auth(default): pam(user@domain.tld,127.0.0.1): pam_authenticate() failed: Authentication failure Apr 23 18:54:19 www dovecot: auth(default): passwd-file /mail/domain.tld/etc/passwd: Read 1 users Apr 23 18:54:19 www dovecot: auth(default): passwd-file(user@domain.tld, 127.0.0.1): unknown user Apr 23 18:54:20 www dovecot: auth(default): client out: FAIL^I1^Iuser= user@domain.tld
So I can see it's reading the proper password file but it claims that user doesn't exist, however, that user does exist. When I turn on auth_verbose=yes and I'm still seeing the same errors in the log file.
Can someone tell me what I'm missing here? I'm really on a time crunch with this, our mail server died friday morning and it's been put on me to fix it. They insist I use UW IMAP but I can't get it to work with the vitrtual users like the previous guy did. I've used Dovecot before but it's been two years and I can't remember how I got everything working before. They want things back to normal by Monday morning (tomorrow) so now I'm a bit stressed since I've lost most my weekend rebuilding the server and users.
Any help would be appreciated. I thought I had this setup just right but I just can't get passed it telling me the user doesn't exsist.
On Sun, 2006-04-23 at 19:12 -0400, Tom Ray wrote:
Apr 23 18:54:19 www dovecot: auth(default): pam(user@domain.tld,127.0.0.1): pam_authenticate() failed: Authentication failure
If you're authenticating from passwd-file, you probably should remove passdb pam from the config file?
Apr 23 18:54:19 www dovecot: auth(default): passwd-file /mail/domain.tld/etc/passwd: Read 1 users Apr 23 18:54:19 www dovecot: auth(default): passwd-file(user@domain.tld,127.0.0.1): unknown user Apr 23 18:54:20 www dovecot: auth(default): client out: FAIL^I1^Iuser=user@domain.tld
I'm guessing you've configured it like:
passdb passwd-file { args = /mail/%d/etc/passwd }
In which case Dovecot expects the users to be in the passwd file without their domains. Use %.0d (or was it %0.d) instead of %d and it should work.
Timo--
Actually, I did figure that out. It's been a long weekend. The problem I'm having now is the fact that I can login with POP3 and everything works but when I login with IMAP I get the following error:
PLAIN authentication failed. None of the authentication methods supported by your IMAP server (if any) are supported on this computer.
I'm using Outlook Express 6.x since that's what most all my clients use. Under auth_default{} I have it set with:
passdb passwd-file { args = /mail/%d/etc/passwd }
I have it set like that in both spots listed under auth_default, do I need to uncomment auth default_with_listener and set things up within there?
On 4/24/06, Timo Sirainen <tss@iki.fi> wrote:
On Sun, 2006-04-23 at 19:12 -0400, Tom Ray wrote:
Apr 23 18:54:19 www dovecot: auth(default): pam(user@domain.tld,127.0.0.1): pam_authenticate() failed: Authentication failure
If you're authenticating from passwd-file, you probably should remove passdb pam from the config file?
Apr 23 18:54:19 www dovecot: auth(default): passwd-file /mail/domain.tld/etc/passwd: Read 1 users Apr 23 18:54:19 www dovecot: auth(default): passwd-file(user@domain.tld,127.0.0.1): unknown user Apr 23 18:54:20 www dovecot: auth(default): client out: FAIL^I1^Iuser=user@domain.tld
I'm guessing you've configured it like:
passdb passwd-file { args = /mail/%d/etc/passwd }
In which case Dovecot expects the users to be in the passwd file without their domains. Use %.0d (or was it %0.d) instead of %d and it should work.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQBETMpVQ95cgkr2Z40RAp4eAJ9RBLT55ZvfSuWPErFmxd0HPWBOewCeMzZh AuIk3Z/4SbHqWGvntC5fLF8= =yT23 -----END PGP SIGNATURE-----
On Mon, 2006-04-24 at 09:06 -0400, Tom Ray wrote:
Timo--
Actually, I did figure that out. It's been a long weekend. The problem I'm having now is the fact that I can login with POP3 and everything works but when I login with IMAP I get the following error:
PLAIN authentication failed. None of the authentication methods supported by your IMAP server (if any) are supported on this computer.
I'm using Outlook Express 6.x since that's what most all my clients use. Under auth_default{} I have it set with:
passdb passwd-file { args = /mail/%d/etc/passwd }
I have it set like that in both spots listed under auth_default, do I need to uncomment auth default_with_listener and set things up within there?
But spots? You mean passdb and userdb? You don't want to have more than one auth block.
If you're running dovecot 1.0beta7, could you post the result of "dovecot -n", otherwise the whole auth block you have in the config file?
You have "mechanisms = plain" in there, right?
If you manually log in, what does the capability line say:
telnet imap.foo.org 143 x capability
participants (2)
-
Timo Sirainen
-
Tom Ray