Code sync with mbfido

This commit is contained in:
Michiel Broek 2005-08-16 21:16:07 +00:00
parent cfb6619e54
commit a11174b362

View File

@ -232,8 +232,6 @@ int rfc2ftn(FILE *fp)
}
}
chkftnmsgid(hdr((char *)"Message-ID",msg)); // ??
removemime = FALSE;
removemsgid = FALSE;
@ -263,6 +261,7 @@ int rfc2ftn(FILE *fp)
q = strtok(p, " \n\0");
q = strtok(NULL, "; \n\0");
if (q) {
while (*q && isspace(*q))
q++;
Syslog('m', "charset part: %s", printable(q, 0));
@ -280,6 +279,7 @@ int rfc2ftn(FILE *fp)
Syslog('m', "Charset \"%s\"", printable(charset, 0));
}
}
}
if (charset == NULL) {
charset = xstrcpy((char *)"iso-8859-1");
@ -816,16 +816,11 @@ int needputrfc(rfcmsg *msg, int newsmode)
{
faddr *ta;
// Syslog('M', "needputrfc(%s)", printable(msg->key,0));
if ((msg->key == NULL) || (strlen(msg->key) == 0)) return 0;
if (!strcasecmp(msg->key,"X-UUCP-From")) return -1;
if (!strcasecmp(msg->key,"X-Body-Start")) return -1;
if (!strncasecmp(msg->key,".",1)) return 0;
if (!strncasecmp(msg->key,"X-FTN-",6)) return 0;
if (!strncasecmp(msg->key,"X-Fsc-",6)) return 0;
if (!strncasecmp(msg->key,"X-ZC-",5)) return 0;
if (!strcasecmp(msg->key,"X-Gateway")) return 0;
if (!strcasecmp(msg->key,"Path")) return 0;
if (!strcasecmp(msg->key,"Newsgroups")) {
if ((hdr((char *)"X-Origin-Newsgroups",msg)))
@ -855,7 +850,6 @@ int needputrfc(rfcmsg *msg, int newsmode)
if (!strcasecmp(msg->key,"Return-Path")) return 1;
if (!strcasecmp(msg->key,"Xref")) return 0;
if (!strcasecmp(msg->key,"Approved")) return 1;
if (!strcasecmp(msg->key,"X-URL")) return 0;
if (!strcasecmp(msg->key,"Return-Receipt-To")) return removereturnto? 0:1;
if (!strcasecmp(msg->key,"Notice-Requested-Upon-Delivery-To")) return 0;
if (!strcasecmp(msg->key,"Received")) return newsmode?0:2;
@ -894,15 +888,7 @@ int needputrfc(rfcmsg *msg, int newsmode)
if (!strcasecmp(msg->key,"Organization")) return 1;
if (!strcasecmp(msg->key,"Organisation")) return 1;
if (!strcasecmp(msg->key,"Comment-To")) return 0;
if (!strcasecmp(msg->key,"X-Comment-To")) return 0;
if (!strcasecmp(msg->key,"X-Apparently-To")) return 0;
if (!strcasecmp(msg->key,"X-Originating-IP")) return 0;
if (!strcasecmp(msg->key,"X-Virus-Scanned")) return 0;
if (!strcasecmp(msg->key,"X-AntiVirus")) return 0;
if (!strcasecmp(msg->key,"X-Delivery-Agent")) return 0;
if (!strcasecmp(msg->key,"X-Virtual-Domain")) return 0;
if (!strcasecmp(msg->key,"Apparently-To")) return 0;
if (!strcasecmp(msg->key,"X-Fidonet-Comment-To")) return 0;
if (!strcasecmp(msg->key,"Keywords")) return 2;
if (!strcasecmp(msg->key,"Summary")) return 2;
if (!strcasecmp(msg->key,"MIME-Version")) return removemime ?0:1;
@ -915,26 +901,16 @@ int needputrfc(rfcmsg *msg, int newsmode)
if (!strcasecmp(msg->key,"References")) return removeref ?0:1;
if (!strcasecmp(msg->key,"Supersedes")) return 1;
if (!strcasecmp(msg->key,"Distribution")) return ftnorigin ?0:0;
if (!strcasecmp(msg->key,"X-Newsreader")) return 0;
if (!strcasecmp(msg->key,"X-Mailer")) return 0;
if (!strcasecmp(msg->key,"User-Agent")) return 0;
if (!strncasecmp(msg->key,"NNTP-",5)) return 0;
if (!strncasecmp(msg->key,"X-Trace",7)) return 0;
if (!strncasecmp(msg->key,"X-Complaints",12)) return 0;
if (!strncasecmp(msg->key,"X-MSMail",9)) return 0;
if (!strncasecmp(msg->key,"X-MimeOLE",9)) return 0;
if (!strncasecmp(msg->key,"X-MIME-Autoconverted",20)) return 0;
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;
if (!strcasecmp(msg->key,"X-Face")) return 0;
if (!strcasecmp(msg->key,"X-Accept-Language")) return 0;
if (!strncasecmp(msg->key,"X-Spam-", 7)) return 0;
/*if (!strcasecmp(msg->key,"")) return ;*/
if (!strcasecmp(msg->key,"Cache-Post-Path")) return 0;
if (!strcasecmp(msg->key,"Injection-Info")) return 0;
if (!strcasecmp(msg->key,"Complaints-To")) return 0;
/* Default X- headers */
if (!strncasecmp(msg->key,"X-",2)) return 0;
return 1;
}