• Store user signatures as the message tail when their file has no "-- "

    From Rob Swindell@1:103/705 to GitLab issue in main/sbbs on Tue Sep 29 19:35:15 2026
    open https://gitlab.synchro.net/main/sbbs/-/work_items/1272

    ## Summary

    A user's signature is stored as the message tail (separate from the body)
    only when the signature file begins with the standard `-- ` delimiter line
    (RFC 3676), and only on some of the paths a message can be posted by.
    Otherwise the signature becomes part of the body. To be decided: which
    approach to take.

    ## Current behavior

    `sbbs_t::writemsg()` (`src/sbbs3/writemsg.cpp`) appends the user's
    signature file (`data/user/####.sig`, or `####.<sub-code>.sig`) after the editor has run, to the same message file as the body. The caller then
    reads the file back and saves it. The body and tail are separated
    afterwards by `findsig()` (`src/sbbs3/postmsg.cpp`), which only recognizes
    a `\n-- \r\n` line:

    | `writemsg()` caller | Saved with | Signature split into the tail | |---|---|---|
    | `postmsg()` (sub-boards) | `smb_addmsg()` + `findsig()` | only after a `-- ` line |
    | `netmail()`, `inetmail()`, `bulkmail()` | `savemsg()` (calls `findsig()`) | only after a `-- ` line |
    | `email()` (local e-mail), `qnetmail()` (QWK netmail) | their own data write, body only | never |

    A signature file without a `-- ` first line therefore always ends up in
    the body, and so does every signature on local e-mail and QWK netmail.

    Where the tail matters: the terminal server displays a tail without word-wrapping (preserving a signature's layout), JavaScript readers can
    fetch body and tail separately, and the body hash used for duplicate
    detection covers only the body.

    ## Options

    **1. Add the delimiter when appending a signature that lacks one.** `writemsg()` writes a `-- ` line before a signature file whose first line
    is not `-- ` (also correcting a first line of `--` whose trailing space was trimmed). Every path that already calls `findsig()` then splits it with no other change, and the delimiter is also what e-mail, NNTP and FTN readers
    use to recognize a signature once the message is exported. Cost: a `-- `
    line appears above signatures that were written without one.

    **2. Record where the signature starts, and split there.**
    `writemsg()` reports the offset at which it began appending the signature
    (an optional output parameter, like its existing `editor` and `charset`),
    and each caller splits the saved text there instead of, or before trying, `findsig()`. Nothing changes visibly. Nothing is kept once the message is
    saved (the split is the message's body and tail data fields). Cost:
    changes to all six callers and the paths behind them (`savemsg()` needs a
    new parameter or variant), and a signature stored this way still has no delimiter for other software to recognize.

    Either way, `email()` and `qnetmail()` would need to save the tail at all,
    as the others do.

    -- *Authored by Claude (Claude Code), on behalf of @rswindell*
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)