cscli scenarios install Guezli/postfix-honeypot-usersInstant-bans IPs that try postfix SASL authentication with a honeypot username -- addresses that should never be used as actual SMTP-AUTH login accounts. The wordlist covers four classes:
Classic English role addresses: postmaster@, admin@, info@,
test@, support@, office@, sales@, contact@, webmaster@,
root@, noreply@, abuse@, hostmaster@, marketing@, mail@,
news@, sysadmin@, administrator@, user@, service@, helpdesk@.
Spanish / Portuguese i18n variants (frequently seen in real-world
bot wordlists): teste@, prueba@, contacto@, comercial@.
Accounting / billing role honeypots: billing@, accounts@,
account@, tech@, reception@, shared@.
Office-equipment honeypots: copier@, fax@, scanner@,
monitor@, mailtest@, testing@.
Auto-generated mailbox-probe patterns: nonexistent_user@,
nonexistent_user_<N>@ (where <N> is any digit sequence -- catches
stealth bots that probe with numbered test mailboxes).
The filter matches any SASL mechanism (LOGIN, PLAIN, CRAM-MD5, DIGEST-MD5)
parsed by crowdsecurity/postfix-logs -- attackers using PLAIN against
role-only addresses are just as much a clear signal as LOGIN.
Distributed bruteforce bots iterate through a standard wordlist of role addresses, making only 1-2 attempts per IP to stay below per-IP rate thresholds. They escape:
crowdsecurity/postfix-spam (capacity 5 / leakspeed 10s -- 6+ fast fails)Guezli/postfix-sasl-bf (capacity 2 / leakspeed 7200s -- 3+ fails per IP)Since no legitimate mail setup logs in via SMTP with postmaster@ or
admin@, a single attempt with such a username is high-confidence
attacker signal -- ban immediately (type: trigger, confidence: 5).
crowdsecurity/postfix-logs parser (part of the crowdsecurity/postfix
collection)For Mailcow's postfix container:
1source: docker2container_name:3 - mailcowdockerized-postfix-mailcow-14labels:5 type: syslog
For a standalone postfix with file-based syslog:
1filenames:2 - /var/log/mail.log3labels:4 type: syslog
behavior label is pop3/imap:bruteforce because the hub taxonomy
has no dedicated smtp:bruteforce entry. Same convention as the
companion scenario Guezli/postfix-sasl-bf.1# Trigger an instant ban when an IP attempts postfix SASL authentication2# using one of the well-known "honeypot" usernames -- addresses that should3# never be used as actual SMTP login accounts (postmaster@, admin@, info@,4# test@, support@, ...).5#6# The filter is intentionally not restricted to "SASL LOGIN" — the official7# `crowdsecurity/postfix-logs` parser flags all SASL mechanism failures8# (LOGIN, PLAIN, CRAM-MD5, DIGEST-MD5), and an attacker using PLAIN against9# `postmaster@` is just as much a clear signal as LOGIN.10#11# Background: distributed bruteforce bots iterate through a standard12# wordlist of admin/role addresses trying just 1-2 attempts per IP to stay13# below per-IP thresholds. Since nobody on a sane mail setup uses those14# addresses as actual SMTP-AUTH logins, any attempt is a clear attacker15# signal -- ban on first hit.16#17# Wordlist covers:18# - English role addresses (postmaster, admin, info, support, ...)19# - Spanish / Portuguese i18n variants (teste, prueba, contacto, comercial)20# - Accounting / billing (billing, accounts, account)21# - Office-equipment honeypots (copier, fax, scanner, monitor)22# - Auto-generated mailbox-probe patterns (nonexistent_user, nonexistent_user_<N>)23#24# Requires the official `crowdsecurity/postfix-logs` parser, which extracts25# SASL fields and source_ip from the postfix log line.26#27# Customize the username list to match your environment. If you28# legitimately use any of these as SMTP login (rare), remove it.2930type: trigger31name: Guezli/postfix-honeypot-users32description: "Instant-ban IPs hitting postfix SASL authentication with honeypot usernames"33filter: |34 evt.Meta.log_type == 'postfix'35 && evt.Parsed.message contains 'SASL'36 && evt.Parsed.message contains 'authentication failed'37 && evt.Parsed.message matches '(?i)sasl_username=(postmaster|admin|info|test|support|office|sales|contact|webmaster|root|noreply|abuse|hostmaster|marketing|mail|news|sysadmin|administrator|user|service|helpdesk|teste|prueba|contacto|comercial|billing|accounts|account|tech|reception|copier|fax|scanner|monitor|mailtest|testing|shared|nonexistent_user(?:_[0-9]+)?)@'38groupby: evt.Meta.source_ip39# trigger = first hit overflows; blackhole prevents bucket spam from the40# same IP within the next 24h41blackhole: 24h42labels:43 service: postfix44 remediation: true45 confidence: 546 spoofable: 047 classification:48 - attack.T111049 - attack.T107850 behavior: "pop3/imap:bruteforce"51 label: "Postfix Honeypot Username"52references:53 - https://www.postfix.org/SASL_README.html54 - https://attack.mitre.org/techniques/T1110/55 - https://attack.mitre.org/techniques/T1078/56