diff --git a/ChangeLog b/ChangeLog index 7910c32b..661790ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/html/programs/mbnntp.html b/html/programs/mbnntp.html index 882d266c..0692b0a2 100644 --- a/html/programs/mbnntp.html +++ b/html/programs/mbnntp.html @@ -14,7 +14,7 @@
-
Last update 13-Apr-2004
+
Last update 11-May-2004

mbnntp - News server

Synopsis.

@@ -29,7 +29,7 @@ commandline, instead it should be run by inetd or xinetd. 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.

 

Installation.

@@ -44,7 +44,6 @@ nntp stream tcp nowait mbse /opt/mbse/bin/mbnntp mbnntp

Bugs.

-POST not yet implemented.
Maybe a lot, this is a new program.

diff --git a/mbnntp/commands.c b/mbnntp/commands.c index 777675aa..00713286 100644 --- a/mbnntp/commands.c +++ b/mbnntp/commands.c @@ -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("."); diff --git a/mbnntp/rfc2ftn.c b/mbnntp/rfc2ftn.c index cc6be0ce..098d8c55 100644 --- a/mbnntp/rfc2ftn.c +++ b/mbnntp/rfc2ftn.c @@ -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)) {