There is about 50 different ways to do that and many of those are located in Exim directly; However, why not just simply block the connections in your firewall, hosts, or iptables?
One quick and easy method is just but the CIDR in /etc/hosts.deny
IPTABLES, you could do something like the following to allow an address to connect for other services but disallow any mail server connections:
Code:
iptables -A INPUT -s x.x.x.x/x -p tcp --dport 25 -j REJECT
(Replace x.x.x.x/x with the CIDR range you want to block from access)
If you just want to block the addresses entirely using the same method which is roughly equivalent to the aforementioned /etc/hosts.deny file:
Code:
iptables -A INPUT -s x.x.x.x/x -j DROP
If you are running CSF Firewall, you can just add the CIDR range to /etc/csf/csf.deny or type "csf -d x.x.x.x/x"
The advantage to blocking these connections from a firewall layer such as IPTABLES or CSF verses the mail server is that the connections are physically blocked before any connection is established and your mail server isn't bothered with a lot of unnecessary time and effort and socket connection having to answer connections that are going to answer with a rejection message anyway thus helping reduce loads a bit.