• exec/spamlearn.jsdocs/v322_new.md exec/load/salib.js

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Jul 2 00:55:42 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/8fe77e0ee2e083c5f8736be9
    Added Files:
    exec/spamlearn.js
    Modified Files:
    docs/v322_new.md exec/load/salib.js
    Log Message:
    Add spamlearn.js mail processor to train SpamAssassin Bayes from e-mail

    New exec/spamlearn.js consumes a (redirected) message and feeds it to a listening spamd via the TELL command to train the Bayes classifier as
    spam or ham. Intended as a mailproc.ini script: redirect spam to a
    "spamlearn" address and false-positives to a "hamlearn" address, gated
    to the authenticated sysop (AccessRequirements = user equal 1) with passthru=false so the message is learned, not delivered, and outsiders
    can't poison Bayes. Requires spamd started with --allow-tell.

    salib.js gains a learn(msgclass) method (Message_DoLearn) implementing
    the TELL protocol, mirroring the existing DoCommand convention. Unlike
    the scoring path it injects no synthetic Received/Return-Path (the
    original sender's headers train Bayes) and sends no User header, so it
    trains spamd's own run-as Bayes database - the same one used to score
    inbound mail.

    Validated end-to-end against the live spamd: a fresh message returns learned:true (spamd "Setting local"); a repeat returns learned:false
    (already known).

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

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