Postfix+LDAP

From: Micha³ Janiszewski (mjaniszewski_at_cirrus.pl)
Date: 11/18/04


Date: Thu, 18 Nov 2004 07:37:38 +0100

I have installed Postfix and LDAP from packages on Debian (Woody). In LDAP
database we hold information needed to authenticate users (uid, password,
directory where users mail are stored, etc.). Postfix serves two domains:
example1.com and example2.com. I have defined two users user@example1.com
and user@example2.com. If e-mail have been addressed to one of them, both
users receive it, which is undesirable. How to configure Postfix with LDAP
support so that mail would reach only a user in appropriate domain? All of
users have unique "mailRoutingAddress". I tried to resolve the problem by
using "virtual_maps", but then Postfix as a result_attribute returned
mailRoutingAddress concatenated with the domain name defined as "mydomain"
in main.cf, and I would like to receive "clear" mailRoutingAddress.

Configuration of Postfix referred to LDAP:

alias_maps = hash:/etc/aliases, ldap:m_aliases
local_recipient_maps = hash:/etc/aliases, ldap:m_aliases
m_aliases_server_host = 127.0.0.1
m_aliases_server_port = 389
m_aliases_timeout = 5
m_aliases_bind = yes
m_aliases_bind_dn = cn=manager,o=baza_ldap,c=pl
m_aliases_bind_pw = ******
m_aliases_search_base = ou=Accounts,o=baza_ldap,c=pl
m_aliases_query_filter = (mail=%s\@*)
m_aliases_result_attribute = mailRoutingAddress
m_aliases_lookup_wildcards = no



Relevant Pages