https://gitlab.synchro.net/main/sbbs/-/commit/b4f24d23ee100d37d8e76049
Modified Files:
ctrl/spamblock.cfg docs/v322_new.md src/sbbs3/mailsrvr.cpp
Log Message:
Mail Server: match client hostnames against spamblock.cfg again
Hostname patterns in ctrl/spamblock.cfg have not matched anything since 2f2c9ac9f6 (palace-19-bold, 2019-05-24), which dropped the hostname
comparison because the file was then re-read from disk on every inbound
SMTP connection and a second pass over a multi-megabyte file was a real
cost. Only the client IP address has been compared since, while the stock file's comments (and the wiki) kept describing hostname blocking as a supported, hostname-lookup-dependent feature.
Both halves of that reason are gone: the file has been cached in memory
since v3.21c, and the cached lookup matches two strings in a single pass
over the list, exactly as the ipfilter_exempt.cfg and spamblock_exempt.cfg checks in the same function already do. So pass the hostname too. As with host.can, this needs the Mail Server's hostname look-ups enabled.
The log line now includes the hostname (as the host.can line does) and the
550 reply says "CLIENT BLOCKED" rather than "CLIENT IP ADDRESS BLOCKED",
since the match may now be by hostname.
Rewrite the stock spamblock.cfg comments: mention CIDR notation and the exemption file, and replace the long-obsolete description of the
auto-added "; SMTP SPAM BAIT ... / ; Hostname: ..." comment lines with the TAB-separated metadata format (t=, p=, r=, e=, u=, h=) that filter_ip()
has actually written for years, plus SpamBlockDuration and trashman.
Co-Authored-By: Claude Fable 5.1 <
[email protected]>
---
� Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net