[net.news] inews {aka, HHHEEEEELLLLLLLPPPPPP!!!}

billw@wolf.UUCP (Bill Wisner) (09/04/86)

Help!

I am trying to write a shell script that will use inews to automatically
post a message to a local newsgroup (let's call it foo.test) once a month.
The shell script will run a program, and put the results into an article
using inews. There is one slight problem; inews chokes on the idea. Throwing
me memory faults. 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.

-?-
-- 
Bill Wisner						    <insert quote here>
..ihnp4!jack!wolf!billw

blm@cxsea.UUCP (Brian Matthews) (09/08/86)

In article <209@wolf.UUCP> billw@wolf.UUCP (Bill Wisner) writes:
|I am trying to write a shell script that will use inews to automatically
|post a message to a local newsgroup (let's call it foo.test) once a month.
|The shell script will run a program, and put the results into an article
|using inews. There is one slight problem; inews chokes on the idea. Throwing
|me memory faults. 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@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.

-- 

Brian L. Matthews
Computer X Inc. - a division of Motorola New Enterprises
..{utcsri!utzoo!mnetor, uw-beaver!ssc-vax}!cxsea!blm
+1 206 251 6811

clewis@spectrix.UUCP (Chris Lewis) (09/15/86)

In article <912@cxsea.UUCP> blm@cxsea.UUCP (Brian Matthews) writes:
>In article <209@wolf.UUCP> billw@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@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