inews {aka, HHHEEEEELLLLLLLPPPPPP!!!}

Chris Lewis clewis at spectrix.UUCP
Tue Sep 16 06:19:32 AEST 1986


In article <912 at cxsea.UUCP> blm at cxsea.UUCP (Brian Matthews) writes:
>In article <209 at wolf.UUCP> billw at wolf.UUCP (Bill Wisner) writes:
>|I am trying to write a shell script that will use inews to automatically
>|post a message ...
>|... I have been trying..
>|
>|inews -t 'This is the Subject' -n 'foo.test' -e 'Sun Jan 11 13:13:13 PDT 1986' -d 'local' -o 'Generic Witticism'
>|
>|and piping the standard input from the program who's results I want to post.
>
>I have a number of articles I post automatically at various times. The
>article I post has the complete header, so I just do an inews -h <file,
>where file is something like:
>
>Newsgroups: foo.test
>Subject: This is the Subject
>Reply-To: me at here (Here's default system administrator)
>Distribution: local
>Organization: My organization
>
>Article...
>
>
>This works nicely, and keeps all of the article information in one place if
>I want to modify the article or the header in some way. By the way, I'm
>running news 2.10.2.

Hi Brian.

With 2.10.2 at mnetor (given 4.2 mail aliases) you used to be able to simply 
send mail to a userid (aliased to "|recnews" I think) with the following
headers:

	Subject: ...
	Newsgroups: ...

At the beginning of the file.  If you omitted Subject, the article got 
dropped.  If you omitted Newsgroups: you got "general".  Since mnetor
upgraded to 2.10.3, however, this is busted.

Since I moved from mnetor, I had a different need for this, and after
some experimentation and checking the source, I came up with the
following shell file:

userid=<userid>
date=`date`
sequence=<some unique number>
title=<whatever>
ng=<comma-separated-list-of-newsgroups>

cat > /tmp/AB$$ <<
From: $userid
Date: $date
Message-ID: $sequence
Subject: $title
Newsgroups: $ng

!
cat /tmp/AB$$ <file containing text of message> | rnews (note: *not* inews).

All 5 of the keywords seem to be required (though, the source seems to
indicate that "Path:" will be accepted in place of "From:").
I never had any luck with "inews -t ... ..." - some of the log messages
were so mangled as to lead me to believe that core-dumping was distinctly
possible.
-- 
Chris Lewis
UUCP: {utzoo|utcs|yetti|genat|seismo}!mnetor!spectrix!clewis
Phone: (416)-474-1955



More information about the Comp.unix mailing list