🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #26579

Re: INN/suck - can read/can't post

#26579
From: Fluffy
Date: Sun, 01 Mar 1998 00:00
131 lines
4416 bytes
Scott Norwood <snorwood@redballoon.net> wrote:
: Is there an alternative to the default nntpsend that doesn't require that
: the NNTP server accept "ihave" (maybe something that just uses "POST,"
: like a newsreader would), or am I just SOL?  Should I be using Cnews or
: Dnews instead of INN?  (Every site that I know about is running INN or
: Netscape news.)

I believe that suck has an nntpsend substitute that will post.  I know that
newsx (another suck-like program) does.

Though you probably won't need to use nntpsend/innxmit in your application,
here's a heinous little hack that will allow innxmit to post.  This is far
from perfect, but it seemed to be okay for the brief time I used it.  It'll
choke if your ISP rejects a user-supplied NNTP-Posting-Host instead of
accepting or quietly dropping it.  If so, yank that stuff out of
nnrpd/post.c if it's just a personal spool, and let your ISP do the
stamping.

An added command-line flag, R, means "use POST instead of IHAVE."  Why R?
All the good letters were taken.

~~~~~begin~~~~~
*** innxmit.c	Mon Dec  8 18:48:50 1997
--- innxmit.c	Wed Jan 14 15:34:37 1998
***************
*** 107,112 ****
--- 107,113 ----
  STATIC BOOL		Slavish;
  STATIC BOOL		STATprint;
  STATIC BOOL		Mime;
+ STATIC BOOL		UsePOST = FALSE;
  STATIC MIMEXFERTYPE	MimeArticle = MTnotmime;
  STATIC char		*BATCHname;
  STATIC char		*BATCHtemp;
***************
*** 835,840 ****
--- 836,845 ----
      case NNTP_TOOKIT_VAL:
  	STATaccepted++;
  	break;
+     case NNTP_POSTEDOK_VAL:
+ 	STATaccepted++;
+ 	break;
+     case NNTP_POSTFAIL_VAL:
      case NNTP_REJECTIT_VAL:
          if (logRejects)
              syslog(L_NOTICE, REJECTED, REMhost,
***************
*** 1132,1138 ****
  Usage()
  {
      (void)fprintf(stderr,
! 	"Usage: innxmit [-a] [-c] [-d] [-M] [-p] [-r] [-s] [-S] [-t#] [-T#] host file\n");
      exit(1);
  }
  
--- 1137,1143 ----
  Usage()
  {
      (void)fprintf(stderr,
! 	"Usage: innxmit [-a] [-c] [-d] [-M] [-p] [-r] [-s] [-S] [-t#] [-T#] [R] host file\n");
      exit(1);
  }
  
***************
*** 1168,1174 ****
      (void)umask(NEWSUMASK);
  
      /* Parse JCL. */
!     while ((i = getopt(ac, av, "lA:acdMprsSt:T:vP:")) != EOF)
  	switch (i) {
  	default:
  	    Usage();
--- 1173,1179 ----
      (void)umask(NEWSUMASK);
  
      /* Parse JCL. */
!     while ((i = getopt(ac, av, "lA:acdMprsSt:T:vP:R")) != EOF)
  	switch (i) {
  	default:
  	    Usage();
***************
*** 1218,1223 ****
--- 1223,1231 ----
  	case 'v':
  	    STATprint = TRUE;
  	    break;
+ 	case 'R':
+ 	    UsePOST = TRUE;
+ 	    break;
  	}
      ac -= optind;
      av += optind;
***************
*** 1593,1599 ****
  	    }
  	    continue; /* next article */
  	}
! 	(void)sprintf(buff, "%s %s", Slavish ? "xreplic" : "ihave", MessageID);
  	if (!REMwrite(buff, (int)strlen(buff), FALSE)) {
  	    (void)fprintf(stderr, "Can't offer article, %s\n",
  		    strerror(errno));
--- 1601,1611 ----
  	    }
  	    continue; /* next article */
  	}
! 	if (UsePOST) {
! 		(void)sprintf(buff, "post");
! 	} else {
! 		(void)sprintf(buff, "%s %s", Slavish ? "xreplic" : "ihave", MessageID);
! 	}
  	if (!REMwrite(buff, (int)strlen(buff), FALSE)) {
  	    (void)fprintf(stderr, "Can't offer article, %s\n",
  		    strerror(errno));
***************
*** 1640,1645 ****
--- 1652,1661 ----
  	    RequeueRestAndExit(Article, MessageID);
  	    /* NOTREACHED */
  	case NNTP_SENDIT_VAL:
+ 	    if (!REMsendarticle(Article, MessageID, qp))
+ 		RequeueRestAndExit(Article, MessageID);
+ 	    break;
+ 	case NNTP_START_POST_VAL:
  	    if (!REMsendarticle(Article, MessageID, qp))
  		RequeueRestAndExit(Article, MessageID);
  	    break;
~~~~~end~~~~~

Technical Details
Message-ID: <slrn6fhdlj.dmk.world!flufster@world.std.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <6da91h$3i82@wombat.wm.edu>

Show Full Headers
Complete Article Headers
Message-ID: <slrn6fhdlj.dmk.world!flufster@world.std.com>
Subject: Re: INN/suck - can read/can't post
Date: Sun, 01 Mar 1998 00:00:00 +0000
From: world!flufster@uunet.uu.net (Fluffy)
References: <6da91h$3i82@wombat.wm.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 329577569
Sender: flufster@world.std.com (Fluffy)
Organization: Ruler of All Usenet
Meow: Meow
Newsgroups: news.software.nntp