[Exim] keying off an ldap attribute and either failing (reje…

Top Page
Delete this message
Reply to this message
Author: Chad Leigh -- Shire Net LLC
Date:  
To: exim-users
Subject: [Exim] keying off an ldap attribute and either failing (rejecting a message as unrouteable) or passing to the next router
Hi

It has been quite a while since I hacked my exim config and I am not
figuring out how to do what I want.

I want to be able to check an attribute in an ldap database that I
currently use to run my exim mail system. I have an attribute on each
record that specifies whether the account is active or not. Currently
the attribute exists but is not being checked. I would now like to
turn on checking of that attribute and if it is set to N then I want to
return a failure of non-routable and if it is Y I want to continue to
the next router since at this point there are still several possible
routers that could be triggered.

My problem is that the only driver that makes sense to me is accept
and that requires a transport, which I do not have at this point. So
obviously my thinking on how to do this is off.

Any ideas on how to accomplish this?

I have tried many things but currently it looks like this:

ldapaccountactive:
driver = smartuser
address_data = ${if eq {${lookup ldap
{user="cn=Manager,dc=shire,dc=net" pass=blah
ldap://blah.foo.bar:389/
shireNetAccountname=$local_part,shireNetDomain=${domain},dc=shire,dc=net
?shireNetAccountActive?base?}{$value}}}{Y} {pass}fail}
no_more
# transport = appendfile
domains = test.object.com



I used address_data as a way of checking the ldap and failing if it
doesn't resolve.

Thanks for any hints

best
Chad