Re: [exim] LDAP / Virtual Domains

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Hans-Juergen Beie
Date:  
À: exim-users
Sujet: Re: [exim] LDAP / Virtual Domains
On Mi, 16.11.2005, 16:37, James Davis wrote:

> It worked, thank you. I now have a slight problem though. My last two
> routers are as follows.
>
> local_user:
> debug_print = "R: local_user for $local_part@$domain"
> driver = accept
> domains = +local_domains
> #check_local_user
> local_parts = ! root
> transport = LOCAL_DELIVERY
>
>
>
> deliver_to_qmail:
>         driver = manualroute
>         transport = remote_smtp
>         route_list = * clarity.jolt.co.uk
>         no_more

>
> The idea is that mail for my domains who don't exist locally may still
> exist on the old mail server and that these messages should be forwarded
> here. The only problem is that since I redefined LOCAL_DELIVERY to be
> cyrus_delivery, the first router never fails.
>
> Given a user asdf@mydomain where asdf is still handled by the old mail
> server.
>
> With check_local_user commented out the mail is delivered blindly to
> cyrus even though asdf doesn't exist as a user in my LDAP directory. No
> error is returned, the message is not bounced.
>
> With check_local_user uncommented the local_user router always fails and
> every message gets forwarded onto the second server.
>
> I'm guessing I need a lookup against my LDAP directory in place of
> check_local_user in the local_user router but I'm not sure of the format
> such a lookup should take. Can you provide any pointers? I can't seem to
> find it in the docs.


This cyrus_mail router is the counterpart to your local_user router, where
check_local_user is replaced by a ldap lookup condition. You may place it
between the "gosa router(s)" and your deliver_to_qmail.

  #
  # Cyrus gets all which matches local_part@$domain in our ldap database.
  # Alternate addresses have been resolved by gosa_aliases above.
  #
  cyrus_mail:
    debug_print = "R: cyrus_mail for $local_part@$domain"
    driver = accept
    domains = +local_domains
    condition = ${lookup ldap \
        {ldap:///dc=my,dc=net?uid?sub?(mail=$local_part@$domain)}}
    transport = cyrus_delivery


> Many thanks for your patience so far.


No problem so far ;)

> Regards,
>
> James


hjb :-?