I'm using Chirpy's firewall, but not to block IP addresses in smtp connects.
Intstead, I added a couple ACL rules found here: http://wiki.exim.org/SpamFiltering
Particularly, the HELO fixes allowed exim to drastically reduce the number of spam connects by dropping the SMTP connection as soon as it saw an IP address rather than a FQDN in the HELO line.
Here's what I added. I added these using the Advanced exim config editor in the ACL section immediately after the lines:
Code:
[% ACL_RATELIMIT_BLOCK %]
accept hosts = :
- - you're mileage may vary:
Code:
# The following are ACLs taken from http://wiki.exim.org/AclHeloTricks
# Drop if HELO is an IP address
drop
condition = ${if isip{$sender_helo_name}}
message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
# HELO is neither FQDN nor address literal
drop
# Required because "[IPv6:<address>]" will have no .s
condition = ${if match{$sender_helo_name}{\N^\[\N}{no}{yes}}
condition = ${if match{$sender_helo_name}{\N\.\N}{no}{yes}}
message = Access denied - Invalid HELO name (See RFC2821 4.1.1.1)
drop
condition = ${if match{$sender_helo_name}{\N\.$\N}}
message = Access denied - Invalid HELO name (See RFC2821 4.1.1.1)
drop
condition = ${if match{$sender_helo_name}{\N\.\.\N}}
message = Access denied - Invalid HELO name (See RFC2821 4.1.1.1)
# Drop if impersonating our server
drop
condition = ${if match{$sender_helo_name}{$primary_hostname}}
message = REJECTED - Bad HELO - Host impersonating [$sender_helo_name]
Hope this helps.
Cheers, Michael