Re: [Exim] Verify recipient against LDAP

Pàgina inicial
Delete this message
Reply to this message
Autor: Steve Haslam
Data:  
A: exim-users
Assumpte: Re: [Exim] Verify recipient against LDAP
On Mon, Oct 21, 2002 at 06:07:11PM +0100, Peter Farmer wrote:
> I'm working a config for an Exim 4.10 server, the basic idea is that after
> the rcpt to: the Exim server checks to see if the email address is valid by
> querying an LDAP database. The email won't be delivered locally on the Exim
> server but forwarded onto another server, all I'm doing is checking the
> recipient is valid. I'm pretty sure this is possible, but can't work out
> how. Does anyone have any idea's?


Someone else might have a better way-- but if you have a router that sends
verified receipients for that domain on using an SMTP transport, followed by
a router that rejects all other recipients for that domain, then these can
be used at RCPT time to verify recipients. i.e. sth like this:

ldapusers:
driver = accept
domains = ourdomain.example.com
condition = ${lookup ldap{ldap:///o=OurOrg?cn?sub?(&(objectClass=mailRecipient)(uid=${quote_ldap:${local_part}}))}{yes}fail}
transport = forwardldapusers

ldapfail:
driver = redirect
domains = ourdomain.example.com
data = ":reject: *BZZT* no, but thanks for playing"

where forwardldapusers is an smtp transport with the host you want to
forward to configured in.

SRH
--
Steve Haslam      Reading, UK                           araqnid@???
Debian GNU/Linux Maintainer                               araqnid@???
almost called it today, turned to face the void, numb with the suffering
and the question- "Why am I?"                                  [queensrÿche]