Commit c22e778c authored by rswindell's avatar rswindell
Browse files

Remove attributes CRASH, HOLD, and LOCAL from the headers of netmail messages

be unpacked into stored messages (.msg). Debug-level log message indicating
that one or more attributes were removed (and which ones, in hex).
This set of stripped attribute flags could easily be configurable, if that
turns out to be desirable.
parent 254f4521
......@@ -4319,6 +4319,11 @@ int pkt_to_msg(FILE* fidomsg, fmsghdr_t* hdr, const char* info, const char* inbo
SAFECOPY(fname, getfname(hdr->subj));
SAFEPRINTF2(hdr->subj, "%s%s", inbound, fname); /* Fix the file path in the subject */
const uint16_t remove_attrs = FIDO_CRASH | FIDO_LOCAL | FIDO_HOLD;
if(hdr->attr&remove_attrs) {
lprintf(LOG_DEBUG, "%s Removing attributes: %04hX", info, hdr->attr&remove_attrs);
hdr->attr &= ~remove_attrs;
(void)write(file,fmsgbuf,l+1); /* Write the '\0' terminator too */
Supports Markdown
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