Added writing CHRS kludge
This commit is contained in:
parent
3e664a4f30
commit
a8a07b73a2
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Gate netmail->email or echomail->news
|
* Purpose ...............: Gate netmail->email or echomail->news
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2004
|
* Copyright (C) 1997-2005
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -512,22 +512,24 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl
|
|||||||
bestaka = bestaka_s(f);
|
bestaka = bestaka_s(f);
|
||||||
rewind(fp);
|
rewind(fp);
|
||||||
|
|
||||||
// p = hdr((char *)"CHRS", kmsg);
|
p = hdr((char *)"CHRS", kmsg);
|
||||||
// if (p == NULL)
|
if (p == NULL)
|
||||||
// p = hdr((char *)"CHARSET", kmsg);
|
p = hdr((char *)"CHARSET", kmsg);
|
||||||
// if (p == NULL)
|
if (p == NULL)
|
||||||
// p = hdr((char *)"CODEPAGE", kmsg);
|
p = hdr((char *)"CODEPAGE", kmsg);
|
||||||
// if (p)
|
if (p)
|
||||||
// outcode = readchrs(p);
|
// outcode = readchrs(p);
|
||||||
// else {
|
Syslog('m', "outcode from ftn kludge: %s", printable(p, 0));
|
||||||
// p=hdr((char *)"Content-Type",msg);
|
else {
|
||||||
// if (p == NULL)
|
p=hdr((char *)"Content-Type",msg);
|
||||||
// p=hdr((char *)"RFC-Content-Type",kmsg);
|
if (p == NULL)
|
||||||
// if (p == NULL)
|
p=hdr((char *)"RFC-Content-Type",kmsg);
|
||||||
// p=hdr((char *)"Content-Type",kmsg);
|
if (p == NULL)
|
||||||
// if (p)
|
p=hdr((char *)"Content-Type",kmsg);
|
||||||
|
if (p)
|
||||||
// outcode=readcharset(p);
|
// outcode=readcharset(p);
|
||||||
// else {
|
Syslog('m', "outcode from rfc header: %s", printable(p, 0));
|
||||||
|
else {
|
||||||
// q = rfcmsgid(hdr((char *)"MSGID",kmsg),bestaka);
|
// q = rfcmsgid(hdr((char *)"MSGID",kmsg),bestaka);
|
||||||
// if ((hdr((char *)"Message-ID",msg)) || (hdr((char *)"RFC-Message-ID",kmsg)) ||
|
// if ((hdr((char *)"Message-ID",msg)) || (hdr((char *)"RFC-Message-ID",kmsg)) ||
|
||||||
// (hdr((char *)"Message-ID",kmsg)) || (hdr((char *)"RFCID",kmsg)) ||
|
// (hdr((char *)"Message-ID",kmsg)) || (hdr((char *)"RFCID",kmsg)) ||
|
||||||
@ -538,8 +540,9 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl
|
|||||||
// if (q)
|
// if (q)
|
||||||
// free(q);
|
// free(q);
|
||||||
// q = NULL;
|
// q = NULL;
|
||||||
// }
|
Syslog('m', "outcode will use default");
|
||||||
// }
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A hack for TerMail
|
* A hack for TerMail
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#include "rfc2ftn.h"
|
#include "rfc2ftn.h"
|
||||||
|
|
||||||
|
|
||||||
#define MAXHDRSIZE 2048
|
#define MAXHDRSIZE 4096
|
||||||
#define MAXSEEN 70
|
#define MAXSEEN 70
|
||||||
#define MAXPATH 73
|
#define MAXPATH 73
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
|||||||
int needsplit, hdrsize, datasize, splitpart, forbidsplit, rfcheaders;
|
int needsplit, hdrsize, datasize, splitpart, forbidsplit, rfcheaders;
|
||||||
time_t Now;
|
time_t Now;
|
||||||
|
|
||||||
temp = calloc(4097, sizeof(char));
|
temp = calloc(MAXHDRSIZE +1, sizeof(char));
|
||||||
Syslog('m', "Entering rfc2ftn");
|
Syslog('m', "Entering rfc2ftn");
|
||||||
if (recipient)
|
if (recipient)
|
||||||
Syslog('m', "Recipient: %s", ascfnode(recipient, 0xff));
|
Syslog('m', "Recipient: %s", ascfnode(recipient, 0xff));
|
||||||
@ -773,7 +773,6 @@ int needputrfc(rfcmsg *msg, int newsmode)
|
|||||||
{
|
{
|
||||||
faddr *ta;
|
faddr *ta;
|
||||||
|
|
||||||
// Syslog('M', "needputrfc(%s)", printable(msg->key,0));
|
|
||||||
if ((msg->key == NULL) || (strlen(msg->key) == 0)) return 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-UUCP-From")) return -1;
|
||||||
@ -869,7 +868,6 @@ int needputrfc(rfcmsg *msg, int newsmode)
|
|||||||
if (!strcasecmp(msg->key,"Complaints-To")) return 0;
|
if (!strcasecmp(msg->key,"Complaints-To")) return 0;
|
||||||
/* Default X- headers */
|
/* Default X- headers */
|
||||||
if (!strncasecmp(msg->key,"X-",2)) return 0;
|
if (!strncasecmp(msg->key,"X-",2)) return 0;
|
||||||
/*if (!strcasecmp(msg->key,"")) return ;*/
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user