Re: [Exim] Using ACLs to verify RCPT TO

Top Page
Delete this message
Reply to this message
Author: ISP List
Date:  
To: exim-users
Subject: Re: [Exim] Using ACLs to verify RCPT TO
At 03:43 PM 12/31/2003 +0100, you wrote:
>ISP List wrote:
>
>>So, what I would like exim to do is to be able to do a LDAP or SQL lookup
>>during the SMTP negotiation phase (following the RCPT TO) to determine if
>>the recipient address is valid or not. Based on my research, using exim
>>4.x's ACL facility seems to be the best approach, but I'm a little unclear
>>on the proper syntax as the manual does not give any examples when using
>>LDAP or SQL. Should I be using the "recipients = <address list>"
>>condition, or make up a custom "condition = " of my own?
>>
>>Any pointers would be much appreciated.
>
>deny message = Our domain, but user unknown
>      domains = +localdomains
>      !recipients = mysql;select 1 from users where \
>                           email='$local_part@$domain'


Nico,

Thanks for responding.

What does the "1" signify in the SELECT statement (or is that just a
typo)? I assumed that it would be something like:

SELECT from USERS where EMAIL='$local_part@$domain'

..and if it returned no value, then the condition has been met, and the
"user unknown" error would be returned. If a value was returned from the
SELECT statement, the ACL should be passed by. Am I correct?

Thanks.


---------------------------------------
Mike Bacher / mike@???
SparkLogic Development / ISP Consulting
Use OptiGold ISP? Check out OptiSkin!
http://www.sparklogic.com/optiskin/
---------------------------------------