From 2d3b56ace7f3a96a90bb0c97d7d8ecbd2bc8ed1c Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Thu, 11 Apr 2002 19:37:32 +0000 Subject: [PATCH] Fixed mbnews for empty headerlines --- ChangeLog | 4 ++++ lib/rfcmsg.c | 8 ++++++++ mbfido/rfc2ftn.c | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 60c16d3e..31f7b203 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4705,6 +4705,10 @@ v0.33.20 10-Feb-2002 The tic file forward netmails now uses template forward.tic When started a second time it doesn't destroy the lockfile anymore. + When a converted email to news listserver message is processed + that has a header line starting with X-MS-, the headerline is + supressed because there is no key for this header. This looks + like a new kind of M$ standard. mbnews crashed on this one. mbfile: The mbfile index command now creates the html pages using the diff --git a/lib/rfcmsg.c b/lib/rfcmsg.c index 055d582e..1dca8ad0 100644 --- a/lib/rfcmsg.c +++ b/lib/rfcmsg.c @@ -112,6 +112,14 @@ rfcmsg *parsrfc(FILE *fp) // Syslog('M', "This is a regular header"); cur->key = xstrcpy(buffer); cur->val = xstrcpy(p+1); + } else if ((p=strchr(buffer,':')) && (!strncasecmp(buffer, (char *)"X-MS-", 5))) { + /* + * It looks like M$ invented their own internet standard, these + * are header lines without a key. This one will be stored here + * and junked in the rfc2ftn function. + */ + cur->key = xstrcpy(buffer); + cur->val = xstrcpy((char *)" "); } else { Syslog('M', "Non-header line: \"%s\"",buffer); cur->key = xstrcpy((char *)"X-Body-Start"); diff --git a/mbfido/rfc2ftn.c b/mbfido/rfc2ftn.c index 858b7daf..8a9d5f89 100644 --- a/mbfido/rfc2ftn.c +++ b/mbfido/rfc2ftn.c @@ -445,7 +445,6 @@ int rfc2ftn(FILE *fp, faddr *recipient) fprintf(ofp, "\001INTL %d:%d/%d %d:%d/%d\n", fmsg->to->zone, fmsg->to->net, fmsg->to->node, fmsg->from->zone, fmsg->from->net, fmsg->from->node); } - fprintf(ofp, "\001MSGID: %s %08lx\n", MBSE_SS(fmsg->msgid_a),fmsg->msgid_n); if (fmsg->reply_s) fprintf(ofp, "\1REPLY: %s\n", fmsg->reply_s); @@ -956,6 +955,7 @@ int needputrfc(rfcmsg *msg) if (!strcasecmp(msg->key,"X-Origin-Date")) return 0; if (!strncasecmp(msg->key,"X-PGP-",6)) return 0; if (!strncasecmp(msg->key,"Resent-",7)) return 0; + if (!strncasecmp(msg->key,"X-MS-",5)) return -1; if (!strcasecmp(msg->key,"X-Mailing-List")) return 0; if (!strcasecmp(msg->key,"X-Loop")) return 0; if (!strcasecmp(msg->key,"Precedence")) return 0;