As someone already wrote on this list, I experienced some problems while
testing PBS in a cluster environment. 

We do not have nfs storage: we have N different servers with users's
Maildirs spread among them.

The main problem is that (if you follow documentation) pbsadd is
executed only on the server that stores the users' Maildirs.

For instance, if I successfully authenticate on mx1, but my Maildir is
stored on mx2, pbsadd gets executed on mx2: the problem is that what
actually is added to the pbscache is mx1's IP address, and not the ip
address of the client.

So I thought of this (ugly) solution:

1. I use pbscheck with qmail-smtpd as described in qmail-ldap
documentation

2. I do NOT insert pbsadd in the run file for pop3d

3. I modified pbsadd.c in this way (at the end of the file)

done:
/*  execvp(*childargs,childargs); */
  _exit(0);

(I also commented out the execvp in the die_nomem() function)


Basically I want pbsadd to terminate and exit, and not to call any other
program.

Of course I also commented out the check on pbsadd's number of
arguments.


4. I addedd two system() calls to checkpassword.c in this way:

  4.1 just before auth_success

 system("/var/qmail/bin/pbsadd");
        auth_success(arg,....)

 4.2   just before forward_session is called


system("/var/qmail/bin/pbsadd");
                /* hostname is different, so I reconnect */
      log(8, "check_ldap: forwarding session to %s\n", info.host);
        forward_session(info.host, login->s, authdata->s);


By doing this I'm sure that pbsadd is called in both cases: if the
session has to be forwarded to another server, and also if the session
is already on the right server.


I know that this is ugly, but it seems to work.

Any comment will be appreciated

-- 
Enrico Cavalli
CILEA - via R. Sanzio 4, 20090 - Segrate (MI), Italy
phone: +39 02 26995.1 - fax: +39 02 2135520
email: [EMAIL PROTECTED]

Reply via email to