Here's what I want to do...

I have an MS Exchange/AD environment that hosts all of my orgs
mailboxes OR knows where to forward mail for a few users. Postfix sits
in front of that environment and handles inbound mail hygiene
services. My MX records all point to the Postfix systems. My org has
multiple smtp domains handled by both postfix (for hygiene only) and
exchange (mailboxes). There are no mailboxes on the postfix systems.

As part of hygiene I want postfix to verify that all incoming messages
are being sent to a valid recipient in the org. Users can have
multiple smtp addresses (from several domains) all of which are
contained in an AD attribute called 'proxyAddresses'. There is also an
attribute called 'mail' that lists the user's primary smtp address
(which will also be listed in 'proxyAddresses'. I do not want a
rewrite of the recipient address. The lookup between postfix and AD is
done via ldap.

To get clean mail from postfix to exchange I am using entries in the
transport table.

I am testing this now doing this...


/postfix/etc/main.cf
...
relay_domains = ku.edu
        abc.org
        def.com
        ghi.org
        mail.ku.edu
        jkl.ku.edu
        mno.org
        pqr.ku.edu

relay_recipient_maps = proxy:ldap:/postfix/etc/ldap_lookup.cf
# the last 3 domains don't do lookups and are not permitted to bounce any mail
...
and then /postfix/etc/ldap_lookup.cf looks like this...

server_host = myldapserver.home.ku.edu
server_port = 389
domain = ku.edu, mail.ku.edu, abc.org, def.com, ghi.org
version = 3
timeout = 10
query_filter = (proxyAddresses=smtp:%s)
result_attribute = mail
search_base = dc=home,dc=ku,dc=edu
scope = sub
bind_dn = cn=_svc_ldap_lookup,dc=home,dc=ku,dc=edu
bind_pw = xxxxxxxxxxxx

and finally /postfix/etc/transport

ku.edu                smtp:(exchange server)
mail.ku.edu         smtp:(exchange server)
kansan.com        smtp:(exchange server)
kletc.org             smtp:(exchange server)
kualumni.com     smtp:(exchange server)

Thoughts on this? Anyone have a better way to do this? At some point
in time I will move from ldap lookups to a file

Thanks in advance.

-jim

Reply via email to