Re: [exim] LDAP and secondary MX

Etusivu
Poista viesti
Vastaa
Lähettäjä: Stian Jordet
Päiväys:  
Vastaanottaja: Kjetil Torgrim Homme
Kopio: exim-users
Aihe: Re: [exim] LDAP and secondary MX
On fre, 2005-08-12 at 01:03 +0200, Kjetil Torgrim Homme wrote:
> here's two of our routers, the first only sets address_data. call it
> early. (as you can see, we have many attributes which are used in other
> rules.)


[...]

> I've edited the routers a little, so errors may have snuck in. it
> should give you an idea, anyway.


Thanks, this really helped! I'm by no means finished, but so far this is
what I'm using:

ldap_user:
  debug_print = "R: ldap_user $local_part@$domain"
  driver = accept
  domains = ldap;ldaps:://buick.jordet.net/sendmailMTAClassName=VirtHost,ou=domains,ou=exim,ou=services,dc=jordet?sendmailMTAClassValue?\
    sub?sendmailMTAClassValue=$domain
  condition = ${if eq {${lookup ldap {ldaps://buick.jordet.net/\
    ou=People,dc=jordet?mailHost?sub?\
    (&(objectClass=inetLocalMailRecipient)\
    (mailLocalAddress=${quote_ldap:$local_part@$domain}))}}}{$primary_hostname}{true}{false}}
  user = ${lookup ldap {ldaps://buick.jordet.net/\
    ou=People,dc=jordet?uid?sub?\
    (&(objectClass=inetLocalMailRecipient)\
    (mailLocalAddress=${quote_ldap:$local_part@$domain}))}{$value}fail}
  transport = ldap_delivery


ldap_redirect:
  debug_print = "R: ldap_redirect"
  driver = manualroute
  domains = ldap;ldaps:://buick.jordet.net/sendmailMTAClassName=VirtHost,ou=domains,ou=exim,ou=services,dc=jordet?sendmailMTAClassValue?\
    sub?sendmailMTAClassValue=$domain
  condition = ${if !eq {${lookup ldap {ldaps://buick.jordet.net/\
    ou=People,dc=jordet?mailHost?sub?\
    (&(objectClass=inetLocalMailRecipient)\
    (mailLocalAddress=${quote_ldap:$local_part@$domain}))}}}{$primary_hostname}{true}{false}}
  transport = remote_smtp
  route_data = ${lookup ldap {ldaps://buick.jordet.net/\
    ou=People,dc=jordet?mailHost?sub?\
    (&(objectClass=inetLocalMailRecipient)\
    (mailLocalAddress=${quote_ldap:$local_part@$domain}))}}


This seems to work very nicely so far :) I didn't like the idea of a
non-routing router, so I worked around that. It still needs some tuning,
but it's more or less done now. Thanks for helping :)

Best regards,
Stian