[Exim] Exim + LDAP

Góra strony
Delete this message
Reply to this message
Autor: Aaron Anderson
Data:  
Dla: exim-users
Nowe tematy: [Exim] Unofficial (!) preliminary/testing Exim4 packages for Debian/GNU
Temat: [Exim] Exim + LDAP
I am currently having a problem with Exim passing the results from an LDAP
query in the director over to the transport. My virtuals director in my
exim.conf looks like this:

virtuals:
  driver = aliasfile
  search_type = ldap
  query = "ldap://localhost:389/dc=echostar,dc=ca?uid?sub?/
          (&(mail=${local_part}@${domain}))"
  domains = ldapm;ldap::///cn=VirtualDomains,ou=Config,dc=echostar,/
            dc=ca?sn?sub?(sn=*)
  group = mail
  user = ${lookup ldap{ldap://localhost:389/dc=echostar,dc=ca?/
         uid?sub?(&(mail=${local_part}@${domain}))}{$value}fail}
  transport = local_delivery
  no_more


Currently this director does get the proper uid from the entry containing
mail=${local_part}@${domain}. My problem is that I am unable to pass that
uid over to the local_delivery transport so that it can place the email in
the proper mailbox. Here is my local_delivery transport:

local_delivery:
driver = appendfile
group = mail
mode = 0660
mode_fail_narrower = false
envelope_to_add = true
file = /var/spool/mail/${local_part}

My problem is that if an email is sent to alias@???, the virtuals
director does extract from the LDAP directory the proper uid, say user
however when the local_delivery transport is run it tries to place the email
in /var/spool/mail/alias not /var/spool/mail/user. How do I rewrite the
$local_part variable with the uid pulled from the LDAP directory.

I hope I have made sense since I am new to LDAP and Exim. If clarification
is needed, I will try the best I can.

I appreciate any help that can be given.

Aaron Anderson

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com