cscli collections install cbrandlehner/mailscannerThis package integrates MailScanner logs โ including those used in the Email Filter Appliance (E.F.A.) project โ with CrowdSec.
It provides:
These components allow CrowdSec to automatically ban source IPs that MailScanner has already flagged as spammers.
1filename: /var/log/maillog2labels:3 type: syslog
note in most cases CrowdSec already monitors these files by default so just ensure this or similar acquistion already exists.
cbrandlehner/mailscanner-spam-blacklist
source_ip and spam_reason.evt.Meta.log_type to value mailscanner_blacklist.cbrandlehner/mailscanner-spam
source_ip and spam_score.evt.Meta.log_type to value mailscanner_spam.cbrandlehner/mailscanner-blacklisted
triggerspam_reason == "blacklisted".source_ip.smtp:spam.cbrandlehner/mailscanner-highscore-spam
leakyspam_score > 20.0 in MailScanner logs (evt.Meta.log_type == "mailscanner_spam").blackhole).smtp:spam.