A console program for Newsgroup post [linux]

I spent a long time to find how to post on newsgroup with Linux in console mode only.
Here is the solution !

Download and compile newspost

Newspost is a program to post on the newsgroup. I’m on Debian but this package doesn’t exist anymore. However you can download the source and compile them… except there are few errors with the original sources (at least on my box). The issue is the source uses a function called « getfile », however this function name is already used in something else and it causes a conflict.
So I’ve renamed the function and it now works.

Download newspost-2.1.1.orig.tar.gz

Extract the files, then use make && make install

Install par2 and rar

On a Debian you’ll do apt-get install par2 rar

Let’s go

The first step is to split your file into small ones with rar extension :
rar a "name of rar file" -v20m -m0 "/home/example/your file"

Here are some explanations regarding this command :

  • name of rar file : This is the name of the rar-files you’re going to create (« .rar » will automatic be added)
  • -v20m : Split the file into 20MB chunks
  • -m0 : Set compression level (0-store…3-default…5-best)
  • « /home/example/your file » : The file you want to rar

Now we can create the .par files :
par2create -r10 -n7 "name of .par files" "/home/example/the .rar files*"

Some explanations :

  • -r15 : Percent par-files you want to create
  • -n7 : Number of par-files you want to create
  • /home/example/the .rar files* » : The just created .rar files

Now it’s time to upload your files :
newspost -i SERVER.NEWSGROUP.COM -u USERNAME -p PASSWORD -f EMAIL@EXAMPLE.COM -n ALT.BINARIES.YOUR.GROUP -y -s "SUBJECT" "/home/example/*par*"

So replace the uppercase words with your own values.

Thanks to this old post !

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

*