Finished mbnntpd
This commit is contained in:
parent
0119dbe0f2
commit
1198c0465b
@ -61,8 +61,8 @@ v0.51.4 11-Apr-2004
|
||||
used if configured with --enable-experiment.
|
||||
|
||||
mbnntp:
|
||||
New program, news server to read echomail with a news client.
|
||||
Reading news works, posts partial tested.
|
||||
New program, news server to read/write echomail with a news
|
||||
client. Users must be registered bbs users.
|
||||
|
||||
mbsebbs:
|
||||
Added logging of virus scanner results.
|
||||
|
@ -14,7 +14,7 @@
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<BLOCKQUOTE>
|
||||
<div align="right"><h5>Last update 13-Apr-2004</h5></div>
|
||||
<div align="right"><h5>Last update 11-May-2004</h5></div>
|
||||
<div align="center"><H1>mbnntp - News server</H1></div>
|
||||
|
||||
<H3>Synopsis.</H3>
|
||||
@ -29,7 +29,7 @@ commandline, instead it should be run by <b>inetd</b> or <b>xinetd</b>.
|
||||
the bbs echomail and news areas. To use the server, the user must login in the
|
||||
news server with his bbs unix name and password, thus the user must exist on the
|
||||
bbs. The access to the areas is the same as if the user would be logged into the
|
||||
bbs.
|
||||
bbs. Only echomail areas are available to the user as newsgroups.
|
||||
<P> <P>
|
||||
|
||||
<H3>Installation.</H3>
|
||||
@ -44,7 +44,6 @@ nntp stream tcp nowait mbse /opt/mbse/bin/mbnntp mbnntp
|
||||
|
||||
<H3>Bugs.</H3>
|
||||
<P>
|
||||
POST not yet implemented.<br>
|
||||
Maybe a lot, this is a new program.
|
||||
<P>
|
||||
|
||||
|
@ -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(".");
|
||||
|
@ -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, "\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)) {
|
||||
|
Reference in New Issue
Block a user