I was looking into how much work would be involved in getting
vmailmgr working with binc.  As it stands, the current use
of bincimap-auth-checkpassword + checkvpw + bincimap-uidpwd
would work except that checkvpw only does a chdir() to the
virtual domain's user's home directory; it also sets the
MAILDIR environment variable to an appropriate value.

It is assumed by checkvpw that one would invoke it via an
exec chain such as (a qmail-based pop3 example):

    exec ... qmail-popup domain \
             checkvpw \
             qmail-pop3d Maildir

In fact, checkvpw relies on having a Maildir argument in this
chain, which is rewritten by checkvpw when it does the next
exec (I'm not fond of this behaviour).  However, a binc chain
looks like this:

    exec ... bincimapd \
             bincimap-auth-checkpassword \
             checkpassword \
             bincimap-uidpwd

where this is not so much an exec chain, but an exec sub-chain
for an authenticator.  Any binc authenticator must take two
environment variables (BINC_USERID and BINC_PASSWD), perform
the necessary authentication, and write "<uid>.<gid>\n<dir>\n"
on stdout.

There are still good reasons not to use environment variables
for passing passwords to sub-processes.  Shouldn't an alternative
be considered?

I'm seeking advice from the binc community about how best to
approach the vmailmgr problem.  Some of my own ideas:

    1. write a replacement for bincimap-uidpwd which honours
       the MAILDIR environment variable and includes it as
       the trailing part of <dir> in its output.  This means
       that: vmailmgr's default-maildir would have to be
       changed depending on virtual/system user; or binc's
       conf setting Mailbox { path = "" } would be required.

    2. patch bincimap-uidpwd to do the same as 1.

    3. have the authenticator also return the maildir.
       if absent, the binc conf setting would be used.

    4. explore other options using only vmailmgr capabilities
       (nothing is obvious to me here)

The issue of checkvpw requiring a Maildir argument, which it
always tries to rewrite, remains a problem, so a checkvpw
replacement/patch seems quite reasonable too.

Comments/suggestions?
--
-dale

Reply via email to