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)