On Sat, Feb 25, 2012 at 09:18:39AM -0800, Kyle King wrote: > I store my domains as an attribute for an org, while for a org with one > domain the lookup works fine when a org has several domains (and > therefore returns all domains of that user) The ldap look up fails. is > there a way to parse the list, such as using string expansions like in exim?
You have completely failed to specify in what context the LDAP data is being used. We're not psychic, so please elaborate. Which Postfix feature (transport_maps, virtual_alias_maps, ...) are you implementing via an LDAP lookup, what is a typical LDIF and what do you want the lookup to return for any given key. If the context requires a domain as a key and a single result value (perhaps a transport, perhaps something else, who knows), then in any sane schema the domain list is stored as a multi-valued attribute. You can still query these and return a single value: LDIF: org: Example Corp domain: example.com domain: example.net domain: example.org table.cf: # Use the domain as a lookup key query_filter = domain = %s # Pick any single-valued attribute of the object result_attribute = org # Return the lookup key result_format = %S Depending on your actual use-case this may need some tuning. -- Viktor.