[Dovecot] Strange behaviour with multiple auth channels

Søren P. Skou sps at t-rex.dk
Sat Jan 15 11:03:34 EET 2005


Hey all

Just upgraded to Test-61 and at first everything looked like it worked
without a hitch, I could log in and check mail (yay! ;-) ).

Since I could log in, I never suspected anything would be amiss. Later
one of my users told me he could no longer log in, regardless what he
tried. Password error I thought and told him to go change his password,
but then he explained he had not changed anything, and that his pop3
client just started complaining.

Ok, time to go looking - I compared the dovecot.conf to the example from
the tarball, nothing seemed as if it had changed. Then I started
fiddling around to see if I could get any pattern.

At that point I had two auth channels:
auth default {
  mechanisms = plain
  userdb =  sql /usr/local/etc/dovecot/sql.conf
  passdb =  sql /usr/local/etc/dovecot/sql.conf
  user = mail
}

auth localuser {
  mechanisms = plain
  userdb = passwd home=/home/%u/Mail
  passdb = passwd home=/home/%u/Mail
}

Strangely enough I could see it connecting to the SQL database, I would
have expected to see at least some queries when it checked for the user.
But no.

So I changed the configuration to:
auth default {
  mechanisms = plain
  userdb = passwd home=/home/%u/Mail
  passdb = passwd home=/home/%u/Mail
}

auth virtualuser {
  mechanisms = plain
  userdb =  sql /usr/local/etc/dovecot/sql.conf
  passdb =  sql /usr/local/etc/dovecot/sql.conf
  user = mail
}

Lo and behold, my virtual users could log in - but now localusers could
no longer. I've since then tried changing the auth default to auth
localuser, but little does it do - I'm sort of out of my bounds here,
everything works, but only if it is the second auth.

The first channel seems to be ignored. So I tried adding more channels
seeing what would happen. My current configuration looks like this:


auth default {
  mechanisms = plain
  userdb =  sql /usr/local/etc/dovecot/sql.conf
  passdb =  sql /usr/local/etc/dovecot/sql.conf
  user = mail
}

auth localuser {
  mechanisms = plain
  userdb = passwd home=/home/%u/Mail
  passdb = passwd home=/home/%u/Mail
}

auth virtualuser {
  mechanisms = plain
  userdb =  sql /usr/local/etc/dovecot/sql.conf
  passdb =  sql /usr/local/etc/dovecot/sql.conf
  user = mail
}

As I suspected it grabs hold of localuser and uses that one.

Any suggestions or "Well d'uh! you're missing...." would be welcome ;-)

Friendly greetings
S. P. Skou

-- 
GPG Key: 8E58ACB3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 209 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20050115/8db6729c/attachment.pgp


More information about the dovecot mailing list