[exim] Sender Blacklisting using LDAP

Top Pagina
Delete this message
Reply to this message
Auteur: RaverGeek
Datum:  
Aan: exim-users
Onderwerp: [exim] Sender Blacklisting using LDAP

Greetings all,

Exim version 4.50

I have setup my LDAP structure to support a custom CourierBlacklist
objectClass containing a "mail" attribute. I am then, in
acl_check_rcpt, attempting to do a lookup of all CourierBlacklist
objects under that domain to see if a sender or recipient matches.
Respective lines below:

# Check if sender is blacklisted
deny message = This address has been blocked from sending mail to/from
this domain. For questions \
Please contact the mail administrator:
postmaster@???
log_message = matched blacklist
# this is how I was doing it
#senders = /etc/exim4/blacklist
senders = ${lookup
ldapm{ldap://localhost/ou=$domain,dc=mydomain,dc=com?mail?sub?objectClass=CourierBlacklist}}

# Check if recipient is blacklisted
deny message = This address has been blocked from sending mail to/from
this domain. For questions \
Please contact the mail administrator:
postmaster@???
log_message = matched blacklist
# this is how I was doing it
#recipients = /etc/exim4/blacklist
recipients = ${lookup
ldapm{ldap://localhost/ou=$domain,dc=mydomain,dc=com?mail?sub?objectClass=CourierBlacklist}}


However, this will not stop those e-mails. Output from exim4 -bh is
as follows (relevant lines only):
Sent mail from: ryanh@??? to ryanh@???

>>> processing "deny"
>>> check senders = ${lookup

ldapm{ldap://localhost/ou=$domain,dc=mydomain,dc=com?mail?sub?objectClass=CourierBlacklist}}
>>> ryanh@??? in "ryanh@???
>>> ryanh@???
>>> ryanh@???
>>> ryanh@???"? no (end of list)
>>> deny: condition test failed
>>> processing "deny"
>>> check recipients = ${lookup

ldapm{ldap://localhost/ou=$domain,dc=mydomain,dc=com?mail?sub?objectClass=CourierBlacklist}}
>>> ryanh@??? in "ryanh@???
>>> ryanh@???
>>> ryanh@???
>>> ryanh@???"? no (end of list)
>>> deny: condition test failed


I can clearly see in the first deny, check senders, that my list is
expanding and that the sender address is in the list. Any thoughts as
to why exim isn't seeing this? I've beat my head on this for about 2
hours and googled up the Ying and Yang for an answer.

Thanks.


--
RaverGeek
------------------------------------------------------------------------
RaverGeek's Profile: http://www.exim-users.org/forums/member.php?action=getinfo&userid=85
View this thread: http://www.exim-users.org/forums/showthread.php?threadid=51723