Setup: mailcow-dockerized, updated on 2026-10-21 (current master), Rspamd 4.2.1, stock ClamAV integration.
Observation: data/conf/rspamd/lua/rspamd.local.lua registers the prefilter POSTMASTER_HANDLER. If a message has exactly one SMTP recipient whose local part is postmaster, it calls:
lua
task:set_pre_result(‘accept’, ‘whitelisting postmaster smtp rcpt’, ‘postmaster’)
This is a passthrough result without flags, so Rspamd skips every remaining filter and postfilter (symcache_runtime.cxx, should_skip() / check_process_status()). That includes the antivirus module. The AV module can only be configured as normal or postfilter (antivirus.lua), and both are skipped on passthrough.
Reproduction (offline, nothing is delivered):
bash
EICAR=‘WDVPIVAlQEFQWzRcUFpYNTQoUF4pN0NDKTd9JEVJQ0FSLVNUQU5EQVJELUFOVElWSVJVUy1URVNULUZJTEUhJEgrSCo=’
printf ‘From: test@example.com\nTo: postmaster@example.org\nSubject: Test\nMIME-Version: 1.0\nContent-Type: multipart/mixed; boundary=“b1”\n\n–b1\nContent-Type: text/plain\n\nTest\n–b1\nContent-Type: application/octet-stream; name=“a.txt”\nContent-Disposition: attachment; filename=“a.txt”\nContent-Transfer-Encoding: base64\n\n%s\n–b1–\n’ “$EICAR” \
| docker compose exec -T rspamd-mailcow rspamc -i 192.0.2.1 -F test@example.com -r postmaster@example.org symbols
(Replace example.org with one of your mailcow domains.)
Result: Action: no action, Score: 0.00, no symbols at all, message whitelisting postmaster smtp rcpt. The same EICAR mail to a normal mailbox is rejected with VIRUS_FOUND (2000.00).
Why this matters: postmaster@ is usually an alias to an admin’s personal mailbox, read in a regular client. Anyone can send known malware or a listed phishing URL to postmaster@<domain> with a single recipient and get it delivered completely unscanned. The comment in the code shows that multi-recipient abuse was considered, but the single-recipient case is still a full bypass.
RFC angle: RFC 5321 §4.5.1 (same text as RFC 2821 §4.5.1) asks for “every reasonable effort” to accept mail to Postmaster. It also explicitly allows blocking it to contain a security breach, as long as the block is “narrowly tailored”. Rejecting known malware seems to fit exactly that. Spam-score whitelisting for postmaster is fine. Skipping AV entirely seems broader than necessary.
Questions:
Is skipping ClamAV (and e.g. phishing-feed matches) for postmaster@ intended, or a side effect of using a plain passthrough?
Is there a recommended, update-safe way to keep postmaster exempt from spam scoring but still reject AV hits? Disabling the symbol via enabled = false would work, but it also brings postmaster under normal spam scoring.
Would an upstream change make sense, e.g. letting AV and phishing-feed hits still reject for postmaster mail?