Dear All
here is the problem:
i have setup a virtual host delivery system as per
Paul Greg's instructions :-)
he uses a checkpoppasswd program to read a 'custom' password
file and do the authentication. i need to do something very similar
but use my own authentication backend.
it all *almost* works, but only "almost". i compared the preliminary setup
done by checkpoppasswd and my checkpop.pl and they both seem to
be supplying an identical environment to qmail-pop3d.
however, when i use my password checker, qmail-pop3d complains
that the user 'does not have a /Maildir/', the famous
-ERR this user has no $HOME/Maildir
error....
to double-check, this is what i have done. i changed checkpassword
to execvp() a small script that dumps the environment around it
back to the network connection. i changed my program to do
the same, and compared the two. looks identical!
the environment dumper then exec's qmail-pop3d
please help/suggest/whatever if you can...
here is the TELNET session of a connection made using Paul Greg's setup:
# telnet 0 pop3
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
+OK <[EMAIL PROTECTED]>
user tester
+OK
pass testpw
checkpoppass.... about to exec! <<this is output by checkpoppasswd>>
<< from here onwards
output is by showenv >>
SHOWENV: BLOCKSIZE=[K]
SHOWENV: HOME=[/var/qmail/popboxes/ideaglobal-com/tester]
SHOWENV: MAIL=[/var/mail/root]
SHOWENV: PATH=[/root/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin]
SHOWENV: SHELL=[/sbin/nologin]
SHOWENV: TERM=[su]
SHOWENV: USER=[popuser]
SHOWENV:
inetd_dummy=[xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
SHOWENV:
SHOWENV: uids are 888 and 888
SHOWENV: ARGV = /var/qmail/bin/qmail-pop3d Maildir
SHOWENV: -----------------------------
<< showenv is done >>
+OK
quit
+OK
<< those 3 lines are
output by qmail-pop3d >>
<< at this point i
could use LIST and RETR >>
<< and it works >>
Connection closed by foreign host.
<< message courtesy of
/usr/bin/telnet >>
**** And here is the session of a connection made to my passwd program
# telnet 0 pop3
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
+OK <[EMAIL PROTECTED]>
user tester
+OK
pass tester
<< showenv starts >>
SHOWENV: HOME=[/var/qmail/popboxes/ideaglobal-com/tester]
SHOWENV: SHELL=[/sbin/nologin]
SHOWENV: USER=[popuser]
SHOWENV:
SHOWENV: uids are 888 and 888
SHOWENV: ARGV = /var/qmail/bin/qmail-pop3d Maildir
SHOWENV: -----------------------------
<< showenv ends >>
-ERR this user has no $HOME/Maildir
<< -ERR comes from qmail-pop3d >>
Connection closed by foreign host.
<< message courtesy of
/usr/bin/telnet >>
= = = = = =
as you can see, the environment variables HOME/USER/SHELL are identical
in both cases, the real and effective uids are set to 888 in both cases
and the ARGV line which is used to exec() qmail-pop3d is identical
what the hell am i doing wrong ????
Kiril