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


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.


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 0, 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.


LPOST
=====

lpost (local post) reads stdin and pipes the articles to rnews.
You need rnews which is typically found in /usr/local/lib/news/bin/input.
If you have it somewhere else edit lpost.c and change the value
of RNEWS. A typical way to use lpost is "zcat output.gz | lpost".
Now if it takes all day to post the articles then edit rnews and
change the sleep values or edit spacefor. 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.
And be sure you have 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/local/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.

Don't forget you can't POST articles (at least only locally) except
you have a slip connection and use your newsreader for posting via NNTP.
You should be familar with your newsreader to prevent it from
again fetching the articles from a remote server. Finally you can
use rpost to post articles instead of using a newsreader.


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."

