Summary: LDAP and Postfix

2007-12-25 4:43:00

Thanks to Synrat for the solution and Carinus Carelse and Steve Rieger for
their additional help...

The solution was:
> if you only need to deliver to local users, then you just need to setup
your mail server as ldap client.
> postfix then will use nsswitch to find recepients (very fast and reliable
solution ). read ldapinit man pages.
>if you want to use postfix to look for various ldap attributes, you need to
link it against LDAP libraries when compiling and then do lookups on
various directory trees. ( works ok )
>smth. like this for the second case.
>make makefiles CC=cc CCARGS="-DHAS_LDAP -I /usr/include/" \
>AUXLIBS="-L/usr/lib/ -R/usr/lib -lldap"
>
>make; make install
>
>then edit /etc/postfix/main.cf
>
>
>
>local_recipient_maps = ldap:ldaplocal unix:passwd.byname $alias_maps
>
>
>ldaplocal_server_host = 123.45.67.89
>ldaplocal_server_port = 389
>ldaplocal_timeout = 30
>ldaplocal_search_base =ou=people,dc=my,dc=big,dc=company
>ldaplocal_scope = sub
>ldaplocal_query_filter = (mail=%s)
>ldaplocal_result_attribute= %uid
>
>or whatever attributes you use

Comments

Got something to say?

You must be logged in to post a comment.