• Replying to email from the BBS's domain gives "Invalid Netmail address

    From Nigel Reed@1:103/705 to GitLab issue in main/sbbs on Fri Aug 7 13:10:55 2026
    open https://gitlab.synchro.net/main/sbbs/-/issues/1215
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Fri Aug 7 15:05:18 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1215#note_10051

    Root-caused. There are two separate defects here, and they need separate
    fixes: one in the mail server that writes the header, one in the mail reader that acts on it.

    ### 1. The header should not say the sender is on another system

    Your intuition about `SenderNetType` is right. When a user submits mail over authenticated SMTP, `mailsrvr` stores the message with `SENDER_NETTYPE` of `NET_INTERNET` and a `SENDERNETADDR` of the sender's own address, even when
    the recipient is a local user and both parties are accounts on this BBS. Note that your header already carries `SenderExt 792`, so the server knew perfectly well which local user sent it.

    There is a branch that sets the sender net type to "none" for an
    authenticated submission, but it has been qualified with "only when posting to a sub-board" since d21065229b (knee-4-prepare, 2009-11-12), which is where it was introduced. E-mail was never covered.

    Fixing it takes a little care, because the sender header fields are written once, before the per-recipient loop, and one submission can name both local
    and remote recipients. For a recipient on another system the sender net
    address is what selects the reverse-path as the envelope sender and what
    routes a delivery-failure notice back, so it cannot simply be dropped. The fix sets the sender to the authenticated user's alias up front, then adds the sender net type and address per recipient copy, only for copies whose
    recipient is not local. Mail leaving the system is unchanged, and the `From` header your POP3/IMAP client sees is unaffected either way, since that is rendered from the preserved RFC822 `From` field.

    ### 2. The reply itself fails, and that is a reader bug

    This is what actually produced your screenshot, and it is why fixing the
    header alone would not help you.

    The prompt in your screenshot comes from `exec/msglist.js`, which is what `readmail` is configured to run. Its `mail_reply()` chooses between `bbs.netmail()` and `bbs.email()` on the sender net type alone. Since the type says Internet, it calls `bbs.netmail()`, which refuses the address because it is on one of this system's own domains, and you get "Invalid NetMail address" and "Failed to send".

    Sending that mail back out through your own SMTP server used to work by accident, until 4aa2274c97 (provide-5-player, 2026-01-22) stopped netmail to our own addresses. The built-in mail reader was given a fallback at that time, in be05f55db5 (chest-4-dies, 2026-02-11): if the address will not route as netmail but the message carries a sender user number, reply by regular e-mail to that user instead. `msglist.js` never got the equivalent, and `msglist.js` is what is actually running.

    So it now falls back the same way. Replies to genuinely remote senders are unaffected, because that fallback needs a sender extension, which a message from another system does not carry.

    ### Which fix helps you when

    The reader fix is the one that answers the mail already sitting in your base, including the message you posted here, because it does not care how the header was written. It is a `.js` file, so it takes effect without a rebuild.

    The server fix only changes mail received from that point on. You will need to rebuild for it.

    ### Verified

    Both were checked end to end against a scratch BBS rather than by inspection. With the server fix, an authenticated local user's mail to a local user is stored with the sender alias and no net address, while the same user's mail to a remote address keeps `SenderNetType Internet` and the sender net address, and mail from an unauthenticated remote sender is unchanged. With the stock reader, replying to a message carrying the old header reproduces "Invalid NetMail address" and "Failed to send" exactly as you saw; with the fix, the same reply goes to "Sending E-mail to ... #2" and delivers to the sender's inbox.

    Thanks for the detailed header dump, it made this a lot quicker to pin down.

    *Authored by Claude (Claude Code), on behalf of @rswindell*
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Sat Aug 8 00:25:35 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1215#note_10067

    I assume that a current message will still be broken and new messages will be OK?
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sat Aug 8 03:01:25 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1215#note_10068

    No, the current message can be replied to in msglist.js now as well.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Sat Aug 8 13:06:16 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1215#note_10072

    Then it doesn't appear to be working correctly.

    When I reply, it's not using the sender's email address that was used in the email but the user's registered netmail address, which would be incorrect.

    It should be using the email address they sent the email from.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sat Aug 8 15:30:36 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1215#note_10075

    Then it doesn't appear to be working correctly.

    You weren't able to reply?

    When I reply, it's not using the sender's email address that was used in the email but the user's registered netmail address, which would be incorrect.

    It should be using the email address they sent the email from.

    It sounds like the user's account is configured to forward their local email to a remote (netmail) address. The "email address they sent the email from" is basically your local mailbase (since it sent "from" your domain) and you're response is going to the local mailbase for the sending user number which sounds like they don't want their mail to stay in your mailbase, they want it forwarded elsewhere.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Sat Aug 8 15:43:39 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1215#note_10077

    His registered email address is a gmail.com address which is set to forward.

    The email he sent me was from Outlook which they are using for their @endofthelinebbs.com mail. I should be able to reply to the @endofthelinebbs.com email and it should drop the email into his mailbox for collection via imap. This email transaction is completely independent of him any in-bbs email he may have sent. That I would expect to try and forward to gmail.com since that's how it's set.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sat Aug 8 15:53:52 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1215#note_10078

    it should drop the email into his mailbox for collection via imap

    Not when he has his account set to forward to netmail.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sat Aug 8 18:15:42 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1215#note_10097

    A few specifics that may help here, plus a question.

    ### The forwarding is not specific to replying

    The mail server applies the same rule to everything arriving over SMTP. At RCPT time, if the system has "forward to network mail address" enabled and the user account has the NetMail flag set, the message is addressed to that user's NetMail address instead of their local mailbox, whoever sent it. Mail to trainman0101@endofthelinebbs.com from Gmail, from a stranger, or from you all take that same turn.

    So the reply is not picking the wrong address; it is arriving at the same place any other message to that address would. The only exemptions are when the NetMail address is itself on your system address, your configured host name, or listed in ctrl/domains.cfg.

    ### Replying used to reach the same place, just by a longer route

    Before 4aa2274c97 (provide-5-player, 2026-01-22), a reply of this kind went out as netmail to @endofthelinebbs.com, connected back to your own SMTP server, and hit exactly that RCPT rule on the way in. Same destination, three more hops. The
    fix in 3f13efa6ab (later-27-learn, 2026-08-07) changed a reply that failed outright into one that is delivered where the account says to deliver it. It did
    not change the destination.

    ### You can override it per message, and this is my question

    Replying to a local user whose account forwards does not send silently. It prints the NetMail address and then asks:

    ```
    NetMail : <their address>
    Forward personal e-mail to network mail address [Y/n]
    ```

    Answering **No** puts the message in their local mailbox instead, where IMAP will collect it. That is the behavior you are describing wanting, and it is available now, per message.

    **Are you seeing that prompt?** If you are, answering No should do what you want. If the reply forwards to the Gmail address without asking, that is a different problem and worth chasing, because on this path the prompt should always appear.

    ### If you want both at once

    Synchronet forwards or delivers locally, not both. There is no "forward a copy and keep one" setting. If what you actually want is for trainman0101 to get it at Gmail and to have it in his endofthelinebbs.com mailbox for IMAP, that is a feature that does not exist today rather than a bug in this path, and it would be worth a separate issue.

    The other possibility, if he is collecting that mailbox over IMAP anyway, is simply to clear the NetMail forwarding flag on his account. The forwarding and the IMAP mailbox are alternatives, and having both configured is what produces the surprise.

    *Authored by Claude (Claude Code), on behalf of @rswindell*
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sat Aug 8 18:16:36 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1215#note_10097

    A few specifics that may help here, plus a question.

    ### The forwarding is not specific to replying

    The mail server applies the same rule to everything arriving over SMTP. At RCPT time, if the system has "forward to network mail address" enabled and the user account has the NetMail flag set, the message is addressed to that user's NetMail address instead of their local mailbox, whoever sent it. Mail to trainman0101@endofthelinebbs.com from Gmail, from a stranger, or from you all take that same turn.

    So the reply is not picking the wrong address; it is arriving at the same place any other message to that address would. The only exemptions are when the NetMail address is itself on your system address, your configured host name, or listed in ctrl/domains.cfg.

    ### Replying used to reach the same place, just by a longer route

    Before 4aa2274c97 (provide-5-player, 2026-01-22), a reply of this kind went out as netmail to @endofthelinebbs.com, connected back to your own SMTP server, and hit exactly that RCPT rule on the way in. Same destination, three more hops. The
    fix in 3f13efa6ab (later-27-learn, 2026-08-07) changed a reply that failed outright into one that is delivered where the account says to deliver it. It did
    not change the destination.

    ### You can override it per message, and this is my question

    Replying to a local user whose account forwards does not send silently. It prints the NetMail address and then asks:

    ```
    NetMail : <their address>
    Forward personal e-mail to network mail address [Y/n]
    ```

    Answering **No** puts the message in their local mailbox instead, where IMAP will collect it. That is the behavior you are describing wanting, and it is available now, per message.

    **Are you seeing that prompt?** If you are, answering No should do what you want. If the reply forwards to the Gmail address without asking, that is a different problem and worth chasing, because on this path the prompt should always appear.

    ### If you want both at once

    Synchronet forwards or delivers locally, not both, and that is already on record rather than something to file: #140 asks for exactly this, mail "forwarded to an internet address but remain on the BBS as well", and #593 restates it as a Yes/No/Both toggle in SCFG. So if what you want is for trainman0101 to get it at Gmail and to have it in his endofthelinebbs.com mailbox for IMAP, those are the issues to follow, and this path is behaving as designed in the meantime.

    The other possibility, if he is collecting that mailbox over IMAP anyway, is simply to clear the NetMail forwarding flag on his account. As things stand the forwarding and the IMAP mailbox are alternatives, and having both configured is what produces the surprise.

    *Authored by Claude (Claude Code), on behalf of @rswindell*
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab issue in main/sbbs on Sat Aug 8 23:53:07 2026
    close https://gitlab.synchro.net/main/sbbs/-/issues/1215
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Sat Aug 8 23:53:07 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1215#note_10111

    Ah yes. Makes sense. Thank you.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)