[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: inn / suck - help me!

On Mon, 4 Nov 1996, Paul Haggart wrote:

>   Argh, this has caused me problems to no end!  Can someone please send me a
> working configuration for suck and inn?  
>   I can get suck to gather news and send it locally, but I can't figure out
> how to get locally written messages sent to my ISP's news server.  I don't
> want to use nntp-style reading, because I don't have a 24/7 connection.
>   Thanks in advance.

I use suck with CNews locally and INN on the remote system which feeds me.
CNews creates a /var/spool/news/out.going/sentex/togo file which contains
references to the articles that are to be sent out to my ISP (sentex).
If you use INN locally, I think that things should work similarly as far
as getting locally posted messages to your ISP's news server. (At least
the relevant portions of the get-news.cnews and get-news.inn looked
very similar).

(I used dpkg -i suck_2.6.3-1.deb)

Here's the files I've had to configure:

1)  I set up a /etc/suck/get-news.conf file with the following entries:

server: xwing.xwing.org
remoteserver: news.sentex.net
outgoingfile: sentex

2)  I set up the required /etc/suck/sucknewsrc file.  Here's its
    (partial) contents:

alt.comp.hardware 2096
alt.comp.hardware.homebuilt 24343
alt.comp.hardware.homedesigned 702
alt.comp.hardware.pc-homebuilt 8334
alt.fishing 40064
alt.folklore.computers 156001

3)  I had to customize some paths in the /usr/sbin/get-news.cnews
    file.  Note that I've added a number of echo statements in order
    to verify that all the paths that get-news needed were correct.
    They weren't on first try.  Here's the contents of this file:

# NOTE: this script probably needs to be run by root.
# Most systems will not let a normal user run rnews

LOCAL_HOST=`cat /etc/suck/get-news.conf | grep "^server:" \
	| awk '{gsub(" ","");print}' | cut -c8-`
REMOTE_HOST=`cat /etc/suck/get-news.conf | grep "^remoteserver:" \
	| awk '{gsub(" ","");print}' | cut -c14-`
SITE=`cat /etc/suck/get-news.conf | grep "^outgoingfile:" \
	| awk '{gsub(" ","");print}' | cut -c14-`

echo "SITE is ${SITE}"

SPOOLDIR=/var/spool/news		# base directory for articles to be rposted
NEWSDIR=/usr/lib/news			# base directory for news binaries 
BINDIR=/usr/bin				# base directory for suck rpost and scripts
SBINDIR=/usr/sbin			# base directory for scripts (Added this Nov. 3/96)

TMPDIR=/tmp				# location for suck.* files
DATADIR=/etc/suck			# location of sucknewsrc and killfile
MSGDIR=/var/lib/suck			# where to put MultiFile articles when getting them

BATCHFILE=${TMPDIR}/batch.$$		# Name of batchfile to build for rnews or innxmit
OUTGOING=${SPOOLDIR}/out.going/${SITE}/togo	# location of the list of articles to upload


SCRIPT=${SBINDIR}/put-news		# my filter for rpost
OUTFILE=${TMPDIR}/suck-tmp.$$		# used by rpost as article after it is filtered

echo "OUTFILE is ${OUTFILE}"
echo "SCRIPT is ${SCRIPT}, used as filter for rpost"
echo "filter output file is \$\$o=${OUTFILE}"

RPOST=${BINDIR}/rpost			# my rpost
SUCK=${BINDIR}/suck			# my suck
TESTHOST=${BINDIR}/testhost		# my testhost

RNEWS=/usr/lib/news/input/rnews 	# location of rnews

# is the local host up and running so we can post articles we download?
${TESTHOST} ${LOCAL_HOST} > /dev/null 2>&1

# is the remote host up and running so we can download articles?
${TESTHOST} ${REMOTE_HOST} > /dev/null 2>&1

if [ ${REMOTE_RESULT} -eq 0 -a ${LOCAL_RESULT} -eq 0 ]; then

	# download articles
	#if using rnews change the -bi to -br

	if [ ${SUCK_STATUS} -eq 0 ]; then
		echo "Downloaded Articles"
		mv ${DATADIR}/sucknewsrc ${DATADIR}/old.newsrc
		mv ${TMPDIR}/suck.newrc ${DATADIR}/sucknewsrc
		rm ${TMPDIR}/suck.*
		if [ -f ${DATADIR}/suckothermsgs ]; then
			rm ${DATADIR}/suckothermsgs

	# now upload articles
	if [ -s ${OUTGOING} ]; then
		# outgoing articles to post
		${RPOST} ${REMOTE_HOST} -b ${OUTGOING} -p ${SPOOLDIR} -f \$\$o=${OUTFILE} ${SCRIPT} \$\$i ${OUTFILE}

		if [ $? -ne 0 ]; then
			echo "Error remote posting"
			exit -1;
			echo "Remotely posted articles"
	echo "You can hang up the modem now"

	if [ ${SUCK_STATUS} -eq 0 ]; then	
		# locally post articles
		if [ $? -eq 0 ]; then
			echo "Posted Articles Locally"
			rm -rf ${MSGDIR}
			rm ${BATCHFILE}

4)   I also had to change the filter program /usr/sbin/put-news to filter
     out the Xref header line instead of the NNTP-Posting-Host line
     because the remote INN program complained about not being able to
     set the Xref header.

     Here' the contents of it:

# this is just a simple script to run the one line sed
# command to strip off the NNTP Posting Header that
# my ISP's newsfeed doesn't like.
# this could be written as a one liner
# sed -e CMD $1 > $2

#set -x

if [ $# -ne 2 ]; then
	echo "Usage `basename $0` infile outfile <RETURN>"
	exit -1


if [ -f ${INFILE} ]; then

	sed -e ${SEDCMD} ${INFILE} > ${OUTFILE}
	if [ $? -ne 0 ]; then
		echo "Error"
		exit -1

	echo "$1 does not exist"
	exit -1
Well, that's about it.  Your situation may be different, but if you
instrument your get-news script as I did and pay careful attention to any
error messages, you should be able to get things working. 

Hope this helps a bit.

Best regards,


Nick Busigin                                                nick@xwing.org

To obtain my pgp public key, email me with the subject: "get pgp-key"

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com

Reply to: