[Dovecot] v1.0.alpha2, virtual domain authentication
Bonjour a tous,
In Dovecot v1.0.alpha2, authentication
according domain seems not working
passdb = passwd-file /etc/vmail/test.%d
%d is not resolved as "domain.name"
I browsed on mailing list post and found the
problem already reported...
What I can't figure out is the answer about it...
> Timo Sirainen tss at iki.fi
> Fri Jul 22 15:44:02 EEST 2005
> > Trying this and it doesn't work:
> >
> > passdb = passwd-file /etc/vmail/test.%d
> >
> > Apparently it doesn't expand the %d according to the log file.
>
> This has been asked enough now so I just implemented it in CVS. Could be
> still optimized a bit, but I think it's fast enough.
Could somebody on the list be kind enough to give me some
light about this? (is code to do this already implemented
(CVS) but not tested yet????)
Thanks for your help.
A bientot
========================================================================== Jean-Marc Pigeon Internet: Jean-Marc.Pigeon@safe.ca SAFE Inc. Phone: (514) 493-4280 Fax: (514) 493-1946 REGULUS, a real time accounting/billing package for ISP REGULUS' Home base <"http://www.regulus.safe.ca">
On Fri, 2005-09-23 at 09:10 -0400, Jean-Marc Pigeon wrote:
Bonjour a tous,
In Dovecot v1.0.alpha2, authentication according domain seems not working
passdb = passwd-file /etc/vmail/test.%d
%d is not resolved as "domain.name"
Are you sure you're *really* using alpha2? Because it wouldn't even start up if you specified "passdb = passwd-file" in config file since the settings format changed a bit. This should work:
passdb passwd-file { args = /etc/vmail/test.%d }
And I tested that it still does work.
Bonjour Timo Sirainen,
Bonjour a tous, [....] start up if you specified "passdb = passwd-file" in config file since
On Fri, 2005-09-23 at 09:10 -0400, Jean-Marc Pigeon wrote: the settings format changed a bit. This should work: (Yes, I duplicated previous mailing list posting)
passdb passwd-file { args = /etc/vmail/test.%d }
And I tested that it still does work. Was indeed working with alpha2 and tried with alpha3 it is (from my stand point) still NOT working
Here are my proceeding.
dovecot.conf extract
;---------------------------------------------------------------------- # passwd-like file with specified location passdb passwd-file { # Path for passwd-file #args = /home/safe/safetst/orque/clement/spool/mails/.passwd args = /home/safe/safetst/orque/clement/spool/mails/%d/.passwd } ;-- userdb static { # Template for settings. Can return anything a userdb could normally # return, eg.: uid, gid, home, mail, nice # # A few examples: # # args = uid=500 gid=500 home=/var/mail/%u # args = uid=500 gid=500 home=/home/%u mail=mbox:/home/%u/mail nice=10 # #args = args = uid=200 gid=200 mail=mbox:/home/safe/safetst/orque/clement/spool/mails/%d/%n } ;---------------------------------------------------------------------- "args = /home/safe/safetst/orque/clement/spool/mails/.passwd" IS WORKING.
if I duplicate .passwd file within directory domain "mylocal.test"
such as:
;---------------------------------------------------------------------- [safe@oslo mails]$ pwd /home/safe/safetst/orque/clement/spool/mails [safe@oslo mails]$ ls -ailsR .: total 16 9290069 4 drwxrwxr-x 3 safe safe 4096 Sep 24 09:06 . 9290063 4 drwxrwxr-x 7 safe safe 4096 Sep 23 15:03 .. 9289730 4 drwxrwxr-x 2 safe safe 4096 Sep 24 09:06 mylocal.test 9290307 4 -rw-rw-r-- 1 safe safe 65 Sep 23 15:03 .passwd ./mylocal.test: total 12 9289730 4 drwxrwxr-x 2 safe safe 4096 Sep 24 09:06 . 9290069 4 drwxrwxr-x 3 safe safe 4096 Sep 24 09:06 .. 9289731 4 -rw-rw-r-- 1 safe safe 65 Sep 24 09:06 .passwd ;---------------------------------------------------------------------- and use "args = /home/safe/safetst/orque/clement/spool/mails/%d/.passwd" Authentication is NOT successful
Logs show ;---------------------------------------------------------------------- Sep 24 09:07:38 oslo dovecot: Dovecot v1.0.alpha3 starting up Sep 24 09:07:51 oslo dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3 secured lip=127.0.0.1 rip=127.0.0.1 resp=AGx0ZXN0MUBteWxvY2FsLnRlc3QAeHg= Sep 24 09:07:53 oslo dovecot: auth(default): pam(ltest1@mylocal.test,127.0.0.1): pam_authenticate() failed: Authentication failure Sep 24 09:07:53 oslo dovecot: auth(default): passwd-file(ltest1@mylocal.test,127.0.0.1): unknown user Sep 24 09:07:53 oslo dovecot: auth(default): client out: FAIL 1 user=ltest1@mylocal.test Sep 24 09:08:03 oslo dovecot: pop3-login: Aborted login: user=ltest1@mylocal.test, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured ;----------------------------------------------------------------------
I even tried with
"args = /home/safe/safetst/orque/clement/spool/mails/%d.passwd"
which is very close to your example, still not work
So we are missing something.... But what?
Path too long???, wrong understanding?
Beside this small problem, I really like dovecot; a small, flexible,
focused, reliable piece of software... Thanks..
(We are trying to have "clement" (a small SMTP daemon of our own (GPL too)) to be
teamed with dovecot).
A bientot
========================================================================== Jean-Marc Pigeon Internet: Jean-Marc.Pigeon@safe.ca SAFE Inc. Phone: (514) 493-4280 Fax: (514) 493-1946 REGULUS, a real time accounting/billing package for ISP REGULUS' Home base <"http://www.regulus.safe.ca">
On Sat, 2005-09-24 at 09:30 -0400, Jean-Marc Pigeon wrote:
Sep 24 09:07:53 oslo dovecot: auth(default): passwd-file(ltest1@mylocal.test,127.0.0.1): unknown user
Ah, I think I know. You have the user in the file as ltest1@mylocal.test, right? If you use %d in the filename, Dovecot assumes you don't want the domains in the usernames in the file anymore, so it looks up only "ltest1" from there.
If you want to have user@domain also in the file, I changed the CVS code now so that you can use %0d and it'll work.
Bonjour Timo Sirainen,
On Sat, 2005-09-24 at 09:30 -0400, Jean-Marc Pigeon wrote:
Sep 24 09:07:53 oslo dovecot: auth(default): passwd-file(ltest1@mylocal.test,127.0.0.1): unknown user
Ah, I think I know. You have the user in the file as ltest1@mylocal.test, right? If you use %d in the filename, Dovecot assumes you don't want the domains in the usernames in the file anymore, so it looks up only "ltest1" from there. Bingo! it is working This is a logical implementation, I should had test this possibility... :-}}} Thanks.
If you want to have user@domain also in the file, I changed the CVS code now so that you can use %0d and it'll work.
A bientot
========================================================================== Jean-Marc Pigeon Internet: Jean-Marc.Pigeon@safe.ca SAFE Inc. Phone: (514) 493-4280 Fax: (514) 493-1946 REGULUS, a real time accounting/billing package for ISP REGULUS' Home base <"http://www.regulus.safe.ca">
participants (2)
-
Jean-Marc Pigeon
-
Timo Sirainen