Re: LDAP Queries HELP

Pedro Algarvio <[email protected]> Wed, 07 Jun 2006 08:02:43 +0100
Newsgroups gmane.comp.isp.ispman.devel
Message-ID <[email protected]>
Quoting Pedro Algarvio <[email protected]>:

> Quoting Pedro Algarvio <[email protected]>:
>
>> I'm having troubles with the ldap queries, using my patch ->
>> http://sourceforge.net/tracker/index.php?func=detail&aid=1500104&group_id=8390&atid=308390
>>
>>   ;)
>>
>> Postfix config -> http://ispman.pastebin.com/758601
>> Cyrus config -> http://ispman.pastebin.com/758604
>> A log for a complete mail conversation -> http://ispman.pastebin.com/758616
>> LDAP entry for Both users used to create logs ->
>> http://ispman.pastebin.com/758618
>> LDAP entry for the domain -> http://ispman.pastebin.com/758620
>>
>> Basicly postfix is being unable to find the users in the virtual maps.
>> Any help would be much apreciated.
>>
>
>
> And here goes a good log, with the old ISPMan behaviour ->
> http://ispman.pastebin.com/758996
>
>
>
> --
> Pedro Algarvio
>    __ ___  ___ _______        ___ __
> |   Y   .'  _|   _   .-----.'  _|  |_   .-----.----.-----.
> |.  |   |   _|   1___|  _  |   _|   _|__|  _  |   _|  _  |
> |.  |   |__| |____   |_____|__| |____|__|_____|__| |___  |
> |:  1   |    |:  1   |                             |_____|
> |::.. . |    |::.. . |  ufs [AT] ufsoft [DOT] org
> `-------'    `-------'    ufs [AT] sapo [DOT] pt
>
>
> _______________________________________________
> Ispman-developers mailing list
> Ispman-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/ispman-developers
>
>


Ok, finaly the patch[1] is working.

The inital problem with the patch was that the mailRoutingAddress had
2 @'s, ie [email protected]@server_hostname. That got solved with
hightower/joerg's help.

We lost the seccond @ but had to let postfix know that he should take
care of the domain. So in a first attempt we simply added the domain
to $mydestination, and now postfix was able to deliver the message.

The seccond thing was to let postfix query ldap to see if it handled
the domain ot not for that I added ldap:ldapvirtualdomains to
$mydestination. Altough I said to joerg that it worked, aparently I
forgot to restart postfix. so the results a day after when I restart
postfix I notice that the ldap query was not working.

Today, with derjohn's help we made it happen. As I was about to write  
this email, I retried what had worked the night before and what we  
thought was failing, and it worked.

*ldapvirtualmydestination postfix config:*
ldapvirtualmydestination_version = 3
ldapvirtualmydestination_server_host = 10.1.0.50
ldapvirtualmydestination_server_port = 389
ldapvirtualmydestination_search_base = o=ispman,dc=DOMAIN,dc=TLD
ldapvirtualmydestination_query_filter =  
(&(objectclass=ispmanDomain)(ispmanDomainMailDeliveryMethod=local)(ispmanDomainDefaultMailDropHost=ispman)(ispmanDomain=%s))
ldapvirtualmydestination_result_attribute = ispmanDomain

Anyway, for domains handled by the same backend server all this works.

The next stage will be to make postfix reject to deliver messages that
are not meant to be handled by him.

For this I *do* need some help, I can't have two mailservers running  
with only one public ip, which is what I have.

So ppl, those who have more than me, get your hands on it! Please!?


1-http://sourceforge.net/tracker/index.php?func=detail&aid=1500104&group_id=8390&atid=308390
-- 
Pedro Algarvio
      __ ___  ___ _______        ___ __
|   Y   .'  _|   _   .-----.'  _|  |_   .-----.----.-----.
|.  |   |   _|   1___|  _  |   _|   _|__|  _  |   _|  _  |
|.  |   |__| |____   |_____|__| |____|__|_____|__| |___  |
|:  1   |    |:  1   |                             |_____|
|::.. . |    |::.. . |  ufs [AT] ufsoft [DOT] org
`-------'    `-------'    ufs [AT] sapo [DOT] pt