Hello,

I have posted the question below but got no answers, so I am posting it again.

I really think this issue is a bug in qmail-ldap, the auth_pop program are
not returning appropriately when there is a session forwarding to another
host (ie, clustering).

In the function forward_session(), checkpassword.c, there is a call to
_exit(0) and not a call to execvp, so the next program in the tcpserver
chain (in this case, pbsadd) is not executed.

I could change the _exit(0) to execvp, but I don't know if it is ok to patch
the code this way, because then pbsadd will call another program, qmail-pop3d
which I think is not the correct behavior (it should really stop not before
executing pbsadd, but after, in the case of session forward). Comments ?

Sincerely,

Andre Gerhard
Universidade de Sao Paulo



On Wed, 28 May 2003 10:25:25 -0300
Andre Gerhard <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I am trying to setup the "pop before smtp" tools (pbsadd, etc.) to
> work in a cluster (qmail-ldap-1.03-20030401), but it is not working.
> 
> I have a frontend machine that receives pop connections from
> clients, and forward these connections to a backend machine which
> stores the mailbox of the user.
> 
> So in the frontend machine, qldapcluster=1 and in the backend
> machine, qldapcluster=0.
> 
> The pbsadd tool is working because I could add an IP manually,
> using for example:
> 
> #!/bin/sh
> TCPREMOTEIP=192.168.45.4
> export TCPREMOTEIP
> /var/qmail/bin/pbsadd /bin/true
> 
> I know that the IP was added to pbsdbd because I enabled the
> comments in the program that logs what pbsdbd is doing.
> 
> But if I use the following tcpserver line in the frontend
> machine, the pbsadd is never executed:
> 
> /usr/local/bin/tcpserver -c150 -R -H -D -v -1 -t120 0 pop3 \
> /var/qmail/bin/qmail-popup XXXX /var/qmail/bin/auth_pop /var/qmail/bin/pbsadd \
> /var/qmail/bin/qmail-pop3d Maildir 2>&1
> 
> The pop3 authentication works normally. In the tcpserver log, the last
> lines shown are:
> 
> 2003-05-28 10:03:17.227575500 check_ldap: forwarding session to YYYY
> 2003-05-28 10:03:17.495838500 tcpserver: end 29959 status 256
> 
> I suspect that the problem is in auth_pop, it is not returning correctly
> so the next program in the tcpserver chain is not being executed.
> 
> If I put the pbsadd program in the backend machine tcpserver it runs, but the
> TCPREMOTEIP is not the IP from the client, it is the IP from the frontend,
> so POP before SMTP will not work.
> 
> Any clues ?
> 
> 
> Sincerely,
> 
> Andre Gerhard
> Universidade de Sao Paulo
> 
> 
> 

Reply via email to