[news.software.nntp] C News vs nntpxmit in nntp 1.5.11

hull@ibma0.cs.uiuc.edu (David Hull) (03/18/91)

I recently installed the latest patches to nntp and found that the latest
version of nntpxmit expects the queue file to contain both the filename
and the message-id of the article to be sent.  This corresponds to the
'n' flag in C News's sys file, not 'F' as documented.  If the incorrect
file format is used, no error is emitted and the queue file is silently
thrown away.

While the savings in overhead of not opening the article if the remote
site already has it is nice, I don't think that stock B News can create
a queue file in the format necessary.  What would be really nice is a
nntpxmit which would read the article for the message-id only if it
wasn't in the queue file.

-David Hull

rickert@mp.cs.niu.edu (Neil Rickert) (03/19/91)

In article <27E4746A.43C3@ibma0.cs.uiuc.edu> hull@ibma0.cs.uiuc.edu (David Hull) writes:
>I recently installed the latest patches to nntp and found that the latest
>version of nntpxmit expects the queue file to contain both the filename
>and the message-id of the article to be sent.  This corresponds to the
>'n' flag in C News's sys file, not 'F' as documented.  If the incorrect
>file format is used, no error is emitted and the queue file is silently
>thrown away.

  This is very strange news indeed.  I am running nntpxmit from 1.5.11, and
am using the 'F' flag.  According to my syslog entries, our news is going out.
And the email I get disagreeing with the views in my postings seems to
confirm this.

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940

flee@cs.psu.edu (Felix Lee) (03/19/91)

Hi.  I'm the original author of the nntpxmit mods in nntp 1.5.11.
nntpxmit would like message-IDs in the queue file, but if it doesn't
find a message-ID, it will revert to opening the article to fetch the
message-ID.

The logic for this in nntpxmit.c is a little scattered; sendarticle()
calls getmsgid() if it's passed an empty message-ID.

If you accidentally have an 'f' format queue file rather than an 'n'
format queue file, then nntpxmit will believe the article sizes are
message-IDs, but this is mostly harmless since the receiving system
will say "435 Ok" when the bogus message-ID is offered.  Still,
nntpxmit could be made more robust.  It's a mess.
--
Felix Lee	flee@cs.psu.edu

edwin@cs.ruu.nl (Edwin Kremer) (03/19/91)

In <27E4746A.43C3@ibma0.cs.uiuc.edu> hull@ibma0.cs.uiuc.edu (David Hull) writes:

   | I recently installed the latest patches to nntp and found that the latest
   | version of nntpxmit expects the queue file to contain both the filename
   | and the message-id of the article to be sent.
This is definitely NOT true. I've been running Cnews (15-Dec-90) and
NNTP-1.5.11 for about a month now (after converting from B 2.11.19)
with the 'F' flag. No problem at all.
Yesterday, the manager of a downstream site discovered the 'n' flag and
informed me, so I'm using the 'n' now. (Thanks Henk!)

   | What would be really nice is a
   | nntpxmit which would read the article for the message-id only if it
   | wasn't in the queue file.
It does, although I agree that the code is somewhat sloppy...
Here are some code lines of "nntpxmit.c":

	while ((msgid = getline(Qfp, Article, sizeof(Article))) != NULL) {
		if (!sendarticle(host, Article, msgid)) {
			...
		}
	}

Well, 'getline()' return NULL in case of EOF and  a pointer to "\0" in
case of no Message-Id.
So, if the queue file contains no Message-Id, msgid will be assigned the
value "\0" i.e. *msgid == '\0' which is NOT EQUAL to ``(char *) 0''.

	sendarticle(host, file, msgid)
	{
		if (msgid == NULL || *msgid == '\0') {
			if ((msgid = getmsgid(file, &fp)) == NULL) {
			....
			}
		}
	}

You see that sendarticle() tries to get the Message-Id from the article
file itself in case msgid points to the string "\0". I agree that the
test 'msgid == NULL' is lousy: if msgid really is NULL, it would have
never reached this statement.

			hope this helps,
						--[ Edwin ]--
-- 
Edwin Kremer (SysAdm), Dept. of Computer Science, Utrecht University
Padualaan 14,   P.O. Box 80.089,  3508 TB  Utrecht,  The Netherlands
Telephone: +31-30-534104  | UUCP: ...!uunet!mcsun!hp4nl!ruuinf!edwin
Telefax  : +31-30-513791  | Email: edwin@cs.ruu.nl    [131.211.80.5]

kevin@kosman.UUCP (Kevin O'Gorman) (03/20/91)

flee@cs.psu.edu (Felix Lee) writes:
 }If you accidentally have an 'f' format queue file rather than an 'n'
 }format queue file, then nntpxmit will believe the article sizes are
 }message-IDs, but this is mostly harmless since the receiving system
 }will say "435 Ok" when the bogus message-ID is offered.  Still,

That's not what happened to me: I got a complaint about the syntax
of the message-id, and an aborted transfer.  I had to change the sys
file.

 }nntpxmit could be made more robust.  It's a mess.

Hear, hear!!!
-- 
Kevin O'Gorman ( kevin@kosman.UUCP, kevin%kosman.uucp@nrc.com )
voice: 805-984-8042 Vital Computer Systems, 5115 Beachcomber, Oxnard, CA  93035
Non-Disclaimer: my boss is me, and he stands behind everything I say.

rsalz@bbn.com (Rich Salz) (03/21/91)

It would be nice to have a printf-like string that says what to write, like
	F=msf
could mean "output to a file, writing the Message-ID, the size in bytes,
and the filename..."  Enough info seems to be there in inews or relaynews
that you could do this.

The hard part is that the "flags" fields of the sys file (in both B and C)
news is a set of letters, which it should be space or comma-separated.
	/r$
-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.

hull@ibma0.cs.uiuc.edu (David Hull) (03/21/91)

I wrote:

>If the incorrect
i.e., "F"
>file format is used, no error is emitted and the queue file is silently
>thrown away.

Yep, as everybody has pointed out, I was wrong.  There must have been
something wrong with the queue file I was using (I built it from the
history file and must have have messed up), and then I didn't look
closely enough at the code and misinterpreted what was going on.  Sorry
for the misinformation.

-David Hull

gary@proa.sv.dg.com (Gary Bridgewater) (03/22/91)

In article <3410@litchi.bbn.com> rsalz@bbn.com (Rich Salz) writes:
>It would be nice to have a printf-like string that says what to write, like
>	F=msf

Is it beyond the pale to suggest that the various software providers involved
have an e-mail gettogether and agree on what could and/or should be done to
let NNTP zip along and then put out coordinated releases with patches/updates
so that one unique flag "<something>" in the sys file means "put out the
exact right thing that NNTP wants"???

This patch (which could be rev independent) need only be installed by those
sites that want it.  It would be marked, in each case, as needing the "mumble"
patch to the other package(s) to work correctly.

???
-- 
Gary Bridgewater, Data General Corporation, Sunnyvale California
gary@sv.dg.com or {amdahl,aeras,amdcad}!dgcad!gary
C++ - it's the right thing to do.

brian@ucsd.Edu (Brian Kantor) (03/23/91)

NNTP was written to work on B-news systems.  C-news was written to work
with uucp transport.  That both work with either is amazing, but really
nice.

BTW, if you're running NNTP 1.5.11 and B news, you can get the article
id and filename in the batch file by using both the I and F flags in the
sys file entry - Rick and I put that in over a year ago.  If you have a
bunch of redundant NNTP feeds, that can really reduce the disk i/o load
on your feeding machine.
	- Brian