• Reply-To for local mail sent through a relay (Gmail)

    From Michael Pittsley@1:103/705 to GitLab issue in main/sbbs on Mon Nov 2 15:19:38 2026
    open https://gitlab.synchro.net/main/sbbs/-/work_items/1320

    I run CoCoNet BBS (Synchronet 3.21e, Linux). Like many home systems, I can't deliver internet mail directly, so the mail server relays outbound mail through smtp.gmail.com (RELAY_TX | RELAY_AUTH_LOGIN).

    The problem: Gmail rewrites the From: address of anything sent through it to the account that logged in. A message written on the BBS by "Maddy" arrives as:

    From: Maddy mybbsaccount@gmail.com

    and there is no Reply-To: header, so when the recipient (or a user who forwards their BBS mail to their own inbox) presses Reply, the reply goes to the relay account instead of back to Maddy@mybbs.synchro.net. Inbound mail to the BBS works fine, so the only thing missing is a Reply-To.

    In mailsrvr.cpp (around line 825), a Reply-To is only written when the message already has one stored. Local mail never does.

    My local fix: if there is no Reply-To and the message was written by a local user (from_net.type == NET_NONE and no original RFC822 From), use the same name/address the From: line is built from:

    /\* local senders get Reply-To: their BBS address \*/ char rt_name\[256\], rt_addr\[256\]; if (p == NULL && msg-\>from_net.type == NET_NONE && smb_get_hfield(msg, RFC822FROM, NULL) == NULL) { smtp_netmailaddr(&scfg, msg, rt_name, sizeof(rt_name), rt_addr, sizeof(rt_addr)); np = rt_name; p = rt_addr; }

    Result: the message now carries Reply-To: "Maddy" Maddy@coconet.synchro.net Gmail leaves Reply-To alone, so pressing Reply sends the answer back to the BBS and it lands in Maddy's mailbox. Mail from internet, FidoNet or QWK senders, and anything that already has a Reply-To, is unchanged.

    Has anyone else run into this, or solved it another way?

    Michael (JustMike) CoCoNet BBS - coconet.ddns.net:6809
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Nov 2 15:48:44 2026
    https://gitlab.synchro.net/main/sbbs/-/work_items/1320#note_10796

    I think this issue would normally be avoided by relaying through a mail relay that doesn't rewrite the From header field (e.g. Vertrauen's mail.synchro.net, as suggested in https://wiki.synchro.net/howto:relay_smtp) . What you're suggesting seems like a reasonable work-around though.
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)