Finished mbnntpd

This commit is contained in:
Michiel Broek
2004-05-11 14:28:40 +00:00
parent 0119dbe0f2
commit 1198c0465b
4 changed files with 7 additions and 34 deletions

View File

@@ -192,7 +192,7 @@ void command_abhs(char *buf)
send_nntp("From: %s <%s>", Msg.From, Msg.FromAddress);
send_nntp("Newsgroups: %s", currentgroup);
send_nntp("Subject: %s", Msg.Subject);
send_nntp("Date: %s", rfcdate(Msg.Written));
send_nntp("Date: %s", rfcdate(Msg.Written + (gmt_offset((time_t)0) * 60)));
send_nntp("Message-ID: %s", make_msgid(Msg.Msgid));
if (strlen(Msg.Replyid))
send_nntp("References: %s", make_msgid(Msg.Replyid));
@@ -211,7 +211,6 @@ void command_abhs(char *buf)
} while ((p = (char *)MsgText_Next()) != NULL);
}
// send_nntp("X-JAM-Attributes:");
send_nntp("MIME-Version: 1.0");
send_nntp("Content-Type: text/plain; charset=iso-8859-1; format=fixed");
send_nntp("Content-Transfer-Encoding: 8bit");
@@ -590,7 +589,7 @@ void command_xover(char *cmd)
if (strlen(Msg.Replyid))
sprintf(reply, "%s", make_msgid(Msg.Replyid));
send_nntp("%lu\t%s\t%s <%s>\t%s\t%s\t%s\t%d\t%d", i, Msg.Subject, Msg.From, Msg.FromAddress,
rfcdate(Msg.Written), msgid, reply, bytecount, linecount);
rfcdate(Msg.Written + (gmt_offset((time_t)0) * 60)), msgid, reply, bytecount, linecount);
}
}
send_nntp(".");

View File

@@ -134,12 +134,6 @@ int rfc2ftn(FILE *fp)
temp = calloc(4097, sizeof(char));
Syslog('m', "Entering rfc2ftn");
rewind(fp);
Syslog('m', "========== RFC Start");
while ((fgets(temp, 4095, fp)) != NULL) {
Syslogp('m', printable(temp, 0));
}
Syslog('m', "========== RFC end");
rewind(fp);
msg = parsrfc(fp);
newsmode = hdr((char *)"Newsgroups", msg) ?TRUE:FALSE;
@@ -314,16 +308,7 @@ int rfc2ftn(FILE *fp)
return 1;
}
if (newsmode) {
fprintf(ofp, "AREA:%s\n", msgs.Tag);
} else {
if (fmsg->to->point != 0)
fprintf(ofp, "\001TOPT %d\n", fmsg->to->point);
if (fmsg->from->point != 0)
fprintf(ofp, "\001FMPT %d\n", fmsg->from->point);
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, "AREA:%s\n", msgs.Tag);
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);
@@ -450,16 +435,6 @@ int rfc2ftn(FILE *fp)
kludgewrite(tmp->val,ofp);
}
/*
* Add the Received: header from this system to the mesage.
*/
if (!newsmode) {
Now = time(NULL);
fprintf(ofp, "\1RFC-Received: by %s (mbfido) via RFC2FTN; %s\n", CFG.sysdomain, rfcdate(Now));
hdrsize += 72+strlen(CFG.sysdomain);
}
for (tmp = msg; tmp; tmp = tmp->next) {
if ((needputrfc(tmp, newsmode) == 1)) {
if (strcasestr((char *)"X-Origin-Newsgroups",tmp->key)) {