We cannot stop spam completely but we definitely can reduce the number of spams and/or the spam attack using some good logical ACLs. The ACL I found very useful are given below. Hope you will also find it useful to protect your EXIM server against spam.
These are very simple ACLs. You need to edit the Exim’s main configuration file: exim4.conf.template
The code should be as below..
################################################## # MAIN CONFIGURATION SETTINGS #
##################################################
Under the main configuration search the ACL Configuration.
##################################################
# ACL CONFIGURATION #
# Specifies access control lists for incoming SMTP mail #
##################################################
Often spammers send for the HELO argument the name or the IP of your host. We can specify our own domain with the ipaddress to reduce the spams. My own domain is “ameyapandit.com” and my own IP is 208.113.170.151.
—————————————————————————————————————————-
acl_check_helo:
accept
hosts = +own_hosts
# If the HELO pretend to be this host
deny condition = ${if or { \
{eq {${lc:$sender_helo_name}}{ameyapandit.com}} \
{eq {${lc:$sender_helo_name}}{208.113.170.151}} \
} {true}{false} }
# by default we accept
accept
—————————————————————————————————————————-
Sender checking
We can refuse some senders, from some marketing companies.
acl_check_sender:
deny senders = /etc/exim4/filters/sender_reject.list
accept
—————————————————————————————————————————-