• exec/load/salib.js exec/spamc.js

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Fri Jul 17 03:05:43 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/3075d878a5537bee481fa0df
    Modified Files:
    exec/load/salib.js exec/spamc.js
    Log Message:
    spamc.js/salib.js: wait longer than 30s for spamd's response

    salib.js called Socket.recvline() with no arguments, silently taking its 30-second default timeout. spamd doesn't respond until it has finished
    scanning a message, which under load (network tests, DNSBLs) routinely
    exceeds 30s, so the deadline would expire while spamd was still working.

    recvline()'s timeout is an absolute deadline from the moment it's called,
    and expiring mid-response yields a *truncated* line rather than an error,
    so this surfaced as two different failures on cvs.synchro.net (51 of them
    in ~2 weeks):

    mail 0112 SMTP SPAMC !ERROR No lines read from spamd
    mail 0105 SMTPS SPAMC !ERROR Unable to parse line 'S

    The first is the deadline expiring before any byte arrived; the second is
    it expiring mid-line, leaving just the 'S' of "SPAMD/1.1 0 EX_OK".

    SPAMC_Message() now takes a timeout argument, defaulting to 600 seconds (spamc(1)'s own -t default), and passes it to both recvline() call sites. spamc.js exposes it as a "timeout <seconds>" (-t) mailproc.ini option.
    Verified against a stub spamd: both failures above now score correctly.

    The bare recvline() calls date to 5dcc582161a (cake-8-promoted). That recvline() reports a mid-line timeout to its caller as success is a
    separate defect, filed as #1188.

    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

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