Re: [Exim] Blocking senders

Top Page
Delete this message
Reply to this message
Author: William Thompson
Date:  
To: Peter Ang
CC: exim-users
Subject: Re: [Exim] Blocking senders
> I am using Exim 4.14 and have tried using the following statement in my
> ACLs:
>
>   deny    sender_domains = /etc/exim/abuse/sender_domains
>           senders = /etc/exim/abuse/sender


You're saying here "Block senders listed in sender_domains AND sender"
Seperate the acl.

> The files are just a list of domains and sender addresses. I have tried
> putting the lines under "acl_check_rcpt" and "acl_check_data" but both
> don't work.


Just a guess, you weren't using an address that's listed in both files.

> I tried testing it by typing the following on the command line:
>
> exim -C exim.conf.test -d-all+acl -bs
>
> After typing the following to simulate an incoming mail:
>
> HELO test.blockeddomain.com
> MAIL FROM:<test@???>
> RCPT TO:<someone@???>
>
> It fails even though "blockeddomain.com" is listed in my
> "sender_domains" file.


But test@??? is not in the "sender" file, right?

> I was reading through archives and some were saying that the above
> should work but I also found the following in the FAQs. Section 8 on
> Policy Controls, Q0801 says to use the following to block senders:
>
> sender_reject_recipients = @@lsearch*;/name/of/the/file


This makes the format of the file different. Instead of listing each
address sperately like:
test1@domain1
test2@domain1
test1@domain2
...

It would look like this with @@learch* :
domain1    test1:test2
domain2 test1:test2


the * at the end makes it lookup the domain * if the domain isn't found.
It's basically in the format:
domain    sender1:sender2:sender3:...:sendern


I use this format. It makes the file smaller. Each sender can be a regexp.

> How is this different to the deny ACL, and where should this go in the
> config file?


See above. Use 2 acls.