Article View: news.software.nntp
Article #59850Re: INN with Suck and RPost
From: Erik Hensema
Date: Mon, 05 Aug 2002 18:36
Date: Mon, 05 Aug 2002 18:36
86 lines
3377 bytes
3377 bytes
Steve (nospam@invalid.com) wrote:
> The final step of my implementation was to install RPost so as to push
> local posts back to my ISP's news server. At this point my progress came
> to a grinding halt. Much of the documentation and Usenet postings I have
> found for RPost seem to relate to older versions of INN prior to the use
> of "sm". From what I can gather, I need to develop my own scripts to
> make it work with newer versions. I was hoping that someone could point
> me at a source of info on RPost in relation to its use with newer
> versions of INN. Does such documentation even exist?
>
> I appreciate that I might be trying to run before I can walk by jumping
> right in to INN/Suck/RPost, without any prior Unix experience, but the
> learning curve is going well and I'm discovering the how's and why's as I
> go along. Any pointers would be very much appreciated.
Creating that script would be a good way to learn Unix ;-)
I'm using this snippet:
#v+
do_push() {
OUTGOING=$SPOOLDIR/outgoing/$1
if [ ! -s $OUTGOING.new ] ; then
mv $OUTGOING $OUTGOING.new
$CTLINND flush $1
fi
while read token rest; do
$SM $token | $SCRIPT | $RPOST $1 $2 -M
if [ $? -ne 0 ] ; then
echo $token >> $OUTGOING.new.fail
GOT_ERROR=yes
fi
done < $OUTGOING.new
rm $OUTGOING.new
if [ -f $OUTGOING.new.fail ]; then
now=`date +%s`
mv $OUTGOING.new.fail $OUTGOING.$now
chmod 0664 $OUTGOING.$now
fi
}
#v-
Example:
In newsfeeds:
news.provider.net/news.provider.net\
:*:Tf,Wn:
Call the function with:
do_push news.provider.net <other parameter to rpost>
The other parameter is usually @userpass, where userpass is a file which
contains -U <user> -P <pass> (only needed when news.provider.net requires
authentication)
$SCRIPT should point to a file containing:
#v+
#!/bin/sh
SEDCMD1="/^NNTP-Posting-Host/d"
SEDCMD2="/^Xref/d"
SEDCMD3="/^X-Trace/d"
SEDCMD4="/^X-Complaints-To/d"
SEDCMD5="/^NNTP-Posting-Date/d"
sed -e ${SEDCMD1} \
-e ${SEDCMD2} \
-e ${SEDCMD3} \
-e ${SEDCMD4} \
-e ${SEDCMD5}
#v-
That should about do it.
--
Erik Hensema (erik@hensema.net) ICQ# 8280101
Quoting-HOWTO: http://www.leerquoten.nl
Technical Details
Message-ID:
<slrnakthe2.q5m.spamtrap@dexter.hensema.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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!news.newsland.it!news.nl.linux.org!humbolt.nl.linux.org!news.hensema.net!cc78409-a.hnglo1.ov.nl.home.com!not-for-mailReferences:
<1028561239.13122.0.nnrp-13.c2deb797@news.demon.co.uk>Show Full Headers
Complete Article Headers
Message-ID: <slrnakthe2.q5m.spamtrap@dexter.hensema.net> Subject: Re: INN with Suck and RPost Date: Mon, 05 Aug 2002 18:36:51 +0000 From: Erik Hensema <spamtrap@use.reply-to> References: <1028561239.13122.0.nnrp-13.c2deb797@news.demon.co.uk> 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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!news.newsland.it!news.nl.linux.org!humbolt.nl.linux.org!news.hensema.net!cc78409-a.hnglo1.ov.nl.home.com!not-for-mail Newsgroups: news.software.nntp Organization: Hensema Lines: 85 Reply-To: erik@hensema.net NNTP-Posting-Host: dexter.ipv6.hensema.net X-Trace: dexter.hensema.net 1028572611 32424 3ffe:8280:10:a10::1 (5 Aug 2002 18:36:51 GMT) X-Complaints-To: news@hensema.net NNTP-Posting-Date: Mon, 5 Aug 2002 18:36:51 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux)