• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved How to reduce Spam forwarding with fail2ban

TorbHo

Basic Pleskian
Most spam on our servers is blocked by different spamassasin and combined fail2ban rules, but this time the Spam was forwarded to external mail-addresses, because our clients love to use their private mail-addresses and have set a forwarding-rule.

How can we use fail2ban to block Servers sending spam?

My idea: for example when 50 Mails in about 1 hour have been marked by spamassasin as spam, this ip is blocked by fail2ban.
How could the regex for this filter-rule look like?
 
Spamassassin uses a number of rules to decide if an email is blocked and creates a score of each email. This is normally included in the header of each email, so you can see which rules have trigged.

If you can build a cron or so what counts the number of mails to specific-addresses and check how many have the score xy, you could block them with fail2ban.

Just an idea.
 
Back
Top