[exim] Blacklist a domain from sending mail

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: soumya tr
Dátum:  
Címzett: exim-users
Tárgy: [exim] Blacklist a domain from sending mail
Hi,

I am trying to blacklist a domain from sending mails. I used the procedure
as mentioned in
http://forum.ahosting.net/f15/how-manually-block-reject-emails-domain-exim-662.html

----------------------------
domainlist exim_blacklist = lsearch;/etc/eximblacklist
----------------------------

Added the router in ROUTER CONFIGURATION

----------------------------
reject_domains:

driver = redirect
# RBL Blacklist incoming hosts
domains = +exim_blacklist
allow_fail
data = :fail: Connection rejected: SPAM source $domain is manually
blacklisted.
----------------------------

Content of /etc/eximblacklist

----------------------------
# cat /etc/eximblacklist
maindomain.com
----------------------------

Now suppose I am trying to send mail from abc@??? to
def@??? it sends the mail. Its not blacklisted. When I try to do exim
-d -bs, this is what I got:

----------------------------
routing supteamdir@???

--------> reject_domains router
<--------

local_part=def domain=gmail.com

checking
domains

search_open: lsearch
"/etc/eximblacklist"

search_find:
file="/etc/eximblacklist"

key="gmail.com" partial=-1 affix=NULL
starflags=0

LRU
list:


4/etc/eximblacklist


End

internal_search_find:
file="/etc/eximblacklist"

type=lsearch key="gmail.com"

file lookup required for gmail.com

in
/etc/eximblacklist

lookup
failed

gmail.com in "lsearch;/etc/eximblacklist"? no (end of
list)

gmail.com in "+exim_blacklist"? no (end of
list)

reject_domains router skipped: domains mismatch
----------------------------

I guess the exim code checks for the domain part of TO ADDRESS, instead of
from address, in /etc/eximblacklist. Please let me know where am I wrong,
and how can I fix it.


--
Regards,
Soumya