🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
6 messages
6 total messages Started by Rhino Wed, 05 Sep 2001 16:50
Writing a Posting Program
#54120
Author: Rhino
Date: Wed, 05 Sep 2001 16:50
41 lines
2947 bytes
I think I need to write a simple posting program and need some information
on how to do it. I'm an experienced programmer in several languages so I
don't need to know how to program, just how to compose and post usenet
messages.

I'm running Win95 and I would like to post a short message to two particular
newsgroups every month or so. I am the president of a small club and would
like to notify people at these two newsgroups about our meetings. I am using
Outlook Express 5.5 as my main e-mail/newsgroup program but I haven't found
any features that would let me "autopost" my message so I think I need to
write my own program to do the job.

I've skimmed RFC977 and RFC1036 and have a basic idea of the structure of
the program I need to write. However, I am completely baffled on how to
establish the environment in which I can submit the NNTP commands to
establish a connection, POST, and QUIT. Also, I don't know how to establish
the connection to the desired news server.

What program do I need to start in order to establish the environment in
which the connect, POST, and QUIT commands will be recognized? I tried
entering NNTP and USENET on my MS-DOS command line but that didn't work :-)
Is it possible/desireable for me to use Outlook Express to send the message?

Once I've established the environment so that the connect, POST, and QUIT
commands will be accepted, how do I establish the connection to port 119?

How do I send the actual article to the newsgroups? RFC937 just says that I
need to send it using the RFC850 format, which I know has been replaced by
RFC1036.

If anyone can tell me the answers to these questions, point me to the
relevant documentation, or supply me with examples, I'd be very grateful.

Rhino
---
rhino1 AT sympatico DOT ca
---
Diplomacy is the art of saying, "Nice doggie!" until you can find a rock.


Re: Writing a Posting Program
#54121
Author: Terrance Richard Boyes
Date: Wed, 05 Sep 2001 18:10
59 lines
3639 bytes
Rhino <rhino1@sympatico.ca> wrote:
> I think I need to write a simple posting program and need some information
> on how to do it. I'm an experienced programmer in several languages so I
> don't need to know how to program, just how to compose and post usenet
> messages.

> I'm running Win95 and I would like to post a short message to two particular
> newsgroups every month or so. I am the president of a small club and would
> like to notify people at these two newsgroups about our meetings. I am using
> Outlook Express 5.5 as my main e-mail/newsgroup program but I haven't found
> any features that would let me "autopost" my message so I think I need to
> write my own program to do the job.

Haven't tried news, but it's only a handful of lines of VB to
send an email automatically. And there's example code for those...
Then use whatever scheduler you want to deal with the when.
Remember to either change the Message-ID and Date (and any
other relevant headers) or leave them out from the template
entirely.

> I've skimmed RFC977 and RFC1036 and have a basic idea of the structure of
> the program I need to write. However, I am completely baffled on how to
> establish the environment in which I can submit the NNTP commands to
> establish a connection, POST, and QUIT. Also, I don't know how to establish
> the connection to the desired news server.

Open a socket to the NNTP port of the news server.

If necessary authenticate, AUTHINFO, and go to MODE READER.

POST
check reply
stream the headers and article
..
check reply
QUIT
check reply

> What program do I need to start in order to establish the environment in
> which the connect, POST, and QUIT commands will be recognized? I tried
> entering NNTP and USENET on my MS-DOS command line but that didn't work :-)

For practice purposes you can use telnet server 119.

> Is it possible/desireable for me to use Outlook Express to send the message?

Almost certainly possible (definitely if you have access to a
mail2news gateway), desireable, well not really, it's horrible.

As for what to use, depends what you've got available. But
certainly all of VB, C/C++, Rexx and Perl come with everything
you need and in a pretty easy to use manner. Also a fair
amount of news software is open source, read it.

-- 
<URL:http://www.pierrot.co.uk/>                                  Team AMIGA
I'd love to go out with you, but the man on television told me to say tuned."

Re: Writing a Posting Program
#54126
Author: Andrew Starr
Date: Thu, 06 Sep 2001 00:03
46 lines
3334 bytes
[[ This message was both posted and mailed: see
   the "To," "Cc," and "Newsgroups" headers for details. ]]

In article <hJsl7.25009$v%4.2629859@news20.bellglobal.com>, Rhino
<rhino1@sympatico.ca> wrote:

> I think I need to write a simple posting program and need some information
> on how to do it. I'm an experienced programmer in several languages so I
> don't need to know how to program, just how to compose and post usenet
> messages.
> 
> I'm running Win95 and I would like to post a short message to two particular
> newsgroups every month or so. I am the president of a small club and would
> like to notify people at these two newsgroups about our meetings. I am using
> Outlook Express 5.5 as my main e-mail/newsgroup program but I haven't found
> any features that would let me "autopost" my message so I think I need to
> write my own program to do the job.
> 
> I've skimmed RFC977 and RFC1036 and have a basic idea of the structure of
> the program I need to write. However, I am completely baffled on how to
> establish the environment in which I can submit the NNTP commands to
> establish a connection, POST, and QUIT. Also, I don't know how to establish
> the connection to the desired news server.
> 
> What program do I need to start in order to establish the environment in
> which the connect, POST, and QUIT commands will be recognized? I tried
> entering NNTP and USENET on my MS-DOS command line but that didn't work :-)
> Is it possible/desireable for me to use Outlook Express to send the message?
> 
> Once I've established the environment so that the connect, POST, and QUIT
> commands will be accepted, how do I establish the connection to port 119?
> 
> How do I send the actual article to the newsgroups? RFC937 just says that I
> need to send it using the RFC850 format, which I know has been replaced by
> RFC1036.
> 
> If anyone can tell me the answers to these questions, point me to the
> relevant documentation, or supply me with examples, I'd be very grateful.

you could use some premade tools. See site below.

-- 
Andrew Starr
eMailman(r): http://www.emailman.com
NewsReaders(sm): http://www.newsreaders.com
Re: Writing a Posting Program
#54129
Author: The Archiver
Date: Thu, 06 Sep 2001 07:13
54 lines
3002 bytes
"Rhino" <rhino1@sympatico.ca> wrote:

>I'm running Win95 and I would like to post a short message to two particular
>newsgroups every month or so. I am the president of a small club and would
>like to notify people at these two newsgroups about our meetings. 

Programming or making the setup for a program which runs only
twice a month is more work than posting the message manually.

Maintaining the tool will require more work than manual work.
(It - and the host - has to be 'ready to go all the time).

>I am using
>Outlook Express 5.5 as my main e-mail/newsgroup program but I haven't found
>any features that would let me "autopost" my message so I think I need to
>write my own program to do the job.

There are a bunch of autoposters available.
MyNews includes also a mode for posting text-files as raw text 
- and not as an attachment.

>I've skimmed RFC977 and RFC1036 and have a basic idea of the structure of
>the program I need to write. However, I am completely baffled on how to
>establish the environment in which I can submit the NNTP commands to
>establish a connection, POST, and QUIT. Also, I don't know how to establish
>the connection to the desired news server.

You need basic know how about "winsock programming".
There is a newsgroup related to this topic - and some example programs.

>What program do I need to start in order to establish the environment in
>which the connect, POST, and QUIT commands will be recognized? I tried
>entering NNTP and USENET on my MS-DOS command line but that didn't work :-)

If you want to learn about this, then try to use Mynews:
it offers a SPY window which monitors every single byte to a logfile
and to a window. There you could see the entire necessary dialog.

>Is it possible/desireable for me to use Outlook Express to send the message?

Yes, doing _your_ job twice a month manually if the more efficient method.

>Once I've established the environment so that the connect, POST, and QUIT
>commands will be accepted, how do I establish the connection to port 119?

Every programming language offers its own interface to TCP/IP-sockets.
Check the documentation for TCP/IP and/or WinSock programming.


HTH
-- 
The Archiver

Re: Writing a Posting Program
#54136
Author: Frank Slootweg
Date: Thu, 06 Sep 2001 12:04
3 lines
984 bytes
  See the August 21 thread "posting news to NNTP server from Windows" in
this group (if expired, go to Google).
Re: Writing a Posting Program
#54191
Author: AvA
Date: Tue, 11 Sep 2001 12:45
46 lines
2114 bytes
Rhino wrote:

> I think I need to write a simple posting program and need some information
> on how to do it. I'm an experienced programmer in several languages so I
> don't need to know how to program, just how to compose and post usenet
> messages.
>
> <snip>

If you have perl installed (from activestate in your case), then it is a
fairly simple script.

#!/usr/bin/perl -w

use strict;
use Net::NNTP;

my @array =(   "news.announce",
                            "news.software.nntp"
);

my $nntp= Net::NNTP->new("news.workbenelux.nl") or die "can't
connect to server: $@\n";

foreach (@array){
my @header= (
        "Newsgroups: $_\n",
        "Subject: announcement\n",
        "From: webmaster\@someorg.org\n",
        "Organization: someorg.org\n",
        "\n\n",
        "hello this is a new announcement\n
            blah blah\n");

if ($nntp->postok()){
        $nntp->post(\@header) or warn $nntp->message;
    }
}

$nntp->quit;





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