From 3a4a06b3d9e10a49b0e88b25e9e473bcedde7e60 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Tue, 28 Apr 2020 01:24:21 +0000 Subject: [PATCH] When exporting netmail from SMB->.msg, always set the "SENT" net-attribute and clear the "IN-TRANSIT" net-attribute of the original message, even if we're flagging it for deletion (the delete attribute could always be toggled off). --- src/sbbs3/sbbsecho.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sbbs3/sbbsecho.c b/src/sbbs3/sbbsecho.c index eba038b116..d6407decfb 100644 --- a/src/sbbs3/sbbsecho.c +++ b/src/sbbs3/sbbsecho.c @@ -5305,6 +5305,8 @@ int export_netmail(void) create_netmail(msg.to, &msg, msg_subj, txt, *(fidoaddr_t*)msg.to_net.addr); FREE_AND_NULL(txt); + msg.hdr.netattr |= MSG_SENT; + msg.hdr.netattr &= ~MSG_INTRANSIT; if(cfg.delete_netmail || (msg.hdr.netattr&MSG_KILLSENT)) { /* Delete exported netmail */ msg.hdr.attr |= MSG_DELETE; @@ -5313,8 +5315,6 @@ int export_netmail(void) ,i, email->last_error, __LINE__, msg.hdr.number); (void)fseek(email->sid_fp, (msg.offset+1)*sizeof(msg.idx), SEEK_SET); } else { - /* Just mark as "sent" */ - msg.hdr.netattr |= MSG_SENT; if((i = smb_putmsghdr(email, &msg)) != SMB_SUCCESS) lprintf(LOG_ERR,"!ERROR %d (%s) line %d updating msg header for mail msg #%u" ,i, email->last_error, __LINE__, msg.hdr.number); -- GitLab