cscli collections install Guezli/mailcowOne-command install of a layered Crowdsec stack for Mailcow running on the host (not inside the Mailcow Docker network). Covers SMTP-AUTH, IMAP/POP-AUTH, and propagation of Mailcow-internal F2B bans into the local LAPI so the nftables-bouncer enforces them on Layer 3.
1sudo cscli collections install Guezli/mailcow2sudo systemctl reload crowdsec
You still need acquisition stanzas that read the relevant container logs (see below).
Official Hub coverage (pulled in via collections:)
crowdsecurity/postfix — postfix-logs parser + postfix-spam,
postfix-helo-rejected, postfix-relay-denied, postfix-non-smtp-commandcrowdsecurity/dovecot — dovecot-logs parser + dovecot-spamSlow / distributed / honeypot patterns (mine)
Guezli/postfix-sasl-bf — slow / distributed SASL bruteforce
(capacity 2, leakspeed 2h). Companion to crowdsecurity/postfix-spam's
fast-pattern detection.Guezli/postfix-honeypot-users — instant-ban for SASL attempts against
role/admin usernames (postmaster@, admin@, info@, ...).Guezli/mailcow-f2b-bans (parser) + Guezli/mailcow-f2b-feed (scenario)
— pull Mailcow's internal netfilter-mailcow bans into the Crowdsec
LAPI so they propagate to the host-side bouncer.IMAP / POP slow-pattern coverage (third-party)
melite/dovecot-slow-bf — slow IMAP/POP bruteforcemelite/dovecot-time-based-bf — time-distributed IMAP/POP bruteforcehitech95/mail-generic-bf — unified mail-auth bruteforce (SMTP+IMAP+POP)Add the following to /etc/crowdsec/acquis.d/mailcow.yaml:
1# postfix container2source: docker3container_name:4 - mailcowdockerized-postfix-mailcow-15labels:6 type: syslog7---8# dovecot container9source: docker10container_name:11 - mailcowdockerized-dovecot-mailcow-112labels:13 type: syslog14---15# netfilter-mailcow container (Mailcow-internal F2B)16source: docker17container_name:18 - mailcowdockerized-netfilter-mailcow-119labels:20 type: mailcow-f2b
mailcow-f2b-feed is what makes Crowdsec see SOGo-webmail, rspamd-admin
and dovecot-cluster bruteforces that Crowdsec out-of-the-box doesn't parse.Guezli/postfix-honeypot-users is customizable
for your environment — fork the scenario if you legitimately use any of
the listed addresses for SMTP-AUTH.