Re: [exim] How to rewrite ${filter ...} expressions for olde…

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Michael Lampe
Data:  
Para: exim-users
Assunto: Re: [exim] How to rewrite ${filter ...} expressions for older exims?
Ben Allen wrote:

> Without seeing what the macros actually expand to, it's impossible to say how
> to reformulate the expansion without a filter command.


The whole thing is this:

-----

# LDAP Router

LDAP_USER="uid=mail,ou=System-User,dc=localhost"
LDAP_PASS=xxxxxxxxxxxxxxxxxxxx
LDAP_URL=ldapi://${quote_ldap_dn:/var/run/ldapi}
LDAP_LOCALPART_ATT=mailLocalAddress
LDAP_MAIL_GROUP=E-Mail
LDAP_UID_QUERY=${lookup ldapm {user=LDAP_USER pass=LDAP_PASS \

LDAP_URL/ou=People,dc=localhost?uid?sub?(LDAP_LOCALPART_ATT=${quote_ldap_dn:$local_part})}}
LDAP_GROUP_QUERY=${lookup ldapm {user=LDAP_USER pass=LDAP_PASS \
         LDAP_URL/cn=LDAP_MAIL_GROUP,ou=Groups,dc=localhost?cn?base?\
                 (uniqueMember=uid=$item,ou=People,dc=localhost)}}


ldap_user:
debug_print = "R: ldap_user for $local_part@$domain"
driver = accept
domains = +local_domains
local_parts = ! root
local_part_suffix = +*
local_part_suffix_optional
address_data = ${filter {<\n
LDAP_UID_QUERY}{eq{LDAP_GROUP_QUERY}{LDAP_MAIL_GROUP}}}
condition = ${if >{${strlen:${filter {<\n
LDAP_UID_QUERY}{eq{LDAP_GROUP_QUERY}{LDAP_MAIL_GROUP}}}} }{0}}
transport = pipe_delivery_cyrus
cannot_route_message = ldap_user: mail address $local_part does not exist

----

> You could also try passing the data through a perl function (${perl}) which
> can do anything you want it to.
>
> Hope that helps.


I'm anything but intimate with exim. This whole mess is the leftover of
someone who considered RHEL5 exim too old, copied a manually compiled
version over it, disabled exim updates, and finally managed to leave
before I could get my hands on him.

Now that I have to deal with it (the big hole in <= 4.69 especially),
I'm trying to make it work with "upstream" again.

I guess it's easier to implement my own 'filter' in perl than to
understand the whole mess above. :(

Thanks,
Michael