Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 006fea09 authored by rswindell's avatar rswindell

Set the MSG_KILLFILE auxattr flag every time you set the MSG_FILEATTACH

auxattr flag since we normally want the attach file to be deleted automatically
when the message is delivered. SBBSecho now won't be deleting the file
attachment unless this flag (or the .msg \1FLAGS "KFS" equivalent flag) is set.
parent 73a97840
......@@ -273,7 +273,7 @@ bool sbbs_t::email(int usernumber, const char *top, const char *subj, long mode,
msg.hdr.version=smb_ver();
msg.hdr.attr=msgattr;
if(mode&WM_FILE)
msg.hdr.auxattr|=MSG_FILEATTACH;
msg.hdr.auxattr |= (MSG_FILEATTACH | MSG_KILLFILE);
msg.hdr.when_written.time=msg.hdr.when_imported.time=time32(NULL);
msg.hdr.when_written.zone=msg.hdr.when_imported.zone=sys_timezone(&cfg);
......
......@@ -233,7 +233,7 @@ bool sbbs_t::netmail(const char *into, const char *title, long mode, smb_t* resm
if(cfg.netmail_misc&NMAIL_CRASH) msg.hdr.netattr |= MSG_CRASH;
if(cfg.netmail_misc&NMAIL_HOLD) msg.hdr.netattr |= MSG_HOLD;
if(cfg.netmail_misc&NMAIL_KILL) msg.hdr.netattr |= MSG_KILLSENT;
if(mode&WM_FILE) msg.hdr.auxattr |= MSG_FILEATTACH;
if(mode&WM_FILE) msg.hdr.auxattr |= (MSG_FILEATTACH | MSG_KILLFILE);
if(remsg != NULL && resmb != NULL && !(mode&WM_QUOTE)) {
if(quotemsg(resmb, remsg, /* include tails: */true))
......
......@@ -251,7 +251,7 @@ bool sbbs_t::inetmail(const char *into, const char *subj, long mode, smb_t* resm
memset(&msg,0,sizeof(smbmsg_t));
msg.hdr.version=smb_ver();
if(mode&WM_FILE)
msg.hdr.auxattr|=MSG_FILEATTACH;
msg.hdr.auxattr |= (MSG_FILEATTACH | MSG_KILLFILE);
msg.hdr.when_written.time=msg.hdr.when_imported.time=time32(NULL);
msg.hdr.when_written.zone=msg.hdr.when_imported.zone=sys_timezone(&cfg);
......@@ -467,7 +467,7 @@ bool sbbs_t::qnetmail(const char *into, const char *subj, long mode, smb_t* resm
memset(&msg,0,sizeof(smbmsg_t));
msg.hdr.version=smb_ver();
if(mode&WM_FILE)
msg.hdr.auxattr|=MSG_FILEATTACH;
msg.hdr.auxattr |= (MSG_FILEATTACH | MSG_KILLFILE);
msg.hdr.when_written.time=msg.hdr.when_imported.time=time32(NULL);
msg.hdr.when_written.zone=msg.hdr.when_imported.zone=sys_timezone(&cfg);
......
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