When using namedvirtualbasedn, the login name should be in form 
'[EMAIL PROTECTED]' !

Bala, I can't really see your situation, I try to explain the way search is 
working:

1. qmail(-send) use mail and mailalternateaddress by default to find the ldap 
entry of the user. The search is started at the point defined in ldapbasedn. 
Mail addresses should be unique (globally as well...:).
2. auth_{pop|imap|smtp} (which actually retrieve the ldap entry for pop3d and 
others) use uid by default to find the ldap entry. The search is started as 
defined in ldapbasedn UNLESS you are using namedvirtualbasedn or 
ipvirtualbasedn (my patch) and there is a match for either the name or the IP 
address.

If you can get your users to use login names with domain part (which can 
resemble to an email-address however), you should use namedvirtualbasedn.
For those domains you can't, you have to allocate a separate IP address and 
use ipvirtualbasedn.

Note that my patch doesn't modify qmail-ldaplookup tool!

Kristof


kedd 17 febru�r 2004 13:07 d�tummal ezt �rta:
> Thanks all for the replies, Krisrtof, I applied
> the patch and created the file
>
>     "namedvirtualbasedn" with contents
>
>   st.com.sg:o=qmail,dc=MailServer
>   test.com.sg:o=qmail,dc=MailServer
>
> in my outlook express side user login=user1
>  mail id = [EMAIL PROTECTED]
>
>   then I can see ldap log the search entry(dn) same
> as working qmail search string, but still pop3d fails
>
> -----ldap log----
> is_object_subclass(1.3.6.1.4.1.7914.1.2.2.1,1.3.6.1.4.1.7914.1.2.2.1)
> 1
> => send_search_entry:
> dn="cn=user1,o=st.com.sg,o=qmail,dc=MailServer"
> ber_flush: 247 bytes to sd 9
> --------
>
>  what may the reason, am I doing anything wrong??
> your help will be greatly appreciated.
>
> thanks,
> -bala-
>
> --- Kristof Bajnok <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have a working patch for 20040101 which makes it
> > possible to define ldap
> > search base depending on POP3 IP address or pop3
> > login name. Should be
> > updated to the upstream version of qmail-ldap. (It
> > is not yet done because of
> > the simple fact that we are using 20040101
> > currently.)
>
> http://www.sztaki.hu/~bajnokk/qmail-ldap-virtual.html
>
> > See README.virtual after patching.
> >
> > Kristof
> >
> > >    by default qmail passes the correct search
> >
> > string,
>
> Example(dn="cn=user1,o=test.com.sg,o=qmail,dc=MailServe)
>
> > > so it got the unique result for the search,
> > >
> > >    but pop3d passing
> > >   dn="cn=user1,o=qmail,dc=MailServe, here it is
> > > missing domain in the search string, so it
> >
> > returning
> >
> > > same user in all the domains!
> > >
> > >    question is how to change the search string(dn)
> > > to ldap from pop3d??(ie same like qmail uses)

-- 
Kristof BAJNOK

MTA-SZTAKI
Computer and Automation Research Institute
Hungarian Academy of Sciences

Reply via email to