• src/sbbs3/mailsrvr.cpp

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Wed Nov 11 13:04:30 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/59bb834db75f09c19a9bfd0c
    Modified Files:
    src/sbbs3/mailsrvr.cpp
    Log Message:
    mailsrvr: don't treat a failed user re-read as an unauthenticated client

    When an authenticated SMTP client sent to an external address, the relay
    check re-read the user's record with getuserdat() and ignored the result. getuserdat() zeroes user->number on failure, so a transient error such as
    a user record lock timeout made the session unauthenticated: the RCPT was refused as an "ILLEGAL RELAY ATTEMPT" (553/550, a permanent failure) and
    the rest of the session ran without the user. The emails-per-day check
    re-read the record the same way.

    Re-read into a copy that only replaces the session's user record on
    success, and answer a failure with a 451 temporary error so the client
    retries.

    Seen with GitLab's notification mail: concurrent sessions for the same
    user stalled ~105 seconds in lockuserdat() and one was rejected as an
    illegal relay.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Fri Nov 13 20:51:10 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/80c2a8b975ed9eeb70bea54f
    Modified Files:
    src/sbbs3/mailsrvr.cpp
    Log Message:
    mailsrvr: don't apply the request rate limit to POP3 commands

    Every command received in the POP3 TRANSACTION state was counted
    against the request rate limiter, so an authenticated client with a
    large mailbox (e.g. RETR + DELE for each of 250 messages) exceeded a
    500 request limit and was disconnected with "-ERR too many requests,
    try again later", logged as "Too many requests per rate limit".

    Those commands are only reachable after a successful login, failed
    logins are already handled by the login attempt filter, and concurrent connections are already limited, so the request rate limit now applies
    only to SMTP commands.

    The POP3 check was added in c8490b7429f (2026-03-11).

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Sat Nov 14 11:52:09 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/8195f1169c09075e219abebb
    Modified Files:
    src/sbbs3/mailsrvr.cpp
    Log Message:
    mailsrvr: never send a truncated POP3 LIST or UIDL listing

    The "list all" loop for LIST and UIDL stopped as soon as the mail base
    became locked, after "+OK" had been sent and before the terminating
    ".", so the client received a well-formed listing of only the first
    messages. A client that leaves mail on the server treats a message
    missing from the UIDL listing as removed, forgets it, and downloads it
    again as new on its next check: a session that collided with the
    daily e-mail purge caused 204 of 449 messages to be re-downloaded.

    The listing is now built first and sent only when every message was
    read; otherwise the reply is "-ERR" and the session ends. A failure to
    read a message's index or header also fails the listing, where before
    the message was silently left out.

    The lock check was added to the loop in 71aa48f825f (2026-01-16).

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Sat Nov 21 11:03:05 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/808eb8cd0faf3682b5302148
    Modified Files:
    src/sbbs3/mailsrvr.cpp
    Log Message:
    mailsrvr: a delivery-failure notice names the failed message

    bounce() copied the failed message into the notice, so the notice's
    Message-ID was the failed message's own ID (or, when that had none, an
    ID derived from the failed message's number and time), and it carried
    no reply-ID. A mail client could not tell which sent message a notice
    was about, nor thread the notice under it.

    The notice now gets a Message-ID of its own, derived from a fresh
    message number, and the failed message's Message-ID as its reply-ID.
    When the failed message has no Message-ID the notice has no reply-ID.
    The guards against bouncing a notice are untouched.

    Verified by reading and compiling only; there is no automated test for
    this path. Built with GCC only.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)