• src/sbbs3/sbbsecho.c

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Wed Dec 10 17:12:44 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/e69955e0e7e951634ad90f48
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    Replace integer constants 0 and 1 with values of appropriate type (e.g. bool)

    Code clean-up, no functional change.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wed Dec 24 19:50:40 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/241bd37f9feb34506c3b295d
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    Better logging around area list file open failures

    This also fixes the empty "Title" key/valiue lines in the echostats.ini file.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Denn@VERT/OUTWEST to Gamgee on Sat Dec 27 12:02:57 2025
    Re: Re: src/sbbs3/sbbsecho.c
    By: Gamgee to MRO on Tue Feb 04 2025 06:41 pm

    MRO wrote to k9zw <=-
    Alas my system merged this in another echo... puzzling how at the
    moment... appreciate the reply!

    put your data files in their own sub directory for each msg network
    you have.

    That isn't necessary and certainly is not the default way.

    But it does keep the directories a little tidier.

    ... Remember how simple life was when there were only two sexes?

    ---
    ■ Synchronet ■ the Outwest BBS - outwest.synchro.net - Home of BBSBASE 6.0
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Wed Feb 18 17:30:14 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/9c4557e96766bb7e6b73edf4
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    Fix a couple more new-GCC warnings

    using gcc (GCC) 15.2.1 20260209 "assignment discards const qualifier"

    reported by Accession

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Sat Apr 18 02:27:17 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/3422dabc7807f1fff56ebb9e
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    Fix compile errors on GCC 15.2

    error: passing argument 2 of `getfmsg' from incompatible pointer type [-Wincompatible-pointer-types]

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wed May 6 19:41:53 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/326057fd5c56c0c77a5e0d34
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    sbbsecho: free pkt->filename on fopen failure in find_stray_packets (CID 530517)

    When the new outpkt_t cannot be opened for append, free(pkt) was called
    without first releasing the strdup'd pkt->filename, leaking the path
    for every stray packet whose append-open fails.

    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wed May 6 19:41:53 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/9ef727bc25d13118b3ba5323
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    sbbsecho: cast away unchecked chmod/remove returns in alter_areas (CIDs 462777, 515046)

    Both calls in alter_areas() are best-effort: the chmod is a permission
    preserve before rename, and the remove is documented to be expected to
    fail when the file doesn't exist. Make the ignore-return intent explicit
    with (void) casts so Coverity stops flagging them as CHECKED_RETURN.

    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Fri Jul 17 02:57:08 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/4fc976e4a95c2afe121425e6
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    Don't import netmail addressed to an inactive user's number

    import_netmail() resolves a numeric "To:" field with atoi() straight from
    the packet, which short-circuits lookup_user() -- the only thing in this
    path that skips deleted users. Nothing downstream catches it either: fmsgtosmsg() calls getuserdat(), which returns USER_SUCCESS for a deleted record, and no check guards the RECIPIENTEXT field written from it. A
    remote system could therefore deposit netmail into a deleted user's
    record, where it stays invisible until the record is recycled.

    Reject an inactive account where the number is resolved, so the message
    falls through to the existing lookup_user() / default_recipient /
    "Unknown user" handling rather than changing what fmsgtosmsg() reports to
    its callers. This matches the SMTP RCPT TO path, which already rejects a recipient that isn't an active account.

    Fixes #1187

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Steven Philley@VERT to Git commit to main/sbbs/master on Thu Sep 10 01:17:29 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/4a76e2aa9a8336d7bda238ed
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    sbbsecho: summarize security violations at end of log

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu Sep 10 01:17:29 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/094414dbc737da32df2062c9
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    Merge branch 'sbbsecho-security-violation-summary' into 'master'

    sbbsecho: summarize security violations at end of log

    Closes #1228

    See merge request main/sbbs!730

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tue Sep 29 19:00:50 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/1debd362b1e3c690856c91b6
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    SBBSecho: export a message's declared charset as its CHRS

    A message posted with a MIME charset other than UTF-8 (for example from an
    NNTP client set to ISO-8859-1 or Windows-1252) was exported to FidoNet as "CHRS: CP437 2", so FTN readers mis-rendered its accented characters.

    Netmail and echomail export now share ftn_charset(). When a message has
    8-bit body text, no FTN charset and is not UTF-8, its MIME charset is
    mapped to the matching FTS-5003 identifier: LATIN-1/2/5/9, CP1250/1251/
    1252, CP850/852/866 (or CP437). Names are matched ignoring case, '-' and
    '_'. Charsets FTS-5003 has no identifier for still export as CP437.

    The configured origin line is CP437, so it is reduced to ASCII when the
    message goes out in one of those other 8-bit charsets. A message whose
    only 8-bit text is the origin line is still labeled CP437.

    Fixes #1259

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tue Sep 29 19:00:50 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/6c6d3dcbf9c50003d7ec9938
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    SBBSecho: give each generated NetMail a unique MSGID serial

    The MSGID of a NetMail message SBBSecho creates itself (AreaMgr replies,
    notify lists, etc.), added in 96712a1c35 (focuses-28-lives, 2021-11-12),
    used the current time in seconds as its serial. Messages created within
    the same second, such as the parts of a notify or area list split across several NetMails to one node, therefore shared a MSGID, which FTS-0009
    requires to be unique for the origin address, and which a receiving
    tosser checking NetMail for duplicates by MSGID could discard.

    The serial is now the current time, or one more than the last serial
    used, whichever is greater.

    Related: #1257

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tue Oct 27 19:41:34 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/ad0cde5491bfdcf99dc292ab
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    sbbsecho: bundle full packets immediately; keep long runs from going stale

    A remote AreaFix RESCAN of every area could fill the disk: outbound
    packets that reached the maximum packet size were held in the temp
    directory until the end of the run, so a large export accumulated every exported message there, uncompressed (32 GB in the reported case). The ever-growing temp directory and outbound packet list also made each new
    packet slower to create, stretching the run to about 20 hours.

    - Bundle each outbound packet as soon as it is full, and drop it from
    the outbound packet list. pktname() no longer reuses a name within a
    run: a packet already moved into a bundle no longer exists on disk,
    and a same-named packet would replace it inside that bundle.

    - During long runs, refresh the time stamps of sbbsecho.bsy and the BSO
    node lock files (at most once a minute), so a run that outlasts
    BsyTimeout isn't considered stale and joined by a concurrent instance.

    - Check MinFreeDiskSpace for the temp and outbound directories before
    creating each new outbound packet, and stop gracefully (as on a
    termination signal) rather than writing until the disk is full.

    - When an echomail export stops early, save the export pointer of the
    last message processed instead of the sub-board's last message, so
    the remaining messages are exported by the next run rather than
    skipped. This also affected an export interrupted with Ctrl-C.

    Fixes #1301

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sat Nov 14 13:33:55 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/114a872aee602dbf30a8719c
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    sbbsecho: use the sub-board's storage mode when re-tossing bad echomail

    retoss_bad_echomail() passed "smb.status.attr & SMB_HYPERALLOC" as the
    storage mode to smb_addmsg(), so a message moved out of the bad-echo
    area into a sub-board configured for fast allocation was added with self-packing allocation instead, scanning the data allocation file for
    free blocks on every message. It has done so since the re-toss feature
    was added in 9f2c88e060 (2017-10-29).

    Use smb_storage_mode(), as the normal import path in fmsgtosmsg() does.

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

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Mon Nov 30 00:24:49 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/52f68e4a9b74b58229199a41
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    SBBSecho: don't forward NetMail from one FTN domain into another

    NetMail in a received packet that isn't addressed to one of our
    addresses is written to the netmail directory, from where SBBSecho packs
    it to the destination's link, from our address in the destination zone
    and with that link's packet password. Nothing checked that the message
    belonged to the destination's network. On a system in more than one FTN
    domain (e.g. FidoNet and fsxNet), anyone able to send us a packet,
    including an unauthenticated one in the non-secure inbound, could use an
    INTL line to have SBBSecho deliver NetMail into another network, as a password-protected packet from our address in that network.

    Such NetMail is now forwarded only if the domains (as configured in sbbsecho.ini) of its destination zone, its origin zone (from INTL) and
    the zone of the packet it arrived in are all the same; otherwise it's
    logged ("NOT forwarded") and dropped. The packet's zone is checked too
    because an INTL origin is easily forged. Zones not in any configured
    domain count as FidoNet, as elsewhere in SBBSecho. This applies both
    when NetMail import is enabled and when it's disabled (-n), which writes
    packed NetMail to the netmail directory as well.

    Fixes #1004

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Mon Nov 30 00:24:49 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/29cd73d4c575a00b63c827b5
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    SBBSecho: don't forward file attachments of in-transit NetMail

    When a received NetMail message that isn't addressed to this system had
    the File-attached attribute, SBBSecho took its attachments to be the
    files named in its subject, in the inbound directory the packet came
    from, and sent them on with the message (deleting them afterward if the
    message had a FLAGS KFS control line). The sender, not this system,
    decided which of the files there got sent, and where.

    In-transit NetMail now has its File-attached attribute cleared when
    it's written to the netmail directory, so it's forwarded without
    attachments and the files are left alone; a notice is logged. File
    attachments in NetMail addressed to this system are handled as before.
    Routed file attachments are rarely used, and many tossers and mailers
    don't forward them at all.

    Fixes #1436

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Mon Nov 30 00:24:49 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/e1329147f14c2d19db21ad8b
    Modified Files:
    src/sbbs3/sbbsecho.c
    Log Message:
    SBBSecho: skip NetMail with a missing attachment instead of stopping

    When pack_netmail() couldn't add a NetMail message's file attachment to
    the flow file, most often because the file didn't exist, SBBSecho
    stopped (exit code 1). The .msg file stayed in the netmail directory
    unsent, so every later run stopped at the same message and no outbound
    NetMail behind it was packed until the sysop removed or fixed it.

    The attachments are now all checked before any is added to a flow file.
    If one is missing, the error is logged ("NOT packed: attachment file not found"), the message is left in the netmail directory, and packing
    continues with the next one. Checking first means a message is never half-listed in a flow file. The checked path is normalized the same way write_flofile() does it, through a function they now share.

    Received NetMail with attachments has the attachment paths stored in
    the message's 72-byte subject field, which cuts off a longer path; that
    is now logged as a warning.

    Fixes #1437

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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