[exim] Deny for a recipient if a sender is on a that recipie…

Góra strony
Delete this message
Reply to this message
Autor: Matt Bryant
Data:  
Dla: Exim-users
Temat: [exim] Deny for a recipient if a sender is on a that recipients blacklist
So am trying to create an acl that will reject mail for recipients who
have the sender on a user level blacklist. What ever I do just can't
seem to get it to work right. I assume the ACL for rcpt is run multiple
time for each RCPT line received. If so can anyone shed any light as to
what I could be doing wrong ...

mysql table
recipientAddress, senderAddress, listType (1 = white/2= black)


acl_smtp_rcpt:

     deny
         recipients = ${lookup mysql {select recipientAddress from 
senderLists where senderAddress = ${quote_mysql:$sender_address}' and 
recipient = '${quote_mysql:$local_part@$domain}'
         logwrite = 'LOG: Reject - recipient $local_part@$domain has 
blacklisted $sender_address


have tried using

condition = ${ if > {lookup mysql {select count(senderAddress) from
senderList where senderAddress = ${quote_mysql:$sender_address}' and
recipient = '${quote_mysql:$local_part@$domain}'}{0}{yes}{no}}

and even

senders = ${lookup mysql {select senderAddress from from senderLists
where senderAddress = ${quote_mysql:$sender_address}' and recipient =
'${quote_mysql:$local_part@$domain}'}


but no luck .. am i doing something blindingly stupidly obviously wrong
?????

rgds

Matt Bryant