On Aug 14, 2013, at 11:29 AM, Jonathan Engbrecht <jengb...@ryerson.ca> wrote:

> We have an attribute in our ldap that I'd like to use to determine the "next 
> hop" for mail transport.  The attribute is not itself the name of the next 
> transport.
> 
> Is there a way to set up a mapping for this?
> 
> ie:
> 
> dn:  xxx...
> routingattribute:  foo
> 
> route messages with this attribute to smtp:bar.com:25
> 
> dn: yyy...
> routingattribute:  baz
> 
> route messages with this attribute to smtp:qux.com:25

greetings

first make sure postfix is built with ldap support.
postconf -m

create a ldap_transport map looks something like this:

/etc/postfix/ldap_transport
server_host = 10.1.1.1
search_base = dc=ldap,dc=server,dc=dot,dc=com
query_filter = (mail=%s)
result_attribute = mailHost
result_filter = smtp:[%s]
bind = no

postmap /etc/postfix/ldap_transport

edit your main.cf 

transport_maps = ldap:/etc/postfix/ldap_transport

postfix reload


hope this helps.
-j


Reply via email to