Re: [exim] verify rcpt at smtp time via ldap (was: spam mess…

Top Page
Delete this message
Reply to this message
Author: Paul Shields
Date:  
To: exim-users
Subject: Re: [exim] verify rcpt at smtp time via ldap (was: spam messages freeze)
Wolfgang Kohnen wrote:
<>
> My idea now is to create a new verify router, which does nothing but
> verifying recipients against my ldap database. But I am not experienced
> at this point. I guess that the verification process starts after
> routing? So that i can make a lookup ldap for the mailbox name in cyrus
> (one has to match, not every one) instead of all accepted recipient
> addresses? Hmm, (I am moving my lips again) or do I have to verify every
> literal recipient addresses from rctp smtp commands?


You can do the recipient check in the rcpt ACL (before the message is
accepted). This way you can issue your 550 for each recipient that doesn't
exist, rather than generating a bounce after you've received the message. Is
this what you're trying to do?

e.g.

#Set some variables up:
acl_smtp_rcpt = acl_check_rcpt
LDAP_MANAGER= user="cn=admin,cn=users,dc=company,dc=internal"
pass=somepassword
ldap_default_servers = 192.168.0.1


acl_check_rcpt:

# Only accept mail if mailbox/alias can be found in LDAP

  deny message      = Administrative prohibition - unable to validate 
recipient
       condition        = ${lookup ldap{LDAP_MANAGER \
                            ldap:///ou=some,ou=ldap,dc=path,\
                            dc=internal?cn?sub?(recipient=${quote_ldap:$local_part@$domain}) 
 } {0} {1}}


Paul