Great, Thank you so much !
-----Message d'origine----- De : owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] De la part de Viktor Dukhovni Envoyé : mercredi 12 octobre 2011 16:47 À : postfix-users@postfix.org Objet : Re: multiple relay domain, relay_recipient_maps = ldap to differents servers On Wed, Oct 12, 2011 at 02:20:49PM +0000, Vianney Foucault wrote: > I did not find yet the way to achieve ldap check for differents domains. > > relay_domain = dom1.com, dom2.net > relay_recipient_maps = ldap:/etc/postfix/ldap-aliases.cf > > ldap-aliases.cf > > domain = dom1.com > server_host = ldap.dom1.com > version = 3 > search_base = dc=dom1, dc=dom > bind = no > > how can I tell postfix to use another ldap.cf to check recipients for domain > dom2.net . Add a second lookup table. Each table will only search for recipients in the corresponding domain, so you won't pay any substantial "cost" for the additional table, until you get to thousands of domains when comparing each table's domain against actual domain and the memory footprint of all the tables could become noticeable. Strongly consider using "proxy:ldap:...", instead of "ldap:...". main.cf: relay_recipient_maps = ldap:/etc/postfix/ldap-aliases-dom1.cf, ldap:/etc/postfix/ldap-aliases-dom2.cf ldap-aliases-dom1.cf: domain = dom1.com server_host = ldap.dom1.com version = 3 search_base = dc=dom1, dc=dom bind = no ldap-aliases-dom2.cf: domain = dom2.com server_host = ldap.dom2.com version = 3 search_base = dc=dom1, dc=dom bind = no