Skip to content
Snippets Groups Projects
Commit 41ed7a56 authored by rswindell's avatar rswindell
Browse files

Fix bug reported by Mark Lewis (Rampage@SESTAR), when packing NetMail messages

(from stored messages in .msg files into packets), the origin net/node within
the  *packed message* header would be set to the local system's address
net/node (for the destination zone), always. This is the appropriate action
when packing EchoMail, but not for NetMail.

Now, there are lot of other header fields in the packed message that contain
the source/origin address (e.g. @FMPT, @INTL kludges) and those would reflect
the original origin address still. And these fields take precedence over the
orign net/node fields of the packed message header. So I'm not sure this bug
would actually cause any problems anywhere, but it was a bug all the same.
parent edfa24c2
No related branches found
No related tags found
No related merge requests found
......@@ -3707,8 +3707,13 @@ void putfmsg(FILE* stream, const char* fbuf, fmsghdr_t* hdr, area_t area
/* Write fixed-length header fields */
memset(&pkdmsg,0,sizeof(pkdmsg));
pkdmsg.type = 2;
pkdmsg.orignet = addr.net;
pkdmsg.orignode = addr.node;
if(area.tag == NULL) { /* NetMail, so use original origin address */
pkdmsg.orignet = hdr->orignet;
pkdmsg.orignode = hdr->orignode;
} else {
pkdmsg.orignet = addr.net;
pkdmsg.orignode = addr.node;
}
pkdmsg.destnet = hdr->destnet;
pkdmsg.destnode = hdr->destnode;
pkdmsg.attr = hdr->attr;
......@@ -4676,14 +4681,12 @@ void export_echomail(const char* sub_code, const nodecfg_t* nodecfg, bool rescan
fmsghdr_t hdr;
struct tm *tm;
post_t *post;
area_t fakearea;
addrlist_t msg_seen,msg_path;
time_t tt;
time_t now = time(NULL);
memset(&msg_seen,0,sizeof(addrlist_t));
memset(&msg_path,0,sizeof(addrlist_t));
memset(&fakearea,0,sizeof(area_t));
memset(&hdr,0,sizeof(hdr));
printf("\nScanning for Outbound EchoMail...");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment