[exim] Compound LDAP Lookups

Góra strony
Delete this message
Reply to this message
Autor: Russell Seymour
Data:  
Dla: exim-users
Temat: [exim] Compound LDAP Lookups
Good afternoon,

I have been using Exim with LDAP for sometime now and now I am looking
to make some housekeeping changes. One of the things that I do is to
maintain mailgroups. This is not complicated and the structure looks like:

ou=mailgroups,dc=example,dc=com
    cn=Test Group
       mail=test@???
       mailDrop=fred@???
       mailDrop=bloggs.com


The router that I use to check for this is shown below:

group_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup ldapm
{ldaps:///ou=mailgroups,LDAPBASE?maildrop?sub?(&(mail=${local_part}@${domain})(maildrop=${sender_address}))}}
user = mail
file_transport = address_file
pipe_transport = address_pipe

This setup has the advantage that if someone tries to send to the group
that is not a member of that group they get a rejection stating that the
email address they are sending to does not work. If they are in that
group then the system will copy and email to everyone in that group.

As can be seen from this the individual emails have to be added which
makes for higher administration. What I want to do is add in the
groupOfNames object class and then have a structure thus:

ou=mailgroups,dc=example,dc=com
    cn=Test Group
       mail=test@???
       member=cn=Fred,ou=contacts,dc=example,dc=com
       member=cn=Bloggs,ou=contacts,dc=example,dc=com


The problem now is that somehow i have to change the router
configuration to perform a compound lookup somehow or to perform two
searches and this is where I am stuck.

1. Can Exim do compound LDAP searches?
2. Can more than one data block appear in the router and if so how
could the DN's be referenced as a variable to the second data block?

Any help or advice on this would be brilliant.

Thanks in advance, Russell