Mail::SpamAssassin::Contrib::Plugin::IPFilter - Blocks bad MTA behavior using IPTables and Redis.
To try this out, add this or uncomment this line in init.pre:
LoadPlugin Mail::SpamAssassin::Contrib::Plugin::IPFilter
Configuration defaults:
filter_name spamipfilter
iptables_bin $PATH/iptables
redis_host 127.0.0.1
redis_port 6379
redis_auth [password]
redis_key_prefix spam-ipfilter
average_score_for_rule 8
cache_decay_days 5
expire_rule_seconds 14400
expires_multiplier_penalty 1.5
seconds_to_decay_penalty 300
trigger_score 6
trigger_messages 4
trigger_sensitivity 4
common_hosts gmail.com, google.com, yahoo.com, hotmail.com, live.com
admin_message Your message to $recipient from $email was blocked and your IP address $ip blacklisted
due to excessive unsolicited bulk email. To reinstate your ability to send email to $recipient,
please reply to $admin using a different off-network email, including the body of this message,
with a request for reinstatement.
verbose 0
Mail::SpamAssassin::Contrib::Plugin::IPFilter blacklists unsolicited bulk email senders using IPTables and a Redis based cache. It will blacklist the sender IP using the smallest network possible, up to /24, when UCE originates from multiple hosts on the same network. Depending on the diversity and frequency of spam received on a server, it may take a couple of days to become effective. Thereafter, the cache state will decay to prevent spammers from burning IP blocks.
Responsible, well-known email hosts (common_hosts) are given special treatment to avoid blacklisting their networks. UCE originating from common_hosts is blacklisted on a per sender basis using SpamAssassin's AWL. The plugin may be configured to email the blacklisted sender a warning for remediation. A sane IPTables setup and non-volatile Redis configuration are assumed. Additionally, an entry is created in /etc/cron.d/ for required maintenence.
IPV6 support is experimental. Future versions may include a database shared by nodes participating in a system similar to a decaying blockchain.
The following options may be used in site-wide (local.cf) configuration files to customize operation:
filter_name© 2014 Tamer Rizk, Inficron Inc. All rights reserved.
This package is free software, distributed under the New BSD License.