• exec/tests/msgbase/notify/fwd_keep.js fwd_keep_child.incdocs/v322_new.

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sat Nov 21 11:03:05 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/4c62ce808f9f03a1a797a82b
    Added Files:
    exec/tests/msgbase/notify/fwd_keep.js fwd_keep_child.inc
    Modified Files:
    docs/v322_new.md exec/load/sbbsdefs.js exec/tests/webmail/api_settings.js src/sbbs3/bulkmail.cpp getmail.c getmail.h mailsrvr.cpp postmsg.cpp sbbsdefs.h sbbsecho.c src/sbbs3/scfg/scfgmsg.c src/sbbs3/un_qwk.cpp un_rep.cpp
    Log Message:
    Forward e-mail to netmail and keep a local copy

    "Allow Forwarding to NetMail" (SCFG Message Options) now offers Yes, No
    and Both. Both keeps today's forwarding (SM_FWDTONET, the user's
    forward setting, a usable address) and also delivers a copy to the
    user's mailbox. The new message option MM_FWDKEEP is bit 0 of the
    message options word: bits 16 and up default to on (a stock msgs.ini
    holds settings=0xffff0000), so a new off-by-default option takes a low
    bit. With it clear, nothing changes.

    One body, two headers, where the forward and the local copy come from
    the same saved message: the SMTP delivery (mailsrvr.cpp), bulk mail (bulkmail.cpp), system notices (notify() in postmsg.cpp) and inbound
    FidoNet netmail (sbbsecho.c). The local copy is a second header,
    indexed to the user, sharing the forwarded message's data; its
    reference is added before the header, so a header never outlives its
    data. New add_fwd_mail_copy() (getmail.c) builds it for the last three.
    The forwarded header is unchanged and still deleted once sent.

    SMTP: the local copy rides in the forwarded recipient's section of the recipient list (a LocalCopy key), so a forwarding recipient still takes
    one slot toward the recipient limit, and the sender's daily count and
    the mail archive go up once. The user gets the normal new-mail notice
    once, not also the "forwarded" notice; SBBSecho does the same.

    Body stored twice: QWK network mail (un_qwk.cpp) and REP packets
    (un_rep.cpp) forward through qwktonetmail(), then import the same
    packet body again as local mail. A REP message that was forwarded is
    counted against its sender and announced once, not again for the local
    copy; when the forward was not made (the sender may not send netmail,
    or the address is bad) the message is kept locally only and that is
    logged. Terminal e-mail (email.cpp) stays
    forward-only when the sender chooses to forward: a local copy there
    would need a second editor session or a change to netmail(), so the
    SCFG help and release note say so.

    Tested: notify() through system.notify(), with the option clear and
    set, by a new jsexec test (exec/tests/msgbase/notify/fwd_keep.js) that
    checks the headers, index records, mailbox count, notice and, with
    chksmb, the data reference counts; a build without the reference
    increment fails it. The whole msgbase test directory passes. SCFG: all
    three values set and saved on a scratch ctrl copy. Only read and
    compiled: mailsrvr.cpp, bulkmail.cpp, sbbsecho.c, un_qwk.cpp,
    un_rep.cpp. Built with GCC only.

    Fixes #593
    Fixes #140

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net