🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
4 messages
4 total messages Started by Amjad Alhait Thu, 04 Jun 1998 00:00
Really Tough Question
#41327
Author: Amjad Alhait
Date: Thu, 04 Jun 1998 00:00
33 lines
1684 bytes
I need a newsreader (on UNIX) like tin/pine/rn etc to do the following
I need to be able to post to a specific news group in batch mode?
Is that possible?

What I need is to execute the newsreader in script mode and type keys
and enter the newsgroup/subject/body and send all in batch mode?

For more explanation, I have a cgi script that launches sendmail and
compiles and sends the mail in script mode.
here's the code:
where mailer is sendmail

  open(MAIL, "|$mailer -t") || die "Can't open $mailer!\n";
  print MAIL "To: $aliasmail\n";
  print MAIL "From: $FORM{'email'}\n";
  print MAIL "Subject: $FORM{'subject'}\n\n";
  print MAIL "$FORM{'body'}\n";
  print MAIL "\n";
  close (MAIL);

Anyone knows of a way to do this with news? I need to post to a
newsgroup using the same way. is there a news reader/post prog that will
enable me to do this?
Much apreaciated.
Please email me directly.
Thanks
-- 
_______________________________________________________________
AJ Alhait                      	JavaSoft 
x53364				alhait@eng.sun.com

Re: Really Tough Question
#41331
Author: Fluffy
Date: Thu, 04 Jun 1998 00:00
17 lines
1243 bytes
Amjad Alhait <alhait@eng.sun.com> writes:

> I need a newsreader (on UNIX) like tin/pine/rn etc to do the following
> I need to be able to post to a specific news group in batch mode?
> Is that possible?

Yup, this is what inews is designed to do.  If you have rn installed
and working, chances are _really_ good that you've got inews there
too.  man inews for details, of course =) You've definitely got it if
the machine happens to be a news server.

If your Unix machine does not already have inews, you'll need to get
it from elsewhere.  The "official" remote (uses NNTP) version is at
<URL:ftp://ftp.academ.com/pub/nntp/client/>

Re: Really Tough Question
#41347
Author: Kaz Kylheku
Date: Fri, 05 Jun 1998 00:00
37 lines
2034 bytes
In article <3577403F.9D082817@eng.sun.com>,
Amjad Alhait  <alhait@eng.sun.com> wrote:
>  open(MAIL, "|$mailer -t") || die "Can't open $mailer!\n";
>  print MAIL "To: $aliasmail\n";
>  print MAIL "From: $FORM{'email'}\n";
>  print MAIL "Subject: $FORM{'subject'}\n\n";
>  print MAIL "$FORM{'body'}\n";
>  print MAIL "\n";
>  close (MAIL);
>
>Anyone knows of a way to do this with news? I need to post to a
>newsgroup using the same way. is there a news reader/post prog that will
>enable me to do this?

Yes, the program in called ``inews''. You give it the -h argument
and then pipe the article (header and body) to its standard input.

You can also give it a -D argument which will cause it to not post
to the NNTP server, but just print the article to standard output.

You should be prepared for inews to yield a failed exit status, which
means that something was wrong with the article.

Also, you don't have to supply a full header. Some things can be handled
on the inews command line; for example, a From: line can be specified with the
-f argument, for example:

	inews -h -f "alhait@eng.sun.com (Amjat Alhait)" < .article

where the .article contains no From: line.

You can pass configuration to inews via environment variables; for
example the NNTPSERVER environment variable tells it where to connect
to. The man page and source code are your friend.

Re: Really Tough Question
#41499
Author: Sylvain Robitaille
Date: Sat, 13 Jun 1998 00:00
34 lines
1877 bytes
On Thu, 04 Jun 1998 17:47:59 -0700, Amjad Alhait <alhait@eng.sun.com> wrote:

> What I need is to execute the newsreader in script mode and type keys
> and enter the newsgroup/subject/body and send all in batch mode?

Look into inews, which I believe is part of the trn package. I've also
seen it available separately, so I apologize to anyone involved if the
above is incorrect.

> For more explanation, I have a cgi script that launches sendmail and
> compiles and sends the mail in script mode. here's the code:
> where mailer is sendmail

Just like you're not using a user agent to send mail in that script, you
wouldn't use a user agent to send news. I'm quite sure inews will do the
trick for you.

> Please email me directly.

I'd have preferred if you had the courtesy to read the response in the
newsgroup, but I Cc:'d you anyway.

Hope that helps...

-- 
----------------------------------------------------------------------
Sylvain Robitaille                              syl@alcor.concordia.ca

Systems Manager                                   Concordia University
Instructional & Information Technology        Montreal, Quebec, Canada
----------------------------------------------------------------------

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads