U
usenet
Greetings. Kindly consider the following code which illustrates my
question regarding authentication on an NNTP server via the authinfo
method of Net::NNTP:
http://search.cpan.org/~gbarr/libnet-1.19/Net/NNTP.pm
For the purpose of this posting, I have opened a throwaway free (but
authenticating) news account which I will close shortly (to avoid
abuse). The logon/account info in this script IS VALID, and I have
verified that the account works fine in my slrn news client. You have
my permission to use this account (while it exists, if you wish) for
your own testing and debugging purposes regarding this post.
#!/usr/bin/perl
use strict; use warnings;
use Net::NNTP;
my $server = 'news6.open-news-network.org'; #auth required
#my $server = 'allnews.readfreenews.net'; #no authentication
my $nntp = new Net::NNTP($server) or die $!;
print "Date: " . $nntp -> date() ."\n"; #verify server connection
if ($server =~/news\d.open-news-network.org/) {
print "Authenticating to $server\n";
$nntp->authinfo('(e-mail address removed)', '6boc&8qfGO');
}
$nntp -> group('comp.lang.perl.misc');
print map "$_\n", @{$nntp->newnews ( $nntp -> date() - 7200 )};
__END__
(the userid shown is NOT a typo - it really is 'nopam', not 'nospam')
The program should print the msgid's for the past couple hours'
activity in this newsgroup.
Please note that the $server variable may be declared using a different
server (allnews.readfreenews.net). This is a free newsserver which
does not require authentication. If you switch which $server is
commented-out, you will observe that the script works as expected using
the non-authenticating server.
With either server, the validity of the nntp object is established by
querying the server for it's datestamp (which does not require
authentication). So I know I'm talking to both servers, but I'm unable
to pull data from the one which requires authentication. My problem
seems realted to the authinfo method, but I cannot see what I've done
wrong.
I observed this problem on my "real" newsserver (giganews). I opened
the throwaway account mentioned here for additional testing and for
posting here.
Any assistance is greatly appreciated.
question regarding authentication on an NNTP server via the authinfo
method of Net::NNTP:
http://search.cpan.org/~gbarr/libnet-1.19/Net/NNTP.pm
For the purpose of this posting, I have opened a throwaway free (but
authenticating) news account which I will close shortly (to avoid
abuse). The logon/account info in this script IS VALID, and I have
verified that the account works fine in my slrn news client. You have
my permission to use this account (while it exists, if you wish) for
your own testing and debugging purposes regarding this post.
#!/usr/bin/perl
use strict; use warnings;
use Net::NNTP;
my $server = 'news6.open-news-network.org'; #auth required
#my $server = 'allnews.readfreenews.net'; #no authentication
my $nntp = new Net::NNTP($server) or die $!;
print "Date: " . $nntp -> date() ."\n"; #verify server connection
if ($server =~/news\d.open-news-network.org/) {
print "Authenticating to $server\n";
$nntp->authinfo('(e-mail address removed)', '6boc&8qfGO');
}
$nntp -> group('comp.lang.perl.misc');
print map "$_\n", @{$nntp->newnews ( $nntp -> date() - 7200 )};
__END__
(the userid shown is NOT a typo - it really is 'nopam', not 'nospam')
The program should print the msgid's for the past couple hours'
activity in this newsgroup.
Please note that the $server variable may be declared using a different
server (allnews.readfreenews.net). This is a free newsserver which
does not require authentication. If you switch which $server is
commented-out, you will observe that the script works as expected using
the non-authenticating server.
With either server, the validity of the nntp object is established by
querying the server for it's datestamp (which does not require
authentication). So I know I'm talking to both servers, but I'm unable
to pull data from the one which requires authentication. My problem
seems realted to the authinfo method, but I cannot see what I've done
wrong.
I observed this problem on my "real" newsserver (giganews). I opened
the throwaway account mentioned here for additional testing and for
posting here.
Any assistance is greatly appreciated.