...
 
Commits (1)
  • Rob Swindell's avatar
    Fix netmail forwarding (new feature) · cbda86ec
    Rob Swindell authored
    The recipient net-addr/type was always being over-ridden a bit further down in the code. Don't do that.
    
    Also, log a message (sbbsecho.log) indicating that a message was forwarded ("Forwarding message ...").
    
    For geneb.
    cbda86ec
......@@ -3325,6 +3325,7 @@ int fmsgtosmsg(char* fbuf, fmsghdr_t* hdr, uint usernumber, uint subnum)
uint16_t nettype;
if((scfg.sys_misc&SM_FWDTONET) && (user.misc&NETMAIL)
&& (nettype = smb_netaddr_type(user.netmail)) >= NET_UNKNOWN) {
lprintf(LOG_INFO, "Forwarding message from %s to %s", hdr->from, user.netmail);
smb_hfield_netaddr(&msg, RECIPIENTNETADDR, user.netmail, &nettype);
smb_hfield_bin(&msg, RECIPIENTNETTYPE, nettype);
} else {
......@@ -3596,7 +3597,7 @@ int fmsgtosmsg(char* fbuf, fmsghdr_t* hdr, uint usernumber, uint subnum)
if(subnum==INVALID_SUB) {
smbfile=email;
if(net) {
if(net && msg.to_net.type == NET_NONE) {
smb_hfield(&msg,RECIPIENTNETTYPE,sizeof(ushort),&net);
smb_hfield(&msg,RECIPIENTNETADDR,sizeof(fidoaddr_t),&destaddr);
}
......