Re: sender_dependent_relayhost_maps and ldap with multivalue attribute
Yes, i solved problem using how result_attribute a single-valued attribute. Thanks Victor Duchovni wrote: On Thu, Dec 03, 2009 at 01:57:07AM +0100, Giovanni Mancuso wrote: result_attribute = domains result_format = [127.0.0.1]:2501 expansion_limit = 1 But i have: postfix/trivial-rewrite[12577]: warning: dict_ldap_get_values[1]: /opt/postfix/etc/ldap/ldap_relaymaps.cf: Expansion limit exceeded for key: 'pi...@example1.org' If i delete example2.org and example3.org from ldap, it works correctly. If the domains attribute is multi-valued, or multiple entries match the query, you cannot use this schema to determine the relayhost. Your query must match a single LDAP entry and return a single-valued attribute. Postfix will not ignore attribute values in the result-set.
Re: sender_dependent_relayhost_maps and ldap with multivalue attribute
On Wed, 2 Dec 2009 20:51:16 -0500 (EST) Wietse Venema wie...@porcupine.org replied: Wietse: You must return a result that satisfies the documented syntax. http://www.postfix.org/postconf.html#relayhost Wietse, maybe it is something local to my machine; however that URL yields this result here: Not Found The requested URL /postconf.html was not found on this server. Apache/2.2.11 (Unix) PHP/5.2.8 mod_fastcgi/2.4.6 mod_ssl/2.2.11 OpenSSL/0.9.7e-p1 Server at www.postfix.cloud9.net Port 80 -- Jerry postfix.u...@yahoo.com TO REPORT A PROBLEM see http://www.postfix.org/DEBUG_README.html#mail TO (UN)SUBSCRIBE see http://www.postfix.org/lists.html A bird in the hand is worth what it will bring.
Re: sender_dependent_relayhost_maps and ldap with multivalue attribute
Zitat von Jerry postfix.u...@yahoo.com: On Wed, 2 Dec 2009 20:51:16 -0500 (EST) Wietse Venema wie...@porcupine.org replied: Wietse: You must return a result that satisfies the documented syntax. http://www.postfix.org/postconf.html#relayhost Wietse, maybe it is something local to my machine; however that URL yields this result here: Should be http://www.postfix.org/postconf.5.html#relayhost smime.p7s Description: S/MIME krytographische Unterschrift
Re: sender_dependent_relayhost_maps and ldap with multivalue attribute
On Thu, Dec 03, 2009 at 01:57:07AM +0100, Giovanni Mancuso wrote: result_attribute = domains result_format = [127.0.0.1]:2501 expansion_limit = 1 But i have: postfix/trivial-rewrite[12577]: warning: dict_ldap_get_values[1]: /opt/postfix/etc/ldap/ldap_relaymaps.cf: Expansion limit exceeded for key: 'pi...@example1.org' If i delete example2.org and example3.org from ldap, it works correctly. If the domains attribute is multi-valued, or multiple entries match the query, you cannot use this schema to determine the relayhost. Your query must match a single LDAP entry and return a single-valued attribute. Postfix will not ignore attribute values in the result-set. -- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header. To unsubscribe from the postfix-users list, visit http://www.postfix.org/lists.html or click the link below: mailto:majord...@postfix.org?body=unsubscribe%20postfix-users If my response solves your problem, the best way to thank me is to not send an it worked, thanks follow-up. If you must respond, please put It worked, thanks in the Subject so I can delete these quickly.
sender_dependent_relayhost_maps and ldap with multivalue attribute
Hi guys, I'm trying to configure my postfix to use a different relayhost if the sender of the email is in ldap. My ldap entry is: dn: SenderHost=exampleSender,o=AllHost objectClass=provider domains: example1.org domains: example2.org domains: example3.org The domain attribute is multivalue. If the mail from of email is *...@example1.org, *...@example2.org or *...@example3.org the relay host is not the default relayhost. My configuration is: (main.cf) relayhost = [127.0.0.1]:2500 sender_dependent_relayhost_maps = ldap:/opt/postfix/etc/ldap/ldap_relaymaps.cf smtpd_recipient_restrictions = check_recipient_access ldap:/opt/postfix/etc/ldap/ldap_mailboxlocali.cf, reject (/opt/postfix/etc/ldap/ldap_relaymaps.cf) server_host = ldap://x.x.x.x server_port = 389 search_base = SenderHost=exampleSender,o=AllHost scope = sub query_filter = ((domains=%d)(objectClass=provider)) result_attribute = domains result_format = %s [127.0.0.1]:2501 In this way, if my search ldap return attributes, it should use example1.org [127.0.0.1]:2501 in sender_dependent_relayhost_maps. Is it correct? But in this way, it doesn't work ( I think because domains is a multi values attribute). In my log i have: Dec 3 00:31:54 sword postfix/cleanup[11868]: F3F9FC36F0: message-id= Dec 3 00:31:54 sword postfix/qmgr[11863]: F3F9FC36F0: from=pi...@example1.org, size=174, nrcpt=1 (queue active) Dec 3 00:31:54 sword postfix/smtp[11869]: fatal: valid hostname or network address required in server description: example1.org [127.0.0.1]:2501,example2.org [127.0.0.1]:2501,example3.org [127.0.0.1]:2501 Dec 3 00:31:55 sword postfix/qmgr[11863]: warning: private/smtp socket: malformed response Dec 3 00:31:55 sword postfix/qmgr[11863]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description Dec 3 00:31:55 sword postfix/qmgr[11863]: warning: connect to transport private/retry: Connection refused Dec 3 00:31:55 sword postfix/master[11862]: warning: process /opt/postfix/usr/libexec/smtp pid 11869 exit status 1 Dec 3 00:31:55 sword postfix/master[11862]: warning: /opt/postfix/usr/libexec/smtp: bad command startup -- throttling Dec 3 00:31:55 sword postfix/qmgr[11863]: F3F9FC36F0: to=u...@green.it, relay=none, delay=4.9, delays=3.9/1/0/0, dsn=4.3.0, status=deferred (mail transport unavailable) How can i solve this problem?? Thanks
Re: sender_dependent_relayhost_maps and ldap with multivalue attribute
Giovanni Mancuso: Hi guys, I'm trying to configure my postfix to use a different relayhost if the sender of the email is in ldap. You must return a result that satisfies the documented syntax. http://www.postfix.org/postconf.html#relayhost Wietse
Re: sender_dependent_relayhost_maps and ldap with multivalue attribute
Thanks for answer. But, can i configure ldap search to manage multivalue in entry? I tried with: server_host = ldap://x.x.x.x server_port = 389 search_base = SenderHost=exampleSender,o=AllHost scope = sub query_filter = ((domains=%d)(objectClass=provider)) result_attribute = domains result_format = [127.0.0.1]:2501 expansion_limit = 1 But i have: postfix/trivial-rewrite[12577]: warning: dict_ldap_get_values[1]: /opt/postfix/etc/ldap/ldap_relaymaps.cf: Expansion limit exceeded for key: 'pi...@example1.org' If i delete example2.org and example3.org from ldap, it works correctly. Bye Wietse Venema wrote: Giovanni Mancuso: Hi guys, I'm trying to configure my postfix to use a different relayhost if the sender of the email is in ldap. You must return a result that satisfies the documented syntax. http://www.postfix.org/postconf.html#relayhost Wietse
Re: sender_dependent_relayhost_maps and ldap with multivalue attribute
Wietse: You must return a result that satisfies the documented syntax. http://www.postfix.org/postconf.html#relayhost Giovanni Mancuso: Thanks for answer. But, can i configure ldap search to manage multivalue in entry? See my previous reply, above. Wietse
Re: sender_dependent_relayhost_maps and ldap with multivalue attribute
Wietse Venema wrote: Giovanni Mancuso: I'm trying to configure my postfix to use a different relayhost if the sender of the email is in ldap. You must return a result that satisfies the documented syntax. http://www.postfix.org/postconf.html#relayhost On Thu, Dec 03, 2009 at 01:57:07AM +0100, Giovanni Mancuso wrote: Thanks for answer. But, can i configure ldap search to manage multivalue in entry? LDAP_README might help with specifics. I can't, I don't speak much LDAP. But i have: postfix/trivial-rewrite[12577]: warning: dict_ldap_get_values[1]: /opt/postfix/etc/ldap/ldap_relaymaps.cf: Expansion limit exceeded for key: 'pi...@example1.org' postmap(1) has a -q option which is just what you need for testing. When postmap -q loo...@address ldap:/your/query/file returns a result suitable for relayhost (see postconf(5) link above), you will know your query is right. -- Offlist mail to this address is discarded unless /dev/rob0 or not-spam is in Subject: header