🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #49571

Re: using suck with inn

#49571
From: Thierry Thomas
Date: Thu, 28 Dec 2000 15:42
90 lines
3687 bytes
On Thu, 28 Dec 2000 13:44:41 +0100, steffie
 <steffie@indoleeroord.penguinpowered.com> wrote:
>
>Yes, i am using the CNFS storage method, and i did read someting about sm.
>but i don't know yet how  to use it, so if you want to send me the scripts?
>yes please :)

It's not very long, so I post it here:
(I have added some commentaries in english between ())

#v+
#!/usr/local/bin/bash
# Adapate de suck+inn-6.html d'Eric Jacoboni
# (from a script written by E. Jacoboni)
SERVEUR_DISTANT=news.dial.oleane.com
# (replace with the news server of your ISP)
OUT_GOING=oleane #my outgoing batch
PATH_SUCK=/usr/local/suck/lib
PATH_INN=/usr/local/news/bin
PATH_SPOOL=/usr/local/news/spool
NOM_BATCH=$PATH_SPOOL/outgoing/$OUT_GOING
NOM_FILTRE=$PATH_SUCK/vire_entete.sh

# On commence par poster les articles (localhost->SERVEUR_DISTANT)
# (we send the articles)
echo Envoi des articles...
if test -s $NOM_BATCH
then
 rpost $SERVEUR_DISTANT -b $NOM_BATCH \
       -f $NOM_FILTRE \$\$o=/tmp/filtres \$\$i /tmp/filtres && \
       cat /dev/null > $NOM_BATCH || \
       echo "probleme de postage" | mail -s "probleme avec rpost" news
# 	(problem with rpost)
else
 echo "pas d'articles a poster..."
# (nothing to send)
fi

# puis on recupere les articles (SERVEUR_DISTANT->localhost)
# (we fetch from the ISP)

echo Recuperation des articles...
cd $PATH_SUCK
if test -f nouveau
then
  mv -f nouveau nouveau.old
fi

# recuperation de tous les forums de l'active,
# sauf /usr/local/suck/lib/active-ignore
# (fetching every forums defined in active,
#  excepted active-ignore)

suck $SERVEUR_DISTANT -c -n -A -hl localhost -br nouveau -HF /usr/local/news/db/history -LS
$PATH_INN/rnews nouveau
#v- 

And here is the filter vire_entete.sh, to strip your headers:

#v+
#!/bin/sh
# Enleve les en-tetes locales refusees par l'inn du FAI.
# Convient aux innd avec le format de stockage CNFS, 
# et utilise donc sm pour retrouver l'article.

TMPFILE=/tmp/tmp$$
SEDCMD="/^NNTP-Posting-Host/d"
SEDCMD2="/^Xref/d"
SEDCMD3="/^X-Complaints-To/d"
SEDCMD4="/^X-Trace/d"
SEDCMD5="/^NNTP-Posting-Date/d"

OUTFILE=$2

/usr/local/news/bin/sm $1 > $TMPFILE

if [ -f ${TMPFILE} ]; then

	sed -e ${SEDCMD} ${TMPFILE} | sed -e ${SEDCMD2} | sed -e ${SEDCMD3} | sed -e ${SEDCMD4} | sed -e ${SEDCMD5} > ${OUTFILE}
		
	if [ $? -ne 0 ]; then
		echo "Erreur dans vire_entete.sh"
		exit -1
	fi
fi
#v- 
-- 
Th. Thomas,                           ICQ�: 8823153
Il y a s�rement des pays qui valent le coup. [MS]
Technical Details
Message-ID: <slrn94mnrj.2r5.tthomas@graf.pompo.net>
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!supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.stanford.edu!news.tele.dk!195.25.12.36!oleane.net!oleane!nnrp.oleane.net!graf.pompo.net!tthomas
References: <3a422db1$0$1420@reader3> <slrn9451m5.10p2.tthomas@graf.pompo.net> <3a4b3591$0$10602@reader4>

Show Full Headers
Complete Article Headers
Message-ID: <slrn94mnrj.2r5.tthomas@graf.pompo.net>
Subject: Re: using suck with inn
Date: Thu, 28 Dec 2000 15:42:43 +0000
From: tthomas@mail.dotcom.fr (Thierry Thomas)
References: <3a422db1$0$1420@reader3> <slrn9451m5.10p2.tthomas@graf.pompo.net> <3a4b3591$0$10602@reader4>
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!supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.stanford.edu!news.tele.dk!195.25.12.36!oleane.net!oleane!nnrp.oleane.net!graf.pompo.net!tthomas
Newsgroups: news.software.nntp
Organization: Kabbale Eros
Lines: 89
Reply-To: thierry@thomas.as
NNTP-Posting-Host: dyn-1-2-001.lyn.dialup.oleane.fr
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: s1.read.news.oleane.net 978018294 9759 194.2.27.1 (28 Dec 2000 15:44:54 GMT)
X-Complaints-To: abuse@oleane.net
NNTP-Posting-Date: Thu, 28 Dec 2000 15:44:54 +0000 (UTC)
User-Agent: slrn/0.9.6.3 (FreeBSD)