Net::NNTP - problem posting to newsgroups 
Author Message
 Net::NNTP - problem posting to newsgroups

I'm pulling my hair out trying to get this to work, so I'd appreciate any
help...

I'm trying to post to a newsgroup via a perl script. I have found an open
news server that will allow postings and I have succesfully posted to some
newsgroups via the script below.

The problem is finding a news server that carries the newsgroup
uk.aderts.telecom.mobile, allows open connection and will allow posts to be
made.

I've been unsuccessful, so far, in finding suitable news servers. It's a big
job, (even when using News Hunter or www.jammed.com ) - it seems that the
news servers that appear to carry this newsgroup allow posting, and my
script (below) will recognise this but then gets the error "Can't Post". The
script DOES post succesfully to other newsgroups, like alt.test, uk.test etc
so it's very confusing :-(

Maybe the code is correct and I just need to find a suitable news server
that carries this newsgroup and allows posts to be made? I'm no expert on
NNTP, so perhaps there is something wrong with my script, or that certain
newsgroups are more stringent on the header sent?

TIA for any suggestions.

Please respond to this newsgoup or email me at

(please remove .NOSPAM to email me)

----------- PERL CODE FOLLOWS -----------

#!/usr/bin/perl

use Net::NNTP;

$nntp= Net::NNTP->new; #use default port and options

#$ns="freenews.netfront.net";  #NEWS SERVER TO CONNECT TO
$ns="newssrv2.hrz.uni-oldenburg.de";

$ng="alt.test";   #NEWSGROUP
#$ng="uk.adverts.telecom.mobile";

print "\n\nGETTING READY TO CONNECT...\n";


print "Ok, connected to news server: $ns\n";

($narticles, $first, $last, $name) = $server->group($ng) or die "can't
select newsgroup:$ng\n";

print "Ok, have selected newsgroup: $ng\n";

Newsgroups: $ng
Subject: $ns Test
Organization: Test Labs Inc
Distribution: world
X-No-Archive: Yes

This is just a test message

Testing 1 2 3...
posted via $ns

";

$server->postok() or warn "server didn't tell me i could post: \n";

print "Ok, news server allows posting...\n";


print "\n\nPOSTED SUCCESSFULLY!!!!";

------------- END PERL CODE -----------



Sun, 07 Jul 2002 03:00:00 GMT  
 Net::NNTP - problem posting to newsgroups

 Bilbo> I'm trying to post to a newsgroup via a perl script. I have
 Bilbo> found an open news server that will allow postings and I have
 Bilbo> succesfully posted to some newsgroups via the script below.

 Bilbo> The problem is finding a news server that carries the
 Bilbo> newsgroup uk.aderts.telecom.mobile, allows open connection and
 Bilbo> will allow posts to be made.

Why? Why not use the server provided by your ISP? Or failing that,
subscribe to any of the subscription Usenet providers.

The number of servers that intentionally allow public posting (other
than for specific private hierarchies) is essentially zero, due to the
level of abuse which is invariably perpetrated once such servers are
found. If you find a server open for posting, it's almost certainly
due to an administrative error - so you can hardly expect it to
provide reliable service.

Furthermore, most so-called lists of "public" servers are in fact
nothing of the kind - they merely list the set of servers which are,
intentionally or otherwise, open to the compiler of the list. The
appearance of a server on such a list does not constitute permission
to access the server.

As for your code, use Net::NNTP's Debug option (see the docs), or
display the value of $nntp->message() after a failed post (see the
docs for Net::Cmd).

--
Andrew.



Sun, 07 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Net::NNTP - problem posting to newsgroups

2. Problems posting with Net::NNTP

3. Help wanted- Problem posting with Net::NNTP

4. Net::NNTP Posting problem

5. Problems posting with Net::NNTP

6. Net::NNTP missing newsgroups?

7. Net::NNTP missing newsgroups?

8. how to do a posting with Net::NNTP ?

9. Net::NNTP - Message-id of posted article?

10. NNTP Newsgroup script problem!

11. Need example of Net::NNTP->post()

12. Net::NNTP losing data when posting

 

 
Powered by phpBB® Forum Software