• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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