[news.software.b] Problems installing c-news with nntp

jq@brahms.udel.edu (John W Quillen Jr) (05/21/91)

I am sending this mail for a colleague.  Please respond directly to him
through email at:   vanderlist@fccc.edu

>I am having problems setting up c-news using nntp.
>
>I can create news-batches of locally created articles, but I can't send them
>to the my newsfeed site. I am using nntp as my transport but I don't know
>how to convince sendbatches to use nntp. I assume I have to put something in
>the last field of the batchparms file, but what? (none of the via??? seem to
>be correct as far as I can see -admittingly not far!-).
>
>Any pointers would be appreciated.

cudep@warwick.ac.uk (Ian Dickinson) (05/24/91)

In article <21549@brahms.udel.edu> jq@brahms.udel.edu (John W Quillen Jr) writes:
>I can create news-batches of locally created articles, but I can't send them
>to the my newsfeed site. I am using nntp as my transport but I don't know
>how to convince sendbatches to use nntp. I assume I have to put something in
>the last field of the batchparms file, but what? (none of the via??? seem to
>be correct as far as I can see -admittingly not far!-).

Here's how I got nntp transfer controlled by sendbatches.
(I've sent it via email as well as requested)

Beware that this probably isn't the best to run nntp (though it'll get you
started) - nntpsend or nntplink make more sense if you do more than one feed.

This is what you need in the batchparms file.

# NB. I use 'cat' instead of 'nocomp'
# site          size    queue   builder muncher sender
# ----          ----    -----   ------- ------- ------
cs              1750000 4       nntpbat cat     vianntp


You also need to make sure that queuelen reports a zero length queue for
sites fed by this method.

Here follow 3 scripts (nntpbat, vianntp and newsalias) which make it go.

----------cut-here-----------
#! /bin/sh
# nntpbat [-d dir] listfile
#
# Ian Dickinson <vato@cu.warwick.ac.uk>
#
# I'm not sure whether this is correct as I can't find any use of the batcher
# apart from within sendbatches.  This should handle things ok,
# but depends on being in the correct directory in the first place.
#
# Batchparms file should read:
#
# site          90000   12      nntpbat nocomp  vianntp

if [ "$#" = "1" ]
then
        FILE=$1
else
	cd $2
        FILE=$3
fi

cat $FILE
----------cut-here-----------
#! /bin/sh
# vianntp site
# Transmit batch to $1.
# $1 is aliased to find the real hostname as the network knows it.

# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/usr/local/lib/news/bin/config}
export NEWSCTL NEWSBIN NEWSARTS
PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH
umask $NEWSUMASK

cat > /tmp/vianntp$$

MACHINE=`newsalias $1`

$NEWSBIN/nntp/nntpxmit -s "$MACHINE":/tmp/vianntp$$

if [ -f /tmp/vianntp$$ ]
then
        echo NNTP failed to transmit batch.
        STATUS=1
else
        STATUS=0
fi

rm -f /tmp/vianntp$$
exit $STATUS
----------cut-here-----------
#! /bin/sh
# newsalias site
# echoes the name of the system as the DNS would know it - else $1
# this is just an example.

case "$1" in
        uunet)                  echo uunet.uu.net               ;;
        foo)                    echo foo.bar.baz.com            ;;
        *)                      echo $1                         ;;
esac
exit 0
----------cut-here-----------
-- 
\/ato                                                               /'\  /`\
Ian Dickinson                 TED KALDIS FOR PRESIDENT!            /^^^\/^^^\
vato@warwick.ac.uk                                                /TWIN/TEATS\
@c=GB@o=University of Warwick@ou=Computing Services@cn=Ian Dickinson  /       \

per@erix.ericsson.se (Per Hedeland) (05/26/91)

In article <?&W_Z4^@warwick.ac.uk> cudep@warwick.ac.uk (Ian Dickinson) writes:
>Here's how I got nntp transfer controlled by sendbatches.
>(I've sent it via email as well as requested)
>
>Beware that this probably isn't the best to run nntp (though it'll get you
>started) - nntpsend or nntplink make more sense if you do more than one feed.
[ solution deleted ]

Unless I'm missing something, this setup will throw away the entire
"batch" if the remote site can't be contacted (or its spool is full).
Not very nice, IMHO. Nntpsend a o do indeed make more sense - and if you
use nntpsend, be sure to use the C news version (by Jean-Francois Lamy)
that does C style locking, unlike the B'ish one in the nntp distribution.

--Per Hedeland
per@erix.ericsson.se  or
per%erix.ericsson.se@sunic.sunet.se  or
...uunet!erix.ericsson.se!per

cudep@warwick.ac.uk (Ian Dickinson) (05/28/91)

In article <1991May26.004716.2751@eua.ericsson.se> per@erix.ericsson.se (Per Hedeland) writes:
>Unless I'm missing something, this setup will throw away the entire
>"batch" if the remote site can't be contacted (or its spool is full).
>Not very nice, IMHO. Nntpsend a o do indeed make more sense - and if you
>use nntpsend, be sure to use the C news version (by Jean-Francois Lamy)
>that does C style locking, unlike the B'ish one in the nntp distribution.

It won't discard the batch.  This relies on nntpxmit unlinking the file
upon successful transmission.  If it didn't work, the file's still there.

I did my own hacking to nntpsend, where do I get Jean-Francois Lamy's version?

Cheers,
-- 
\/ato                                                               /'\  /`\
Ian Dickinson                 TED KALDIS FOR PRESIDENT!            /^^^\/^^^\
vato@warwick.ac.uk                                                /TWIN/TEATS\
@c=GB@o=University of Warwick@ou=Computing Services@cn=Ian Dickinson  /       \