https://gitlab.synchro.net/main/sbbs/-/commit/7df7ab3a7d825846e02790fc
Modified Files:
src/sbbs3/mailsrvr.cpp
Log Message:
Don't tag an authenticated user's local mail as netmail (issue #1215)
An SMTP-authenticated user's message to a local recipient was stored with SENDER_NETTYPE of NET_INTERNET and a SENDERNETADDR of the sender's own
address on one of this system's own domains, even though both parties are
local users. Mail readers key off the sender net type to decide between a netmail reply and a regular e-mail reply, so replying to such a message
tried, and failed, to send netmail to an address this system won't route.
The NET_NONE branch dates from d21065229b (knee-4-prepare, 2009-11-12),
which qualified it with "subnum != INVALID_SUB" because it was added for messages posted to a sub-board via authenticated SMTP. E-mail was never covered.
The sender header fields are written once, before the per-recipient loop,
and a single submission can name both local and remote recipients, so the
net address can't simply be dropped: for a recipient on another system it
is what selects the reverse-path as the envelope sender, and what routes a delivery-failure notice back. Set the sender to the authenticated user's
alias up front, and add the sender net type and address per recipient
copy, only for the copies whose recipient is not local.
Mail leaving the system is unchanged. A local recipient's copy now looks
like any other local e-mail: sender alias plus SENDEREXT, no net address.
The From header presented over POP3 and IMAP is unaffected, as it is
rendered from the preserved RFC822FROM field.
Co-Authored-By: Claude Opus 5 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net