* Simon Croome <scro...@solent.ac.uk>:
> >Take a look at the "TABLE SEARCH ORDER" in man 5 transport. Here's an 
> >example:
> >
> ># main.cf
> >transport_maps = hash:/etc/postfix/transports
> >
> ># /etc/postfix/transports
> >firstname.lastn...@example.com          relay:lotus.notes.server:25
> >firstname1.lastna...@example.com        relay:lotus.notes.server:25
> >firstname2.lastna...@example.com        relay:lotus.notes.server:25
> >example.com                             relay:ocs.server:25
> >
> Hi, thanks for your response, but does that not mean that I would
> have to create any entry for every lotus notes account as we have
> around 1500 accounts and it increases daily ?

Yes, you would have to and you would have to create a relay_recipients map as
Wietse pointed out in his reply.

Use LDAP to query Lotus, get a list of valid recipients and create both maps,
relay_recipients and transport, from it.

If you don't mind to do the LDAP query live you can do something along these
lines with an transport map LDAP query:

    server_host = lotus.example.com
    version = 3
    bind_dn = uid=postfix,ou=services,dc=example,dc=com
    bind_pw = postfix
    domain = example.com
    search_base = ou=people,dc=example,dc=com
    query_filter = (mail=%s)
    result_attribute = mail
    result_format = relay:[lotus.example.com]:25

It queries lotus.example.com and searches for a recipients who's
mail-attribute has the mail address in question. If it finds the address it
will reply: "relay:[lotus.example.com]:25".

This in a transport_maps configuration will route recipients for whom a match
in your LDAP database exists to lotus.example.com.

For all other traffic to ocs add a second map with a static entry:

example.com                     relay:ocs.example.com:25

In main.cf it would look like this:

transport_maps = 
        ldap:/etc/postfix/lotus_ldap.query
        hash:/etc/postfix/ocs_map

And you can reuse the lotus_ldap.query map for relay_recipient_maps as this
evaluates the query only as list - if something is returned than the user
exists and if it doesn't the user does not exists.

BUT... this map has no idea about recipients within the ocs-namespace. Either
you are able to create a map that holds ALL valid recipients within
ocs-namespace or you must use a catch-all for the domain.

I definitely recommend to get a complete list of ocs-namespace recipients or
your server will clutter with undeliverable messages, as Wietse has pointed
out already.

p...@rick

-- 
All technical questions asked privately will be automatically answered on the
list and archived for public access unless privacy is explicitely required and
justified.

saslfinger (debugging SMTP AUTH):
<http://postfix.state-of-mind.de/patrick.koetter/saslfinger/>

Reply via email to