Ian Bicking <[EMAIL PROTECTED]> wrote:
>
> I installed qmail, and it works fine. I tried setting up the POP
> server, and it's acting funny. When I connect it says "this user has
> no $HOME/Maildir", which is false, since the user most definitely has
> a Maildir.
There's lots of reasons for it to fail; the Maildir isn't owned by the
user, has incorrect permissions on the path leading to it, is named
incorrectly, etc.
> I start the POP server like this:
>
> tcpserver -H -R -c100 0 pop-3 /var/qmail/bin/qmail-popup \
> /bin/checkvpw /var/qmail/bin/qmail-pop3d './Maildir' &
>
> I tried changing './Maildir' to '/home/ianb/Maildir' (the user I'm
> connecting as), and it works! I started playing with strace and
> putting little bits of code into qmail-pop3d.c and checkpassword.c to
> figure out what's going on.
This shouldn't matter. Your checkpassword replacement is supposed to
set up $HOME, $USER, etc properly.
> It turns out that qmail-pop3d is being run with uid 0 (root), so it's
> trying to change to /root/Maildir (which doesn't exist) -- this is
> what I've found through strace (getuid() == 0, $HOME=="/root"). I've
> tried it with checkpassword, checkvpw, and checklocalpwd, and they all
> have the same behavior. I see that these programs are supposed to
> change to the uid of the user that is logging in.
>
> Well, now I'm pretty darned confused. This is on Linux RedHat, mostly
> with 6.0 components installed, glibc 2.1.1-6, qmail 1.03 installed
> from source.
The same thing here works just fine using vmailmgr. Perhaps your
vmailmgr installation (in particular, checkvpw) is broken or
misconfigured.
Charles
--
-----------------------------------------------------------------------
Charles Cazabon <[EMAIL PROTECTED]>
GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/
-----------------------------------------------------------------------