Commit 796c3db7 authored by Rob Swindell's avatar Rob Swindell

A better check of a user's netmail-forwarding address.

is_supported_netmail_addr() actually takes the system configuration and QWK routing table into account. No sense forwarding to a non-deliverable address.
parent 2770ae7c
Pipeline #748 failed with stage
in 22 minutes and 50 seconds
...@@ -3322,9 +3322,8 @@ int fmsgtosmsg(char* fbuf, fmsghdr_t* hdr, uint usernumber, uint subnum) ...@@ -3322,9 +3322,8 @@ int fmsgtosmsg(char* fbuf, fmsghdr_t* hdr, uint usernumber, uint subnum)
lprintf(LOG_ERR, "Error %d reading user #%u", i, usernumber); lprintf(LOG_ERR, "Error %d reading user #%u", i, usernumber);
return SMB_FAILURE; return SMB_FAILURE;
} }
uint16_t nettype; if((scfg.sys_misc&SM_FWDTONET) && (user.misc&NETMAIL) && is_supported_netmail_addr(&scfg, user.netmail)) {
if((scfg.sys_misc&SM_FWDTONET) && (user.misc&NETMAIL) uint16_t nettype = NET_UNKNOWN;
&& (nettype = smb_netaddr_type(user.netmail)) >= NET_UNKNOWN) {
smb_hfield_netaddr(&msg, RECIPIENTNETADDR, user.netmail, &nettype); smb_hfield_netaddr(&msg, RECIPIENTNETADDR, user.netmail, &nettype);
smb_hfield_bin(&msg, RECIPIENTNETTYPE, nettype); smb_hfield_bin(&msg, RECIPIENTNETTYPE, nettype);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment