[764] in linux-announce channel archive
suck.2.2 released
daemon@ATHENA.MIT.EDU (Lars Wirzenius)
Wed Jul 12 11:03:58 1995
Date: Sun, 9 Jul 1995 15:19:30 +0300
From: Lars Wirzenius <wirzeniu@cc.helsinki.fi>
To: linux-activists@niksula.hut.fi, linux-announce@vger.rutgers.edu
X-Mn-Key: announce
From: boby@pixi.com (Robert A. Yetman)
Newsgroups: comp.os.linux.announce
Subject: suck.2.2 released
Organization: The unconfigured xvnews people
Keywords: suck news NNTP
Approved: linux-announce@news.ornl.gov (Lars Wirzenius)
Followup-to: comp.os.linux.networking
This is to announce a new version of suck, as well as a new maintainer.
Effective 3 July, I am the maintainter, so please send any bugs etc, to
me (boby@pixi.com).
Version 2.2 is primarily a bug fix release, and has been uploaded to incoming
on both sunsite and tsx.
Here is the readme
**********************************************************************************
PREFACE
=======
Again i found a little tool that needed to be fixed. But i
totally rewrote it and now it works for me 100%.
Hopefully for you aswell.
No copyright this time. Just PD.
March 1995, goldt@math.tu-berlin.de
New Maintainer -
July 1995, boby@pixi.com
CHANGES
=======
Changes in 1.2: added a missing htons() thanks to
laurent@brasil.frmug.fr.net and added numeric ip address handling.
Changes in 1.3: fixed numeric ip handling.
Changes in 1.4: added restart ability thanks to inspiration
from David.H.West@um.cc.umich.edu.
Changes in 2.0: added inews-alike rpost thanks to inspiration
from ecarp@netcom.com.
Changes in 2.1: Radically increased buffer (+1 byte) thanks to
operator@melchior.frmug.fr.net and rpost now more RFC0977 conform.
Renamed rpost.sh to blow.
Added another local posting script by huber@iamexwi.unibe.ch for
inn.
Changes in 2.1.1:
Despite of the above proclamation i forgot to increase the buffer ;).
This is now fixed (hopefully). You see there is definately a need
for a new maintainer.
Changes in 2.2:
Sgetline now cares for maxlen which means lines > 1024 bytes will
be folded. Lpost got the option -v to print some debugging output.
The other changes are only cosmetical :).
3 July 1995 New maintainer boby@pixi.com
Minor changes so no warning msgs from gcc2.7.0.
suck.c - if low=high, never got message, fixed
suck.c - changed if lastread in sucknewsrc ==0 no get to == -1
INTRODUCTION
============
This package contains the following software for copying news from an
NNTP server to your local machine.
suck Pull a small newsfeed from an NNTP server, avoiding the
NEWNEWS command.
lpost Gives the news fetched by suck to the local server.
rpost Posts an article to an NNTP server (like inews).
SUCK
====
Suck grabs news from an NNTP server and sends the articles to
stdout. Suck accepts as argument the name of an NNTP server or
if you don't give an argument it will take the environment variable
NNTPSERVER. You can redirect the articles to a file or better
compress them on the fly like "suck server.domain | gzip -9 > output.gz".
Now it's up to you what you do with the articles. Maybe
you have the output already on your local machine because you
used a slip line or you still have to transfer the output with
e.g. zmodem.
Suck looks for a file sucknewsrc to see what articles you want
and which you already received.
The format of sucknewsrc is very simple. It consists of one line for
each newsgroup. The line contains two fields.
The first field is the name of the group. The next field is the
highest article number that was in the group when that group was last
sucked from. The fields are separated by a space.
In this package you find an example sucknewsrc file.
To add a new newsgroup, just stick it in sucknewsrc, with a highest article
number of 0. When suck finds a highest article number of -1, it does not
suck any news from that group.
When suck has done it's work it created the file suck.tmp which
contains the actual sucknewsrc with the updated article numbers.
So now you get the picture. To get automatically a newsfeed even
without support from the news administration you could write a little
shell script for the remote site that
a) copies suck.tmp to sucknewsrc.
b) sucks news and redirects the output to a file.
c) transfers the file to your local host if it isn't already there.
d) logs you out.
Suck uses a variety of temporary and working files during operation.
You shouldn't care for them because they will be recreated every
time you run suck. Suck does not itself clean up any of these temporary
files when it is done. If suck.restart remains in the working directory,
then suck will try to restart from where it has been interrupted.
Attention: Suck will not work with obsolete NNTP servers that can't handle
the xhdr command. inn-1.4sec has its own NNTP server that can handle xhdr,
cnews.CR-G has no own NNTP server so it depends on which NNTP server you
connect to cnews. To get debugging output in suck.debug you can
edit the Makefile and add -DDEBUG1 -DDEBUG2 to OPTS before you compile
suck again.
LPOST
=====
lpost (local post) reads stdin and pipes the articles to rnews.
You need rnews which is typically found in /usr/lib/news. If not,
you should create a symbolic link to rnews in that directory
(while you are at it, you could create a symbolic link for inews
aswell) like ln -s bin/input/rnews rnews.
A typical way to use lpost is "zcat output.gz | lpost".
This could take a while, so be patient. If you want to see how
lpost is working invoke it with the option -v.
If you haven't setup your news spool area yet then use
"/usr/local/lib/news/bin/maint/addgroup <newsgroupname> y" for each group
you want to read.
Be sure you have the directories in.coming and junk in your spool area which
could be /usr/spool/news. Each and every directory has to be owned
by news so cd to the spool area and execute "chown -R news.news ."
if you setup your spool area for the first time.
Now after running lpost your articles are in the incoming area.
To sort the articles there is in /usr/lib/news/bin/input the
program newsrun. It is a candidate for a crontab entry but you can
aswell start it by hand. Now you can read the sucked news with
your local newsreader without NNTP. I use tin and it works 100%.
The program doexpire will remove old news and could be added to
crontab aswell.
Attention: This description refered to CNEWS, but should work with
INN aswell, except for locations and filenames.
To add a group with INN you have to use "ctlinnd newgroup <newsgroupname> y".
With INN rnews will sort the articles if innd is running,
else the articles will be put in in.coming like with CNEWS and
will be sorted only after you started innd and called "rnews -U".
I suggest to use cnews.CR-G.tar.gz instead of inn-1.4sec if you don't
want to open a regular news site, because it is smaller and no daemon has
to run and tin will use the .overview files.
I will not explain more news administration, if you have problems
then don't ask me.
Don't forget you can't POST articles with your newsreader
(at least only locally) except you have an ip connection and use your
newsreader for posting via NNTP. On the other hand experienced
news administrators should be able to make CNEWS or INN create batchfiles
for your remote NNTP server.
Before i found out how to configure INN/CNEWS (well, theoretically, i
didn't test it yet - inn-post could give you a clue) i solved the problem
by writing rpost.
RPOST
=====
rpost (remote post) reads 1 article from stdin and sends it to your
NNTP server. The article must have a header of at least 2 lines, namely
Newsgroups: and Subject: and a body (the message). Header and body
have to be seperated by a newline. Look at the example article that
i included.
By default rpost will complete the header itself or if you know how
it has to look like or you want to create your own funny header
(hmm...netiquette ?) then you can comment -DMAKE_HEADER in the Makefile.
A useful extension to the required 2 line header is a Reply-To: line.
You can change the default values for the header in rpost.c.
So rpost is not as comfortable as lpost, therefore i included aswell
a little shell script to post more than 1 article - blow.
You should have your environment variable NNTPSERVER set or otherwise
edit the shell script to pass the name of your nntp server to rpost.
Finally this is how i would post articles with rpost:
blow <article1> <article2> <article3> ...
CONCLUSION
==========
The suck package is useful if you have a dialup connection to
a shell or slip account and want to reduce the expenses for your
phonebill/online time.
Rumors say that some dudes use suck for other reasons like archiving,
extra newsfeed or sending articles by mail.
With all these little tools together you almost have the
functionality of a newsreader, but without the advantage
of comfortability and the disadvantage of online time.
Hey, isn't it UNIX philosophy ? Keep it simple.
Ok, one last fortune cookie i always enjoy to read:
"Emacs is a nice operating system, but I prefer UNIX."
--
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember Keywords: and a short description of the software.