• ctrl/modopts/webmail.ini

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Thu Nov 19 15:05:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/c37c7b02f5fef6bc835974f1
    Added Files:
    ctrl/modopts/webmail.ini exec/tests/webmail/api.js config.js download.js kit.js locale.js session.js shell.js skipif userdata.js webv4.js webmail/lib/api.js config.js download.js locale.js webmail/lib/locale/en_us.ini webmail/lib/session.js shell.js userdata.js webv4.js webmail/mods/README.txt webmail/root/api.ssjs part.ssjs webctrl.ini
    Log Message:
    Web mail client: server side (settings, sessions, strings, API)

    The server half of a web mail client that lives in a new top-level
    webmail/ directory and uses the stock mailbox library for all mail
    logic.

    - ctrl/modopts/webmail.ini: every setting, commented out with its
    default. While the file exists a [webmail] section in modopts.ini is
    not read. webmail/lib/config.js loads the settings, warns about an
    unusable value and uses the default; a bad value can never turn the
    HTTPS requirement off. The product name defaults to "{system}
    Webmail"; {system} is the BBS name and {host} the requested host.
    - webmail/lib/session.js: sign-in sessions, many per user, kept in the
    user's data directory. The cookie's key comes from the system random
    generator and only its SHA-256 is stored. A session without "keep me
    signed in" ends after 2 idle hours or 24 hours; the browser's own
    background requests do not count as activity. Changing the password
    ends every session of that user.
    - webmail/lib/locale.js and locale/en_us.ini: strings in sectioned ini
    files, chosen from the user's language, then the browser's, then the
    sysop's default; an overlay in webmail/mods/locale changes single
    strings.
    - webmail/lib/api.js with root/api.ssjs: one endpoint taking a batch of
    JSON calls. This set signs in and out and reads mail: folders, lists,
    search, a message, and "has anything changed". Every call needs a
    custom request header, HTTPS unless the sysop allows otherwise, and a
    valid session whose user still exists and still has access. Request
    text is checked and normalized as UTF-8. Errors reach the browser as
    a code and a localized fixed text. A message comes with its sender's
    avatar, chosen as the terminal chooses it.
    - webmail/lib/download.js with root/part.ssjs: sends one attachment.
    Only PNG, JPEG, GIF and WebP are ever shown inline; everything else
    is a download, sandboxed and not sniffed.
    - webmail/lib/webv4.js: with webv4_login on, a user signed in to webv4
    on the same host name is signed in here without the form.
    - webmail/lib/shell.js: what the shell page needs (boot data, security
    headers, versioned asset paths).

    Sign-in checks that the account may use web mail before calling the web server's login(), so a refused guest leaves no logon behind.

    Tests are in exec/tests/webmail and use scratch bases and directories.
    The .ssjs pages are covered by their libraries' tests and were
    exercised through a scratch web server on a loopback port. Run on
    Linux only.

    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 L@VERT to Git commit to main/sbbs/m on Fri Nov 20 15:25:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/db5d56742d5256e7f87bf0f3
    Modified Files:
    ctrl/modopts/webmail.ini docs/v322_new.md exec/tests/webmail/config.js shell.js webmail/lib/api.js config.js webmail/lib/locale/en_us.ini webmail/mods/README.txt
    Log Message:
    Web mail client: the product name is spelled "WebMail"

    The default product name is "{system} WebMail" (was "{system} Webmail"),
    and so are the application name string, the comments of ctrl/modopts/webmail.ini, the mods README and the v3.22 notes. A sysop's
    own product_name is unaffected. Directory, file, setting and cookie
    names stay lowercase "webmail".

    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 L@VERT to Git commit to main/sbbs/m on Sun Nov 22 00:04:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/bab875ab569228555dc75db9
    Modified Files:
    ctrl/modopts/webmail.ini exec/tests/webmail/api.js config.js webv4.js webmail/lib/api.js config.js webv4.js webmail/root/api.ssjs
    Log Message:
    WebMail: new webv4_logout option, signing out of WebMail signs out of webv4

    Commit 8a0a4c8c9e (knew-4-curious, 2026-11-21) tied a WebMail session
    started from webv4 to the webv4 session (#1395), covering one direction: signing out of the web site ends WebMail. The other was left: signing
    out of WebMail only told the user they were still signed in to the main
    site.

    With the new webv4_logout setting (default false) in
    ctrl/modopts/webmail.ini, signing out of WebMail also ends the browser's
    webv4 session when it belongs to the same user, as webv4's own sign-out
    does: the user's data/user/####.web file is removed and webv4's cookie
    cleared with the domain and path webv4 sets it with. It applies however
    the WebMail session was started (from webv4 or with a password) and does
    not need webv4_login. A webv4 session of another user in the same
    browser is left alone, and a failure to end it is logged without
    failing the sign-out. Session timeouts and "sign out everywhere" do not
    touch webv4.

    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 L@VERT to Git commit to main/sbbs/m on Sun Nov 22 01:29:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/9c00441ff953ec73dc94f9b9
    Modified Files:
    ctrl/modopts/webmail.ini exec/tests/webmail/api.js config.js webmail/lib/api.js config.js webmail/lib/locale/en_us.ini webmail/lib/shell.js webmail/root/js/app.js login.js
    Log Message:
    WebMail: new webv4_only option, sign in only through webv4

    Asked for on #1395: a site that serves WebMail under its webv4 web site
    may want one sign-in, the web site's, and no separate WebMail form.

    With webv4_only = true in ctrl/modopts/webmail.ini, WebMail has no
    sign-in form: when the user is not signed in, the sign-in card says to
    sign in on the main site and links there, to the new webv4_url setting
    ("/" by default; an http:// or https:// URL or a path, checked as
    fallback_url is). The API refuses every password sign-in with
    "forbidden", without calling login(), so a request that bypasses the
    page cannot try passwords and nothing is counted as a failed login.
    webv4_only also turns on webv4_login, since signing in only through
    webv4 is signing in through webv4.

    session.get reports webv4_only (and webv4_url when it is on), which the
    client uses to show the link in place of the form.

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

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