https://gitlab.synchro.net/main/sbbs/-/commit/474a534ebed5ac37902272a0
Modified Files:
docs/v322_new.md src/sbbs3/mailsrvr.cpp src/xpdev/sockwrap.c sockwrap.h Log Message:
Mail server: don't DNSBL-check non-public Received header addresses
With DNSBL_CHKRECVHDRS on, chk_received_hdr() looked up the bracketed
address from each Received header on the configured blacklists without
checking whether it was publicly routable. A sender's own internal hop
such as "outbound.qs.icloud.com (unknown [127.0.0.2])" was therefore
looked up as 2.0.0.127.<dnsbl>, which every DNSBL answers as "listed" (127.0.0.2 is the standard test entry), and legitimate mail was marked
as spam and, with a spam purge age set, deleted early.
New in xpdev's sockwrap.h: IPV4_IS_ADDR_*() macros, the IPv4 counterpart
of the standard IN6_IS_ADDR_*() macros (loopback, private, shared/CGNAT, link-local, multicast, reserved, etc.). The names avoid IN_* (FreeBSD)
and IN4_IS_ADDR_* (Windows SDK).
New function inet_addrpublic() uses those macros to report whether an xp_sockaddr is publicly routable, including IPv4-mapped IPv6 addresses
and IPv6 unique local (fc00::/7). It is not built for Borland C++
Builder, which nothing that needs it is compiled with.
chk_received_hdr() skips any address that is not public: such an
address says nothing about where a message came from.
Fixes #1367
Co-Authored-By: Claude Opus 5.5 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net