🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
50 messages
50 total messages Started by tanderson Fri, 17 Apr 2009 03:54
basic nntp connections question
#80578
Author: tanderson
Date: Fri, 17 Apr 2009 03:54
6 lines
1877 bytes
I am fooling around writing a newsreader and have some of the basics in
place. My question is about every 10 connections or so I will get rejected
with a 502 upon doing the authinfo. I know everything is valid and I am not
maxing out the connections. I have noticed through the years newsreaders
having a number of retries setting. So I am guessing that this behavior is
normal and I just need to retry the login?
Re: basic nntp connections question
#80579
Author: Julien ÉLIE
Date: Fri, 17 Apr 2009 05:58
75 lines
3144 bytes
Hi,

> My question is about every 10 connections or so I will get rejected
> with a 502 upon doing the authinfo.

With 10 simultaneous connections?  or with ten sequential connections?

When is 502 sent?  Just after AUTHINFO USER, AUTHINFO PASS or AUTHINFO SASL?
Also after other commands like LIST or GROUP?


> I know everything is valid and I am not
> maxing out the connections.

You should normally do something like that:


% telnet news.trigofacile.com 119
Trying 91.121.26.68...
Connected to news.trigofacile.com.
Escape character is '^]'.
200 news.trigofacile.com InterNetNews NNRP server INN 2.5.0 (20090412 prerelease) ready (no posting)
CAPABILITIES
101 Capability list:
VERSION 2
IMPLEMENTATION INN 2.5.0 (20090412 prerelease)
AUTHINFO USER SASL
HDR
LIST ACTIVE ACTIVE.TIMES DISTRIB.PATS HEADERS NEWSGROUPS OVERVIEW.FMT
OVER
READER
SASL GSSAPI OTP PLAIN NTLM LOGIN DIGEST-MD5 CRAM-MD5
STARTTLS
..
AUTHINFO USER test
381 Enter password
AUTHINFO PASS test
281 Authentication succeeded
CAPABILITIES
101 Capability list:
VERSION 2
IMPLEMENTATION INN 2.5.0 (20090412 prerelease)
HDR
IHAVE
LIST ACTIVE ACTIVE.TIMES DISTRIB.PATS HEADERS NEWSGROUPS OVERVIEW.FMT
NEWNEWS
OVER
POST
READER
SASL GSSAPI OTP PLAIN NTLM LOGIN DIGEST-MD5 CRAM-MD5
..
LIST
215 Newsgroups in form "group high low flags"
trigofacile.test 0000000177 0000000006 y
france.admin.test 0000000088 0000000007 y
fr.test 0000009730 0000001321 y
toulouse.test 0000000491 0000000001 y
..



(Feel free to test if you want -- test/test is valid.)



> So I am guessing that this behavior is
> normal and I just need to retry the login?

On which news servers do you see that behaviour?

-- 
Julien ÉLIE

« Ave Amiral Cetinconsensus, comme toujours tu as vu juste. » (Astérix) 
Re: basic nntp connections question
#80580
Author: tanderson
Date: Fri, 17 Apr 2009 14:49
80 lines
3795 bytes
Julien ÉLIE wrote:

> Hi,
> 
>> My question is about every 10 connections or so I will get rejected
>> with a 502 upon doing the authinfo.
> 
> With 10 simultaneous connections?  or with ten sequential connections?
ten sequential. and that is approximately. Sometimes 4, sometimes 20.
> 
> When is 502 sent?  Just after AUTHINFO USER, AUTHINFO PASS or AUTHINFO
> SASL? Also after other commands like LIST or GROUP?
alway just after authinfo pass.
> 
> 
>> I know everything is valid and I am not
>> maxing out the connections.
> 
> You should normally do something like that:
> 
> 
> % telnet news.trigofacile.com 119
> Trying 91.121.26.68...
> Connected to news.trigofacile.com.
> Escape character is '^]'.
> 200 news.trigofacile.com InterNetNews NNRP server INN 2.5.0 (20090412
> prerelease) ready (no posting) CAPABILITIES
> 101 Capability list:
> VERSION 2
> IMPLEMENTATION INN 2.5.0 (20090412 prerelease)
> AUTHINFO USER SASL
> HDR
> LIST ACTIVE ACTIVE.TIMES DISTRIB.PATS HEADERS NEWSGROUPS OVERVIEW.FMT
> OVER
> READER
> SASL GSSAPI OTP PLAIN NTLM LOGIN DIGEST-MD5 CRAM-MD5
> STARTTLS
> .
> AUTHINFO USER test
> 381 Enter password
> AUTHINFO PASS test
> 281 Authentication succeeded
> CAPABILITIES
> 101 Capability list:
> VERSION 2
> IMPLEMENTATION INN 2.5.0 (20090412 prerelease)
> HDR
> IHAVE
> LIST ACTIVE ACTIVE.TIMES DISTRIB.PATS HEADERS NEWSGROUPS OVERVIEW.FMT
> NEWNEWS
> OVER
> POST
> READER
> SASL GSSAPI OTP PLAIN NTLM LOGIN DIGEST-MD5 CRAM-MD5
> .
> LIST
> 215 Newsgroups in form "group high low flags"
> trigofacile.test 0000000177 0000000006 y
> france.admin.test 0000000088 0000000007 y
> fr.test 0000009730 0000001321 y
> toulouse.test 0000000491 0000000001 y
> .
> 
> 
> 
> (Feel free to test if you want -- test/test is valid.)
thanks I will. I will mod the code a little and fire some sequential
connections and maybe I will get some idea of where the problem is coming
from.
> 
> 
> 
>> So I am guessing that this behavior is
>> normal and I just need to retry the login?
> 
> On which news servers do you see that behaviour?
I am using news.giganews.com. Not sure what server software they are
running.
> 
Re: basic nntp connections question
#80581
Author: Julien ÉLIE
Date: Fri, 17 Apr 2009 17:10
17 lines
1900 bytes
Hi,

>> On which news servers do you see that behaviour?
>
> I am using news.giganews.com. Not sure what server software they are
> running.

I think they are using a customized news server.  You can expect from
them a different behaviour from what you can see elsewhere.
Maybe they implement a maximum number of simultaneous connections for
a given user and the accounting of connections is not done immediately.

-- 
Julien ÉLIE

« Ave Amiral Cetinconsensus, comme toujours tu as vu juste. » (Astérix) 
Re: basic nntp connections question
#80582
Author: John F. Morse
Date: Fri, 17 Apr 2009 17:20
25 lines
2152 bytes
Julien ÉLIE wrote:
> Hi,
>
>>> On which news servers do you see that behaviour?
>>
>> I am using news.giganews.com. Not sure what server software they are
>> running.
>
> I think they are using a customized news server.  You can expect from
> them a different behaviour from what you can see elsewhere.
> Maybe they implement a maximum number of simultaneous connections for
> a given user and the accounting of connections is not done immediately.
>

Is it possible in INN (or nnrpd) to limit reader connections to one,
while still allowing multiple connections for incoming and transit?

If this is a configurable option, where?

-- 
John 

No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.

The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: basic nntp connections question
#80583
Author: Curt Welch
Date: Fri, 17 Apr 2009 17:28
47 lines
4219 bytes
tanderson <holden@mcgroyn.com> wrote:
> I am fooling around writing a newsreader and have some of the basics in
> place. My question is about every 10 connections or so I will get
> rejected with a 502 upon doing the authinfo. I know everything is valid
> and I am not maxing out the connections. I have noticed through the years
> newsreaders having a number of retries setting. So I am guessing that
> this behavior is normal and I just need to retry the login?

It's not "normal" technically.  If your news server is randomly rejecting
connections about 1 out of 10 times, it's a broken news server.  Our
servers are broken in similar ways at times. :)  However,  my first guess
would be that your client code is doing something wrong.

Most news servers have per user connection limits, and it's possible,
depending on how the server implements that limit, that your closed
connections might still be counting against the limit for some period of
time (a few seconds, or a few minutes?).  So, if you are opening and
closing a lot of connections, instead of opening one (or a few), and
keeping it open for the long term, you might be creating problems for
yourself by confusing the server's connection limit counting.  That's just
a guess.  But normally, NNTP is not like HTTP.  News servers don't expect
you to open and close connections 100 times a second.  Historically, the
typical usage is to open a connection when the user starts his newsreader,
and leave it open until he's done.  It's perfectly fine to dynamically open
more as needed, but in general, you might run into some problems if you are
constantly opening and closing new connections quickly.

However, there are lots of broken news servers around, and as such, it is
normal to add code to the client side to automatically retry connections
when they don't work, or to automatically try to re-connect if you get
disconnected.  You have to be careful however not to put the client and
server into a tight infinite loop when you start adding automatic retry
code.  You have to put retry limits, and should use some automatic back-off
algorithm to make it delay longer between consecutive failed retry
attempts.  If the account is blocked on the server side, you don't want the
client to go into a tight infinite loop trying 100 times per second to
connect while constantly being rejected.

So it's possible that the server you are using is just broken and does
reject connections about 1 out of 10 times, but it shouldn't do that, so
check your code carefully to make sure the server really is doing what you
think it's doing, but then, do whatever you have to in your code, to make
it work with the server you are using.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: basic nntp connections question
#80584
Author: tanderson
Date: Fri, 17 Apr 2009 17:35
5 lines
1649 bytes
Julien,
        I hit your server (or the server you suggested) about 100 times with no
problems. So I think my code is good and being rejected by giganews once in
a while is normal? Thanks for the help. Is that your server? Is it always
available for testing?
Re: basic nntp connections question
#80585
Author: Curt Welch
Date: Fri, 17 Apr 2009 17:44
19 lines
2220 bytes
tanderson <holden@mcgroyn.com> wrote:
> Julien ÉLIE wrote:

> > On which news servers do you see that behaviour?
> I am using news.giganews.com. Not sure what server software they are
> running.
> >

Ah, I didn't see your answer before I wrote my other reply.

I have various automated scripts connecting to Giganews and my servers and
a few other servers to compare completion and performance and other such
things and I've never seen a connect reject as you describe.  It's
certainly not normal for Giganews to do that so I would suspect you have an
error somewhere else.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: basic nntp connections question
#80586
Author: Julien ÉLIE
Date: Fri, 17 Apr 2009 18:14
72 lines
3731 bytes
Hi,

> I hit your server (or the server you suggested) about 100 times with no
> problems.  So I think my code is good and being rejected by giganews once in
> a while is normal?

I do not think it is normal.
Oh, I see that Giganews implements CAPABILITIES.  Good news!

% telnet news.giganews.com 119
200 News.GigaNews.Com
CAPABILITIES
101 capability list
VERSION 2
AUTHINFO USER
..

In response to AUTHINFO USER/PASS, here is the meaning of 502:

     502 Command unavailable [2]

     [2] If authentication has already occurred, AUTHINFO USER/PASS are
         not valid commands (see Section 2.2).

   After a successful authentication, the client MUST NOT issue another
   AUTHINFO command in the same session.  A server MUST NOT return the
   AUTHINFO capability in response to a CAPABILITIES command, and a
   server MUST reject any subsequent AUTHINFO commands with a 502
   response.


However, you report that you only see 502 after AUTHINFO PASS.  Very
strange.  It would imply that Giganews does not respect RFC 4643, though
advertising AUTHINFO USER via CAPABILITIES.  Bad news...

With RFC 2980, which may be what Giganews currently implements for AUTHINFO:

    If the combination is not valid, the server will return a
    502 response.

Which is in fact 481 nowadays.
It is strange they think your credentials are invalid.  Unless, as I suggested,
they are counting the number of "simultaneous" connections and wrongly believe
your sequential and close connections are still alive.



> Is that your server? Is it always available for testing?

Yes it is mine.  It is normally always available.  (Well, of course not
when I restart INN, which can happen from time to time.  If it happens,
just wait a little...)

If you need to test AUTHINFO SASL, I have the user test/tester defined:

% perl -MMIME::Base64 -e 'print encode_base64("\0test\0tester");'
AHRlc3QAdGVzdGVy

% telnet news.trigofacile.com 119
200 news.trigofacile.com InterNetNews NNRP server INN 2.5.0 (20090412 prerelease) ready (no posting)
AUTHINFO SASL PLAIN AHRlc3QAdGVzdGVy
281 Authentication succeeded

It is direct!
I accept several mechanisms:
SASL GSSAPI OTP PLAIN NTLM LOGIN DIGEST-MD5 CRAM-MD5

-- 
Julien ÉLIE

« Ave Amiral Cetinconsensus, comme toujours tu as vu juste. » (Astérix) 
Re: basic nntp connections question
#80587
Author: Julien ÉLIE
Date: Fri, 17 Apr 2009 18:17
14 lines
1745 bytes
Just an addition:

> It is strange they think your credentials are invalid.  Unless, as I suggested,

+and Curt too,

> they are counting the number of "simultaneous" connections and wrongly believe
> your sequential and close connections are still alive.

-- 
Julien ÉLIE

« Tous les chemins mènent à rame... » (Mouléfix) 
Re: basic nntp connections question
#80588
Author: Julien ÉLIE
Date: Fri, 17 Apr 2009 18:22
21 lines
1794 bytes
% telnet news.giganews.com 119
200 News.GigaNews.Com
CAPABILITIES
101 capability list
VERSION 2
AUTHINFO USER
..
AUTHINFO USER a
381 more authentication required
AUTHINFO PASS b
502 Invalid username or password


Broken implementation.

-- 
Julien ÉLIE

« La chaîne du mariage est si lourde qu'il faut être deux
  pour la porter, souvent trois. » (Alexandre Dumas) 
Re: basic nntp connections question
#80589
Author: Julien ÉLIE
Date: Fri, 17 Apr 2009 18:24
20 lines
1949 bytes
Hi John,

> Is it possible in INN (or nnrpd) to limit reader connections to one,
> while still allowing multiple connections for incoming and transit?
>
> If this is a configurable option, where?

No it's not.

However, I suggest you to have a look at Fred Senault's
Perl auth filter hook:

http://news.lacave.net/inn/auth_rate.pl

-- 
Julien ÉLIE

« La chaîne du mariage est si lourde qu'il faut être deux pour
  la porter, souvent trois. » (Alexandre Dumas) 
Re: basic nntp connections question
#80591
Author: tanderson
Date: Fri, 17 Apr 2009 21:20
72 lines
4103 bytes
Julien ÉLIE wrote:

> Hi,
> 
>> I hit your server (or the server you suggested) about 100 times with no
>> problems.  So I think my code is good and being rejected by giganews once
>> in a while is normal?
> 
> I do not think it is normal.
> Oh, I see that Giganews implements CAPABILITIES.  Good news!
> 
> % telnet news.giganews.com 119
> 200 News.GigaNews.Com
> CAPABILITIES
> 101 capability list
> VERSION 2
> AUTHINFO USER
> .
> 
> In response to AUTHINFO USER/PASS, here is the meaning of 502:
> 
>      502 Command unavailable [2]
> 
>      [2] If authentication has already occurred, AUTHINFO USER/PASS are
>          not valid commands (see Section 2.2).
> 
>    After a successful authentication, the client MUST NOT issue another
>    AUTHINFO command in the same session.  A server MUST NOT return the
>    AUTHINFO capability in response to a CAPABILITIES command, and a
>    server MUST reject any subsequent AUTHINFO commands with a 502
>    response.
> 
> 
> However, you report that you only see 502 after AUTHINFO PASS.  Very
> strange.  It would imply that Giganews does not respect RFC 4643, though
> advertising AUTHINFO USER via CAPABILITIES.  Bad news...
> 
> With RFC 2980, which may be what Giganews currently implements for
> AUTHINFO:
> 
>     If the combination is not valid, the server will return a
>     502 response.
> 
> Which is in fact 481 nowadays.
> It is strange they think your credentials are invalid.  Unless, as I
> suggested, they are counting the number of "simultaneous" connections and
> wrongly believe your sequential and close connections are still alive.
> 
> 
> 
>> Is that your server? Is it always available for testing?
> 
> Yes it is mine.  It is normally always available.  (Well, of course not
> when I restart INN, which can happen from time to time.  If it happens,
> just wait a little...)
> 
> If you need to test AUTHINFO SASL, I have the user test/tester defined:
> 
> % perl -MMIME::Base64 -e 'print encode_base64("\0test\0tester");'
> AHRlc3QAdGVzdGVy
> 
> % telnet news.trigofacile.com 119
> 200 news.trigofacile.com InterNetNews NNRP server INN 2.5.0 (20090412
> prerelease) ready (no posting) AUTHINFO SASL PLAIN AHRlc3QAdGVzdGVy
> 281 Authentication succeeded
> 
> It is direct!
> I accept several mechanisms:
> SASL GSSAPI OTP PLAIN NTLM LOGIN DIGEST-MD5 CRAM-MD5
> 

thanks might need it.
Re: basic nntp connections question
#80593
Author: tanderson
Date: Fri, 17 Apr 2009 21:25
17 lines
2254 bytes
Julien ÉLIE wrote:

> Just an addition:
> 
>> It is strange they think your credentials are invalid.  Unless, as I
>> suggested,
> 
> +and Curt too,
> 
>> they are counting the number of "simultaneous" connections and wrongly
>> believe your sequential and close connections are still alive.
> 

I am starting to think this might be the case. I am wondering if they have
some kind of connection quantity/time limit so nobody can "attack" their
service. giganews is a premiere service, so they might have a lot of
constrictions that might not be present in other services.
Re: basic nntp connections question
#80594
Author: tanderson
Date: Fri, 17 Apr 2009 21:28
20 lines
2401 bytes
Curt Welch wrote:

> tanderson <holden@mcgroyn.com> wrote:
>> Julien ÉLIE wrote:
> 
>> > On which news servers do you see that behaviour?
>> I am using news.giganews.com. Not sure what server software they are
>> running.
>> >
> 
> Ah, I didn't see your answer before I wrote my other reply.
> 
> I have various automated scripts connecting to Giganews and my servers and
> a few other servers to compare completion and performance and other such
> things and I've never seen a connect reject as you describe.  It's
> certainly not normal for Giganews to do that so I would suspect you have
> an error somewhere else.
> 

I probably have more than one! I will continue to look into this.
Re: basic nntp connections question
#80595
Author: tanderson
Date: Fri, 17 Apr 2009 21:52
49 lines
4441 bytes
Curt Welch wrote:

> tanderson <holden@mcgroyn.com> wrote:
>> I am fooling around writing a newsreader and have some of the basics in
>> place. My question is about every 10 connections or so I will get
>> rejected with a 502 upon doing the authinfo. I know everything is valid
>> and I am not maxing out the connections. I have noticed through the years
>> newsreaders having a number of retries setting. So I am guessing that
>> this behavior is normal and I just need to retry the login?
> 
> It's not "normal" technically.  If your news server is randomly rejecting
> connections about 1 out of 10 times, it's a broken news server.  Our
> servers are broken in similar ways at times. :)  However,  my first guess
> would be that your client code is doing something wrong.
> 
> Most news servers have per user connection limits, and it's possible,
> depending on how the server implements that limit, that your closed
> connections might still be counting against the limit for some period of
> time (a few seconds, or a few minutes?).  So, if you are opening and
> closing a lot of connections, instead of opening one (or a few), and
> keeping it open for the long term, you might be creating problems for
> yourself by confusing the server's connection limit counting.  That's just
> a guess.  But normally, NNTP is not like HTTP.  News servers don't expect
> you to open and close connections 100 times a second.  Historically, the
> typical usage is to open a connection when the user starts his newsreader,
> and leave it open until he's done.  It's perfectly fine to dynamically
> open more as needed, but in general, you might run into some problems if
> you are constantly opening and closing new connections quickly.
> 
> However, there are lots of broken news servers around, and as such, it is
> normal to add code to the client side to automatically retry connections
> when they don't work, or to automatically try to re-connect if you get
> disconnected.  You have to be careful however not to put the client and
> server into a tight infinite loop when you start adding automatic retry
> code.  You have to put retry limits, and should use some automatic
> back-off algorithm to make it delay longer between consecutive failed
> retry
> attempts.  If the account is blocked on the server side, you don't want
> the client to go into a tight infinite loop trying 100 times per second to
> connect while constantly being rejected.
> 
> So it's possible that the server you are using is just broken and does
> reject connections about 1 out of 10 times, but it shouldn't do that, so
> check your code carefully to make sure the server really is doing what you
> think it's doing, but then, do whatever you have to in your code, to make
> it work with the server you are using.
> 

thanks so much for all the info.
Re: basic nntp connections question
#80596
Author: Curt Welch
Date: Fri, 17 Apr 2009 23:37
28 lines
2659 bytes
tanderson <holden@mcgroyn.com> wrote:
> Julien ÉLIE wrote:
>
> > Just an addition:
> >
> >> It is strange they think your credentials are invalid.  Unless, as I
> >> suggested,
> >
> > +and Curt too,
> >
> >> they are counting the number of "simultaneous" connections and wrongly
> >> believe your sequential and close connections are still alive.
> >
>
> I am starting to think this might be the case. I am wondering if they
> have some kind of connection quantity/time limit so nobody can "attack"
> their service. giganews is a premiere service, so they might have a lot
> of constrictions that might not be present in other services.

That's possible.  Or it could just be a side effect of how connection
limiting is implemented that causes a natural delay.  When running large
distributed systems, you have to share the connection count information
across servers and how that's done might just tend to cause a natural delay
in the information being passed around.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: basic nntp connections question
#80597
Author: Urs Janßen
Date: Fri, 17 Apr 2009 23:49
10 lines
1609 bytes
In <gsahhb$9ir$1@news.trigofacile.com>, Julien ÉLIE wrote:
> Broken implementation.

it was worse a week ago

| 101 capability list
| VERSION 2
| .

(no MODE-READER or READER (or POST or IHAVE) and no AUTHNIFO)
Re: basic nntp connections question
#80598
Author: Julien ÉLIE
Date: Sat, 18 Apr 2009 07:53
71 lines
3622 bytes
Hi Urs,

>> Broken implementation.
>
> it was worse a week ago
>
> | 101 capability list
> | VERSION 2
> | .
>
> (no MODE-READER or READER (or POST or IHAVE) and no AUTHNIFO)

What is amusing is that the following situation could apply:

   The "USER" argument indicates that AUTHINFO USER/PASS is supported as
   defined by Section 2.3 of this document.  The "USER" argument MUST
   NOT be advertised, and the AUTHINFO USER/PASS commands SHOULD NOT be
   provided, unless a strong encryption layer (e.g., Transport Layer
   Security (TLS) [NNTP-TLS]) is in use or backward compatibility
   dictates otherwise.

   The server MAY list the AUTHINFO capability with no arguments, which
   indicates that it complies with this specification and does not
   permit any authentication commands in its current state.


Then we could do AUTHINFO USER (though not advertised)...

*However*, as response codes are totally broken for AUTHINFO, I do not
believe Giganews did such a thing!


As for MODE READER:

200 News.GigaNews.Com
CAPABILITIES
101 capability list
VERSION 2
AUTHINFO USER
..
MODE READER
480 authentication required


Interesting.  It is not a mode-switching server (because MODE-READER
is not advertised) so we already are in the reader part.  Therefore:

   If the server is not mode-switching, then the following apply:

   o  If it advertises the READER capability, it MUST return a 200 or
      201 response with the same meaning as for the initial greeting; in
      this case, the command MUST NOT affect the server state in any
      way.

   o  If it does not advertise the READER capability, it MUST return a
      502 response and then immediately close the connection.


So that would be 502!  Then, they should really advertise READER
(even though every attempt to use reader commands leads to 480)
and answer 200 to MODE READER.


I hope they implemented other NNTP commands better...

-- 
Julien ÉLIE

« La chaîne du mariage est si lourde qu'il faut être deux pour la porter,
  souvent trois. » (Alexandre Dumas) 
Re: basic nntp connections question
#80599
Author: John F. Morse
Date: Sat, 18 Apr 2009 16:45
56 lines
3103 bytes
Julien ÉLIE wrote:
> Hi John,
>
>> Is it possible in INN (or nnrpd) to limit reader connections to one,
>> while still allowing multiple connections for incoming and transit?
>>
>> If this is a configurable option, where?
>
> No it's not.
>
> However, I suggest you to have a look at Fred Senault's
> Perl auth filter hook:
>
> http://news.lacave.net/inn/auth_rate.pl


Thanks, Julien. I have this bookmarked for later evaluation.

First, though, where would I put this script file, and what else would
need to be edited to hook into it?

I looked over the site but see no instructions, beyond:

Un autre script d'authentification basé plus simplement sur un fichier
password plat classique, mais qui implémente une limite au nombre de
connexions simultanées par client (pour être exact, par addresse IP).

Which translates as: "Another script authentication based simply on a
classic dish password file, but implements a limit on the number of
simultaneous connections per user (to be exact, by IP address)."

I don't see anything in the script mentioning "IP," but I believe he is
referring to a textfile of users:

my $FILE = '/etc/news/users';

I would prefer the limitation to be for all nnrpd connections. I
certainly don't want to maintain an additional file for user names.

This idea is not for regulation for the purpose of limiting speed nor
volume, but simply to make the news.notice log report more readable
(orderly). I don't think more than one reader connection will speed up
anything.

Another wild idea might be to limit the connections in inn.conf for the
reader-only computer, while still allowing many connections for a
transit computer.

However I suspect doing this would likely create a streaming bottleneck
between the reader and transit computers.

Thoughts?


-- 
John
Re: basic nntp connections question
#80600
Author: Julien ÉLIE
Date: Sat, 18 Apr 2009 17:30
58 lines
3443 bytes
Hi John,

>> http://news.lacave.net/inn/auth_rate.pl
>
> First, though, where would I put this script file, and what else would
> need to be edited to hook into it?

You should look at the perl_auth: parameter in readers.conf.


> I looked over the site but see no instructions, beyond:
>
> Un autre script d'authentification basé plus simplement sur un fichier
> password plat classique, mais qui implémente une limite au nombre de
> connexions simultanées par client (pour être exact, par addresse IP).
>
> Which translates as: "Another script authentication based simply on a
> classic dish password file, but implements a limit on the number of
> simultaneous connections per user (to be exact, by IP address)."

The "dish file" (for "fichier plat") is a "flat file".


> I don't see anything in the script mentioning "IP," but I believe he is
> referring to a textfile of users:
>
> my $FILE = '/etc/news/users';
>
> I would prefer the limitation to be for all nnrpd connections. I
> certainly don't want to maintain an additional file for user names.

In fact, it is used if you authenticate users (with ckpasswd for instance
against the "users" flat file).
If you do not want that, just drop the part where $FILE is dealt with
and use:

  if($oc > $MAX) {
    sleep(2);
    return ( '502', 'Too many connections from your host' );
  } else {
    return ( '281', 'Ok' );
  }


> This idea is not for regulation for the purpose of limiting speed nor
> volume, but simply to make the news.notice log report more readable
> (orderly). I don't think more than one reader connection will speed up
> anything.

The problem is that some news clients open several connections by design
(for instance to retrieve messages in parallel or an instance to post
articles, not within the reader instance).

-- 
Julien ÉLIE

« Rubor, tumor, dolor, calor et functio laesa. » 
Re: basic nntp connections question
#80602
Author: John F. Morse
Date: Sat, 18 Apr 2009 20:38
80 lines
4236 bytes
Julien ÉLIE wrote:
> Hi John,
>
>>> http://news.lacave.net/inn/auth_rate.pl
>>
>> First, though, where would I put this script file, and what else would
>> need to be edited to hook into it?
>
> You should look at the perl_auth: parameter in readers.conf.


Ah-ha! Thanks for this tip.


>> I looked over the site but see no instructions, beyond:
>>
>> Un autre script d'authentification basé plus simplement sur un fichier
>> password plat classique, mais qui implémente une limite au nombre de
>> connexions simultanées par client (pour être exact, par addresse IP).
>>
>> Which translates as: "Another script authentication based simply on a
>> classic dish password file, but implements a limit on the number of
>> simultaneous connections per user (to be exact, by IP address)."
>
> The "dish file" (for "fichier plat") is a "flat file".
>
>
>> I don't see anything in the script mentioning "IP," but I believe he is
>> referring to a textfile of users:
>>
>> my $FILE = '/etc/news/users';
>>
>> I would prefer the limitation to be for all nnrpd connections. I
>> certainly don't want to maintain an additional file for user names.
>
> In fact, it is used if you authenticate users (with ckpasswd for instance
> against the "users" flat file).


I do, so I guess there is no more work involved.


> If you do not want that, just drop the part where $FILE is dealt with
> and use:
>
>  if($oc > $MAX) {
>    sleep(2);
>    return ( '502', 'Too many connections from your host' );
>  } else {
>    return ( '281', 'Ok' );
>  }
>
>
>> This idea is not for regulation for the purpose of limiting speed nor
>> volume, but simply to make the news.notice log report more readable
>> (orderly). I don't think more than one reader connection will speed up
>> anything.
>
> The problem is that some news clients open several connections by design
> (for instance to retrieve messages in parallel or an instance to post
> articles, not within the reader instance).


Well, ... maybe I should think about this a little more then. Having to
answer a ton of e-mail queries, asking, "what happened?" is not what I
really want!

I certainly don't want to have to test every newsreader available, so I
can write a HOWTO for each one on how to find the "maximum connections"
options. Some may not even be configurable, which would cause a lot of
502s and noise from those users. :-\

Thanks, Julien, and have a nice weekend.

-- 
John 

No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.

The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: basic nntp connections question
#80603
Author: Urs Janßen
Date: Sat, 18 Apr 2009 21:54
37 lines
3127 bytes
In <gsc12f$mbc$1@news.trigofacile.com>, Julien ÉLIE wrote:
> Interesting.  It is not a mode-switching server (because MODE-READER
> is not advertised) so we already are in the reader part.  Therefore:
> 
>   If the server is not mode-switching, then the following apply:
> 
>   o  If it advertises the READER capability, it MUST return a 200 or
>      201 response with the same meaning as for the initial greeting; in
>      this case, the command MUST NOT affect the server state in any
>      way.
> 
>   o  If it does not advertise the READER capability, it MUST return a
>      502 response and then immediately close the connection.
> 
> So that would be 502!  Then, they should really advertise READER
> (even though every attempt to use reader commands leads to 480)
> and answer 200 to MODE READER.

thier argumentation is that READER cmds are not available before
successfull authenticatiion so tehy do not advertised them and as
the server doesn't support TLS nor any other auth than AUTHINFO USER/PASS
they decided to advertise AUTHINFO USER besides the version number.

> I hope they implemented other NNTP commands better...

*shrug* I don't have a giganews account - I just got one complaint
from a tin user after he updated from tin 1.8.3 (doesn't send
CAPABILITIS) to tin 1.9.4 (sends CAPABILITIS, didn't see
READER/POST/MODE READER and gave up; I've "fixed" tin that it now
trys AUTHINFO USER/PASS (yes, in the case where no auth method was
advertised) in that situation and if that works resends CAPABILITIES).

urs
-- 
Jef Poskanzer:
"When people aren't stupid Usenet is even more useful. Too bad this happens
 so rarely."
Re: basic nntp connections question
#80604
Author: Xavier Roche
Date: Sat, 18 Apr 2009 22:10
8 lines
1679 bytes
Julien ÉLIE a écrit :
>>> Broken implementation.
> I hope they implemented other NNTP commands better...

They also show up all control messages (including cancels) in their 
respective groups (ie. including bleachbot's ones). Their server is 
definitely a piece of shit (excude my french) probably only "scaled" for 
binaries.
Re: basic nntp connections question
#80605
Author: Julien ÉLIE
Date: Sat, 18 Apr 2009 22:33
22 lines
2360 bytes
Hi Xavier,

> They also show up all control messages (including cancels) in their respective groups (ie. including bleachbot's ones).

And that does not bother their users?


> Their server is definitely a piece of shit (excude my french) probably
> only "scaled" for binaries.

You could not say better with "scaled" as they are using 64-bit article
numbers only for that according to one of their announce last year!
It still astonishes me to hear that cancels appear amongst usual
messages in newsgroups.  It is not user friendly at all.  Maybe no
user (except for our Corsican Bonaventure?) uses their text groups!

-- 
Julien ÉLIE

« L'homme a imaginé le cercle avant de savoir que la terre était ronde.
  Ça prouve quand même une certaine faculté d'invention. » (Jacques Sternberg) 
Re: basic nntp connections question
#80606
Author: Xavier Roche
Date: Sat, 18 Apr 2009 22:42
16 lines
2168 bytes
Julien ÉLIE a écrit :
> And that does not bother their users?

It does, apparently (some users reported the "bug"). Some are trying to 
use a real newsreader and are learning to use kill files to drop spams 
AND cancel messages using scoring rules (hilarious, isn't it ?)

(And users are apparently able to copy with a bogus paid service - this 
is really astonishing, isn't it ?)

> Maybe no user (except for our Corsican Bonaventure?) uses their text groups!

Some are (trying) to, because many US ISP are dropping newsgroups and 
are outsourcing the service (because most users still want to download 
movies, warez and porn - and decent binary support requires storage, 
servers and bandwidth most ISP do not want to support)
Re: basic nntp connections question
#80607
Author: Xavier Roche
Date: Sat, 18 Apr 2009 22:43
17 lines
2217 bytes
Julien ÉLIE a écrit :
> And that does not bother their users?

It does, apparently (some users reported the "bug"). Some are trying to 
use a real newsreader and are learning to use kill files to drop spams 
AND cancel messages using scoring rules (hilarious, isn't it ?)

(And users are apparently able to cope with a bogus paid service - this 
  is really astonishing, isn't it ?)

> Maybe no user (except for our Corsican Bonaventure?) uses their text groups!

Some are (trying) to, because many US ISP are dropping newsgroups and 
are outsourcing the service (because most users still want to download 
movies, warez and porn - and decent binary support requires storage, 
servers and bandwidth most ISP do not want to support)
Re: basic nntp connections question
#80609
Author: Julien ÉLIE
Date: Sat, 18 Apr 2009 23:04
96 lines
4093 bytes
Hi Urs,

> their argumentation is that READER cmds are not available before
> successfull authenticatiion so they do not advertised them

It contradicts RFC 3977 which clearly introduces the notion of transit
and reading servers.  If READER is advertised, we are in a reading
mode and we can go on (either authenticate if AUTHINFO is advertised
or directly try a command and authenticate if 480 is received).
If READER is not advertised, then we are in a transit mode and
in addition, if MODE-READER is not advertised, it is useless to
go further.
Their argumentation does not fit with the design of the protocol.

What they should answer is:

101 Capability list:
VERSION 2
AUTHINFO USER
LIST ACTIVE NEWSGROUPS
READER
..

(LIST ACTIVE and LIST NEWSGROUPS are mandatory when READER
is advertised -- though they can lead to a 480 answer.)


> as the server doesn't support TLS nor any other auth than AUTHINFO USER/PASS
> they decided to advertise AUTHINFO USER besides the version number.

That's OK.


>> I hope they implemented other NNTP commands better...
>
> *shrug* I don't have a giganews account

Anyway, I have *serious* concerns.  Not only because of the one I already saw:

AUTHINFO USER a
381 more authentication required
AUTHINFO PASS b
502 Invalid username or password

(It is 481 and not 502.)


But also because of CAPABILITIES which is not correct.  They answer:

CAPABILITIES A
101 capability list
VERSION 2
AUTHINFO USER
..
CAPABILITIES AAA
101 capability list
VERSION 2
AUTHINFO USER
..

whereas it should be:

CAPABILITIES A
501 Syntax error
CAPABILITIES AAA
101 Capability list:
VERSION 2
AUTHINFO USER
LIST ACTIVE NEWSGROUPS
READER
..


It is clearly written in the definition CAPABILITIES:

   If the server does not recognise the argument (and it is a keyword), it
   MUST respond with the 101 response code as if the argument had been
   omitted.  If the argument is not a keyword, the 501 generic response
   code MUST be returned.

A keyword contains more than 3 characters...

Well, never mind, it is pointless worrying about their broken implementation.


> tin 1.9.4 sends CAPABILITIES, didn't see READER/POST/MODE READER and gave up

That's the normal behaviour.
Too bad that Giganews compelled you to introduce kludges in tin.

-- 
Julien ÉLIE

« L'homme a imaginé le cercle avant de savoir que la terre était ronde.
  Ça prouve quand même une certaine faculté d'invention. » (Jacques Sternberg) 
Re: basic nntp connections question
#80610
Author: Julien ÉLIE
Date: Sat, 18 Apr 2009 23:06
14 lines
2047 bytes
Hi Xavier,

> It does, apparently (some users reported the "bug"). Some are trying to use a real newsreader and are learning to use kill files 
> to drop spams AND cancel messages using scoring rules (hilarious, isn't it ?)

Gosh!

-- 
Julien ÉLIE

« -- Ils s'arrêtaient tous les jours à 5 heures,
  pour boire de l'eau chaude...
  -- Je prendrai un nuage de lait, je vous prie. » (Astérix)
Re: basic nntp connections question
#80624
Author: Urs Janßen
Date: Tue, 21 Apr 2009 22:10
21 lines
2199 bytes
In <gsdmd8$fct$1@news.trigofacile.com>, Julien ÉLIE wrote:
> Too bad that Giganews compelled you to introduce kludges in tin.

| >LIST ACTIVE alt.binaries.boneless
| <215 newsgroups follow
| <alt.binaries.boneless 2156785001 1527513710 y
| <.
| >GROUP alt.binaries.boneless
| <211 268666284 1888118539 2156784822 alt.binaries.boneless

a) lowmark from active differs from that in group response
b) they exceeded 2^31-1

tin uses a (historic) mix *sigh* of signed int and signed long for article
numbers, I have to switch to long log now *sigh*

urs
-- 
Jef Poskanzer:
"When people aren't stupid Usenet is even more useful. Too bad this happens
 so rarely."
Re: basic nntp connections question
#80631
Author: Julien ÉLIE
Date: Wed, 22 Apr 2009 05:58
24 lines
2276 bytes
Hi Urs,

> | >LIST ACTIVE alt.binaries.boneless
> | <215 newsgroups follow
> | <alt.binaries.boneless 2156785001 1527513710 y
> | <.
> | >GROUP alt.binaries.boneless
> | <211 268666284 1888118539 2156784822 alt.binaries.boneless
>
> a) lowmark from active differs from that in group response

Besides, for a non empty newsgroup, the low water mark MUST NEVER
decrease.  So there is a real bug if you send LIST ACTIVE after GROUP.


> b) they exceeded 2^31-1

And without advertising any new capability...

-- 
Julien ÉLIE

« Je ne cherche pas à connaître les réponses, je cherche à comprendre les questions. » 
Re: basic nntp connections question
#80632
Author: Urs Janßen
Date: Wed, 22 Apr 2009 08:40
61 lines
3291 bytes
In <gsmbpt$vrl$1@news.trigofacile.com>, Julien ÉLIE wrote:

> Besides, for a non empty newsgroup, the low water mark MUST NEVER
> decrease.  So there is a real bug if you send LIST ACTIVE after
> GROUP.

| > GROUP alt.binaries.boneless
| <  211 268660056 1888118768 2156778823 alt.binaries.boneless
                   ^^^^^^^^^^
| > LIST ACTIVE alt.binaries.boneless
| < 215 newsgroups follow
| < alt.binaries.boneless 2156778977 1527513710 y
| < .
| > QUIT

wait ~5 mins

| > GROUP alt.binaries.boneless
| < 211 268666284 1888118539 2156784822 alt.binaries.boneless
                  ^^^^^^^^^^
| > LIST ACTIVE alt.binaries.boneless
| < 215 newsgroups follow
| < alt.binaries.boneless 2156785001 1527513710 y

magic!

>> b) they exceeded 2^31-1
> 
> And without advertising any new capability...

they advertize (after successfull auth)
[...]
| < 281 News.GigaNews.Com
| > CAPABILITIES
| < 101 capability list
| < VERSION 2
| < READER
| < POST
| < LIST OVERVIEW.FMT ACTIVE ACTIVE.TIMES NEWSGROUPS
| < XFEATURE 1
| < XFEATURE-COMPRESS GZIP TERMINATOR
| < XFEATURE-METADATA BYTES
| < XFEATURES 1
| < .

but I couldn't find any infomation what those XFEATURE(s) are and how
to use them. my first guess was that XFEATURE-COMPRESS GZIP is
something like astrawebs XZVER (zlib compressed and then yenc-encoded
overview records):
<http://helpdesk.astraweb.com/index.php?_m=news&_a=viewnews&newsid=9>

| > XFEATURES
| < 390 send features
| > GZIP
Connection closed by foreign host.

urs
-- 
Jef Poskanzer:
"When people aren't stupid Usenet is even more useful. Too bad this happens
 so rarely."
Re: basic nntp connections question
#80648
Author: Curt Welch
Date: Wed, 22 Apr 2009 17:53
54 lines
4450 bytes
Julien_ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote:
> Hi Urs,
>
> > | >LIST ACTIVE alt.binaries.boneless
> > | <215 newsgroups follow
> > | <alt.binaries.boneless 2156785001 1527513710 y
> > | <.
> > | >GROUP alt.binaries.boneless
> > | <211 268666284 1888118539 2156784822 alt.binaries.boneless
> >
> > a) lowmark from active differs from that in group response
>
> Besides, for a non empty newsgroup, the low water mark MUST NEVER
> decrease.  So there is a real bug if you send LIST ACTIVE after GROUP.

Well, even if for a given server, the lower water mark MUST NEVER decrease,
newsreaders MUST (in practice) always be written to deal reasonably with a
decrease in either, or both, the low water mark and the high water mark.
There are many examples in real life where this happens.  It happens when
the servers get switched behind the scene to a new server, and the new
server has slightly (or completely) different article numbers. This is a
common problem when a service like an ISP decides to stop running their own
servers and outsource to someone else.  Changing the host name of the NNTP
server and forcing their entire customer base to reconfigure their
newsreader is not a reasonable solution in that case.

It also happens when you use multiple front-end servers, all with their own
view of high and low water marks, and which server you connect to each time
can be somewhat random.  When the front-end servers have hardware issues
and they fall behind on the updates, they will be out of sync with the
other front end servers, and newsreaders, connecting to one, and then
another moments later, will see high and low water marks go lower.

So even though news servers should, as best as possible, never expose to
the client a high water, or low water, mark that decreases, it does happen
in practice all the time, and newsreaders MUST be written to deal with it.

> > b) they exceeded 2^31-1
>
> And without advertising any new capability...

:)

They "advertised" it on their web site. :)

Our solution so far to the boneless problem has been to turn the group off.
Not a single user has yet complained. :)  The articles are still available
by Message-id using nzb indexes, but the group is simply not getting any
new articles at this point.  We will be going to 64 bit articles (probably
without advertising a capability) at some point.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: basic nntp connections question
#80651
Author: Julien ÉLIE
Date: Wed, 22 Apr 2009 18:14
57 lines
3171 bytes
Hi Urs,

> | < 281 News.GigaNews.Com
> | > CAPABILITIES
> | < 101 capability list
> | < VERSION 2
> | < READER
> | < POST
> | < LIST OVERVIEW.FMT ACTIVE ACTIVE.TIMES NEWSGROUPS
> | < XFEATURE 1
> | < XFEATURE-COMPRESS GZIP TERMINATOR
> | < XFEATURE-METADATA BYTES
> | < XFEATURES 1
> | < .

So they still do not implement OVER/HDR and go on using XOVER/XHDR.
OK.
Is tin using XOVER when CAPABILITIES is advertised and OVER is not?
Or is it switching to HEAD/ARTICLE etc.?


> but I couldn't find any infomation what those XFEATURE(s) are and how
> to use them. my first guess was that XFEATURE-COMPRESS GZIP is
> something like astrawebs XZVER (zlib compressed and then yenc-encoded
> overview records):
> <http://helpdesk.astraweb.com/index.php?_m=news&_a=viewnews&newsid=9>

Oh, that's interesting; I did not know about it.
It would be useful to have a page with pointers to such extensions.
Russ? :)

PDF here:
  https://helpdesk.astraweb.com/index.php?_m=news&_a=pdfexport&newsid=9


XZHDR header [range]
221 compressed data follows

225 would have been far better...


Incidentally, in compressed data, couldn't CRLF.CRLF happen?  (in theory)



> | > XFEATURES
> | < 390 send features
> | > GZIP
> Connection closed by foreign host.

It looks like it did not like your GZIP feature :)

-- 
Julien ÉLIE

« Je ne cherche pas à connaître les réponses, je cherche à comprendre les questions. » 
Re: basic nntp connections question
#80652
Author: Julien ÉLIE
Date: Wed, 22 Apr 2009 18:21
37 lines
2981 bytes
Hi Curt,

> Well, even if for a given server, the lower water mark MUST NEVER decrease,
> newsreaders MUST (in practice) always be written to deal reasonably with a
> decrease in either, or both, the low water mark and the high water mark.

In fact the low water mark MUST NEVER decrease in the *same* session.
And it SHOULD NEVER decrease between sessions.


> It also happens when you use multiple front-end servers, all with their own
> view of high and low water marks, and which server you connect to each time
> can be somewhat random.

Yeah, I assume it is what happens with Giganews.
However, how could we explain the decrease in the same session?  It looks
as though the active file and the overview are totally out of sync for
a given front-end.


> They "advertised" it on their web site. :)

And people pay for it, without documentation!


> The articles are still available
> by Message-id using nzb indexes, but the group is simply not getting any
> new articles at this point.

Because the article number cannot be stored by your news reader?  What does
it do?  (download the article and display it only?)

-- 
Julien ÉLIE

« Je ne cherche pas à connaître les réponses, je cherche à comprendre les questions. » 
Re: basic nntp connections question
#80657
Author: Urs Janßen
Date: Wed, 22 Apr 2009 19:00
15 lines
2138 bytes
In <gsnmu1$7v2$1@news.trigofacile.com>, Julien ÉLIE wrote:
> Is tin using XOVER when CAPABILITIES is advertised and OVER is not?

yes, if CAPABILITIES doesn't advertised OVER tries XOVER, if that
doesn't work it tries OVER, if that doesn't work it tries HEAD/NEXT.

> Incidentally, in compressed data, couldn't CRLF.CRLF happen?  (in theory)

IIRC yenc encodes CR and FL (and NULL).

urs
-- 
Jef Poskanzer:
"When people aren't stupid Usenet is even more useful. Too bad this happens
 so rarely."
Re: basic nntp connections question
#80658
Author: Curt Welch
Date: Wed, 22 Apr 2009 19:39
107 lines
7922 bytes
=?Windows-1252?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid>
> wrote: Hi Curt,
>
> > Well, even if for a given server, the lower water mark MUST NEVER
> > decrease, newsreaders MUST (in practice) always be written to deal
> > reasonably with a decrease in either, or both, the low water mark and
> > the high water mark.
>
> In fact the low water mark MUST NEVER decrease in the *same* session.
> And it SHOULD NEVER decrease between sessions.

Yeah, that look correct.  However, when witting a newsreader, you should be
very defensive in your coding and not assume the server, even in the same
session, will follow that rule.  It's the sort of thing you just want to
make sure that your newsreader doesn't blow up on if a second GROUP command
showed a lower value for the low-water mark, but not waste any time writing
code to deal with gracefully with it.

> > It also happens when you use multiple front-end servers, all with their
> > own view of high and low water marks, and which server you connect to
> > each time can be somewhat random.
>
> Yeah, I assume it is what happens with Giganews.
> However, how could we explain the decrease in the same session?  It looks
> as though the active file and the overview are totally out of sync for
> a given front-end.

Yeah, that's just a bug and I have no reason why their server is doing
that.  But it's a bug that's not that unusual in these days of high volume
distributed servers.  To work "correctly" all this server data has to be
maintained in one, and only one physical place.  In INN, the value in the
active file IS the master value for the high and low water marks.  Whether
the user is seeing the data from a group command or a list command, or
indirectly as the error status on article fetch commands, all those
commands are referencing the single master source of the information - the
value in the value (or it's single cached disk copy in memory). But for
large distributed servers, it becomes unreasonable to maintain all that
data in a single master location.  If you do it that way, you have
decreased reliability - when the machine that holds the low water mark for
a group dies, no one can access that group anymore.  To make the machines
more reliable, the data gets cloned across many machines, and some update
system is used to try and keep all the clones in sync.  This systems always
end up with soft-failure modes where the data is still available, but the
update system is effectively "broken" as as a result, the different copies
of the data get out of sync.

> > They "advertised" it on their web site. :)
>
> And people pay for it, without documentation!
>
> > The articles are still available
> > by Message-id using nzb indexes, but the group is simply not getting
> > any new articles at this point.
>
> Because the article number cannot be stored by your news reader?

Because our production servers don't support 64 bit articles and we didn't
want to take the option of renumbering the group.  We have a server that
supports 64 bit articles but we don't trust it enough to put it into
production yet.

> What does it do?  (download the article and display it only?)

Well, my web-based newsreader is the only one I support.  It doesn't
support 64 bit articles but that's not important.  No one uses it to try
and read boneless anyway.  It's just a problem of dealing with the 2^31
limit on the server that we are dealing with.  The server itself can't deal
correctly with article numbers greater than 2^31.

nzb files (in case you don't understand this) are indexes used for
multipart binaries. They list the message-id of all the articles that make
up the multipart posting.  There are multiple indexing sites on the web
that provide (or sell you) nzb index files for the stuff posted to Usenet.
If you can get an nzb file for a post, you don't have to download the
headers.  You just fetch the articles by Message-id, and then combine them
together/decode them to create your large DVD file (for example).

For the time being, we have disabled the front end servers from getting any
new header data for boneless, so the group is stuck with a high water mark
of something like 2^32-4.  But all the articles are still in our spool, and
can still be fetched by Message-ID.  So anyone using nzb files to fetch
multipart posts by Message-ID will still be able to get the articles.

boneless started (as I understand it) as dump group for users using the
Dutch FTD program.  That's a special Usenet client that maintained a
database of binary multipart postings separate from Usenet.  The client
accesses the custom FTD post database to find articles instead of
downloading headers and then fetches articles by message-id so it never
needs to know, or use, article numbers.  With such a system, it's no longer
important where you post the articles.   You could post everything to
alt.test (as long as the retention was as good in that group as others)
since using the external article index database makes the whole header and
newsgroup indexing system redundant.  boneless became a standard default
dump group to pose anything which was being indexed by FTD.  As a result,
it quickly became the single highest volume group on Usenet.  It's got such
a high volume (In a 10 second test I just now did, it grew by 625 articles
- aka 62 articles per second) it's nearly impossible (or just pointless) to
use it as a standard group by downloading headers and looking at to see
what was posted.  At that rate, we are talking 200K+ article each hour.
That's something like 150 Kbps 24x7 just to download the headers.  With a 5
Mbit connection, you have to download headers 46 minutes every day to keep
up with the group (assuming all my math here is correct and assuming my 10
second test was typical of the entire 24 hours).

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: basic nntp connections question
#80659
Author: Curt Welch
Date: Wed, 22 Apr 2009 19:57
35 lines
3421 bytes
Urs Janßen <urs@buil.tin.org> wrote:
> In <gsnmu1$7v2$1@news.trigofacile.com>, Julien ÉLIE wrote:
> > Is tin using XOVER when CAPABILITIES is advertised and OVER is not?
>
> yes, if CAPABILITIES doesn't advertised OVER tries XOVER, if that
> doesn't work it tries OVER, if that doesn't work it tries HEAD/NEXT.
>
> > Incidentally, in compressed data, couldn't CRLF.CRLF happen?  (in
> > theory)
>
> IIRC yenc encodes CR and FL (and NULL).
>
> urs

That's what the dot stuffing is for.

Even though the protocol was designed for sending text, it works fine for
sending pure binary as well. The only limitation is that the article must
end with CR LF.  Other than that, the rest of it can be pure 8 bit binary.
Any CR LF DOT CR LF that shows up in the data gets changed to CR LF DOT DOT
CR LF on transmit and reversed when received.

All modern servers should be 8 bit clean if at all possible. Though they
can choose to reject various binary articles as invalid if they choose
(lines too long, invalid line endings), they should be able to receive them
correctly if sent and if they choose to retransmit them, they should send
them exactly as received without making changes to the CRs and LFs in the
article.  If they can't retransmit them without changing them, they
shouldn't retransmit them - they should be rejected.  I don't know how this
issue is currently dealt with in the RFCs, but that's my view of how it
should be done.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: basic nntp connections question
#80661
Author: Julien ÉLIE
Date: Wed, 22 Apr 2009 20:37
36 lines
3067 bytes
Hi Curt,

> nzb files (in case you don't understand this) are indexes used for
> multipart binaries. They list the message-id of all the articles that make
> up the multipart posting.

In fact, it was not nzb files I did not understand but "boneless".  I thought
it was a noun describing a sort of articles which lacked something.
After a search, I see that it refers to alt.binaries.boneless and I now
understand better your comments on boneless!


> boneless started (as I understand it) as dump group for users using the
> Dutch FTD program.  That's a special Usenet client that maintained a
> database of binary multipart postings separate from Usenet.  The client
> accesses the custom FTD post database to find articles instead of
> downloading headers and then fetches articles by message-id so it never
> needs to know, or use, article numbers.  With such a system, it's no longer
> important where you post the articles.

I did not know such a system existed!  Thanks for the information.


> http://CurtWelch.Com/

% host curtwelch.com
curtwelch.com has address 10.1.1.11

Private IP.

-- 
Julien ÉLIE

« Pas besoin d'un grand dessin pour comprendre que les recettes
  du druide sont mal digérées par les Romains ! » (Astérix) 
Re: basic nntp connections question
#80662
Author: Julien ÉLIE
Date: Wed, 22 Apr 2009 20:42
45 lines
3342 bytes
Hi Curt,

> I don't know how this
> issue is currently dealt with in the RFCs, but that's my view of how it
> should be done.

It should be tackled in an NNTP extension.

Otherwise RFC 3977 states:

   A multi-line data block is used in certain commands and responses.
   It MUST adhere to the following rules:

   1.  The block consists of a sequence of zero or more "lines", each
       being a stream of octets ending with a CRLF pair.  Apart from
       those line endings, the stream MUST NOT include the octets NUL,
       LF, or CR.

[...]

   Note that texts using an encoding (such as UTF-16 or UTF-32) that may
   contain the octets NUL, LF, or CR other than a CRLF pair cannot be
   reliably conveyed in the above format (that is, they violate the MUST
   requirement above).  However, except when stated otherwise, this
   specification does not require the content to be UTF-8, and therefore
   (subject to that same requirement) it MAY include octets above and
   below 128 mixed arbitrarily.



And also note that RFC 5322 which deals with the Internet message format
mentions:

   Finally, certain characters that were formerly allowed in messages
   appear in this section.  The NUL character (ASCII value 0) was once
   allowed, but is no longer for compatibility reasons.

Amusing they now disallow them (it sounds like a regression).

-- 
Julien ÉLIE

« Pas besoin d'un grand dessin pour comprendre que les recettes
  du druide sont mal digérées par les Romains ! » (Astérix) 
Re: basic nntp connections question
#80667
Author: Russ Allbery
Date: Wed, 22 Apr 2009 21:20
22 lines
2518 bytes
curt@kcwc.com (Curt Welch) writes:

> Even though the protocol was designed for sending text, it works fine
> for sending pure binary as well. The only limitation is that the
> article must end with CR LF.

Which means that it's not fine for sending pure binary.  This is an
either/or sort of thing; I don't believe it's a good idea to say
something works fine when it can't deliver in a significant corner case.
There are protocol changes one could make that would give you *real*
binary transport, similar to the ones made for SMTP.

> All modern servers should be 8 bit clean if at all possible.

Modern servers are *required* to be 8-bit clean, but that's not the same
thing as binary-clean.  (The terms are defined in the MIME standards.)

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: basic nntp connections question
#80672
Author: Curt Welch
Date: Wed, 22 Apr 2009 23:50
41 lines
3561 bytes
=?Windows-1252?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid>
> wrote: Hi Curt,
>
> > nzb files (in case you don't understand this) are indexes used for
> > multipart binaries. They list the message-id of all the articles that
> > make up the multipart posting.
>
> In fact, it was not nzb files I did not understand but "boneless".  I
> thought it was a noun describing a sort of articles which lacked
> something. After a search, I see that it refers to alt.binaries.boneless
> and I now understand better your comments on boneless!

I figured there was something about what I said you didn't understand but I
wasn't sure what!

> > boneless started (as I understand it) as dump group for users using the
> > Dutch FTD program.  That's a special Usenet client that maintained a
> > database of binary multipart postings separate from Usenet.  The client
> > accesses the custom FTD post database to find articles instead of
> > downloading headers and then fetches articles by message-id so it never
> > needs to know, or use, article numbers.  With such a system, it's no
> > longer important where you post the articles.
>
> I did not know such a system existed!  Thanks for the information.
>
> > http://CurtWelch.Com/
>
> % host curtwelch.com
> curtwelch.com has address 10.1.1.11
>
> Private IP.

:)

It's a private web site!  Funny that it's still in my sig since it's been
off line for a few years now!  The intent was to get it back on-line at
some point but it has just not happened...

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: basic nntp connections question
#80673
Author: Curt Welch
Date: Thu, 23 Apr 2009 00:05
46 lines
4246 bytes
Russ Allbery <rra@stanford.edu> wrote:
> curt@kcwc.com (Curt Welch) writes:
>
> > Even though the protocol was designed for sending text, it works fine
> > for sending pure binary as well. The only limitation is that the
> > article must end with CR LF.
>
> Which means that it's not fine for sending pure binary.  This is an
> either/or sort of thing; I don't believe it's a good idea to say
> something works fine when it can't deliver in a significant corner case.
> There are protocol changes one could make that would give you *real*
> binary transport, similar to the ones made for SMTP.

I just meant that it's fine as is for transporting pure binary _streams_
embedded in the return value - not that entire binary _files_ could be
returned without some extra protocol to encapsulate it.

Of course, the "extra protocol to encapsulate it" need be nothing more than
"strip off the final CR LF" so the point is rather pointless to bring up
when talking about a custom NNTP command as we were.  NNTP article
transport is of course not a raw binary file transport and never has been
and never can be because not only must it end with CR LF it must have a
valid header which is clearly not arbitrary binary data.  You can't post a
jpg as an article and expect to to the transported because it doesn't have
a header with a Message-ID.  You also can't post it as the body alone
because of the training CR LF requirement.  It must be encapsulated using
some high level protocol.

The question here was not one of how or if binaries _files_ could be
transported by only binary _data_ could be transmitted using a custom
compressed header command.  We weren't talking about articles.

> > All modern servers should be 8 bit clean if at all possible.
>
> Modern servers are *required* to be 8-bit clean,

That's good to hear.

> but that's not the same
> thing as binary-clean.  (The terms are defined in the MIME standards.)

Does "binary-clean" in MIME mean "no trailing CR LF requirement"?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: basic nntp connections question
#80674
Author: Curt Welch
Date: Thu, 23 Apr 2009 00:21
72 lines
5275 bytes
=?Windows-1252?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid>
> wrote: Hi Curt,
>
> > I don't know how this
> > issue is currently dealt with in the RFCs, but that's my view of how it
> > should be done.
>
> It should be tackled in an NNTP extension.
>
> Otherwise RFC 3977 states:
>
>    A multi-line data block is used in certain commands and responses.
>    It MUST adhere to the following rules:
>
>    1.  The block consists of a sequence of zero or more "lines", each
>        being a stream of octets ending with a CRLF pair.  Apart from
>        those line endings, the stream MUST NOT include the octets NUL,
>        LF, or CR.
>
> [...]
>
>    Note that texts using an encoding (such as UTF-16 or UTF-32) that may
>    contain the octets NUL, LF, or CR other than a CRLF pair cannot be
>    reliably conveyed in the above format (that is, they violate the MUST
>    requirement above).  However, except when stated otherwise, this
>    specification does not require the content to be UTF-8, and therefore
>    (subject to that same requirement) it MAY include octets above and
>    below 128 mixed arbitrarily.
>
> And also note that RFC 5322 which deals with the Internet message format
> mentions:
>
>    Finally, certain characters that were formerly allowed in messages
>    appear in this section.  The NUL character (ASCII value 0) was once
>    allowed, but is no longer for compatibility reasons.
>
> Amusing they now disallow them (it sounds like a regression).

Yeah, I think the decision to regress was made in order to clean things up.

There are some nasty bugs that crept into Usenet because of the fact that
servers dealt with these issues differently.

A server should be able to correctly receive articles that have NUL and
lone CR or LFs but should not sent it to peers if it's following this new
formal approach.

There are are valid reasons to prevent CR or LF or NUL from showing up in
articles that get copied all over public Usenet (including over protocols
other than NNTP), there's absolutely no reason I know of (other than to
simplify the RFC itself) to put it in the spec as a requirement for ALL
command responses because there is absolutely no technical reasons to do
that. It's not like some versions of TCP can't transport a lone CR or a
NUL.

If you want to define a custom command that returns raw compressed 8 bit
binary data in some standard compression format and simply specify the
trailing CR LF is not part of the compressed data, there is no reason for
the standard to block that as an illegal extension.  All good IO routines
that read the data in news servers have to be written to support it
already.

All the spec should say about the return value (in my view) is that none of
the return values from any of the commands defined in the current RFC are
allowed to produce it.  It shouldn't attempt to block those three
characters from all possible extensions in my view.  The small context you
quoted above doesn't make it obvious what spec is trying say there but it
looks questionable to me.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: basic nntp connections question
#80675
Author: Russ Allbery
Date: Thu, 23 Apr 2009 00:23
24 lines
2765 bytes
curt@kcwc.com (Curt Welch) writes:
> Russ Allbery <rra@stanford.edu> wrote:

>> but that's not the same thing as binary-clean.  (The terms are
>> defined in the MIME standards.)

> Does "binary-clean" in MIME mean "no trailing CR LF requirement"?

Binary-clean means that it can handle arbitrary data with no encoding.
The additional requirements over 8-bit-clean is that it handle all
control characters, nuls, and not require line endings (which includes
no trailing CRLF at the end of the message).

Note, however, that in MIME one can only transport binary data when it
is the entirety of the body part.  The multipart/* MIME content types
cannot handle binary data since they rely on line boundaries for finding
the part boundary delimiters.  It's therefore impossible in MIME to
create a binary attachment without using a C-T-E of some kind.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: basic nntp connections question
#80677
Author: Russ Allbery
Date: Thu, 23 Apr 2009 00:26
24 lines
2755 bytes
curt@kcwc.com (Curt Welch) writes:

> There are are valid reasons to prevent CR or LF or NUL from showing up
> in articles that get copied all over public Usenet (including over
> protocols other than NNTP), there's absolutely no reason I know of
> (other than to simplify the RFC itself) to put it in the spec as a
> requirement for ALL command responses because there is absolutely no
> technical reasons to do that. It's not like some versions of TCP can't
> transport a lone CR or a NUL.

Yeah, NNTP doesn't do that.  The current standard provides a
specification of an article that doesn't contain NUL and has a proper
line ending and references that specification for the current commands
(POST, IHAVE, ARTICLE, etc.), but it doesn't require that to be the only
way that NNTP ever works.

We thought about a binary article extension at the time, and NNTP should
accomodate one designed similarly to the SMTP BINARY extension.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: basic nntp connections question
#80678
Author: Curt Welch
Date: Thu, 23 Apr 2009 00:31
27 lines
3187 bytes
Russ Allbery <rra@stanford.edu> wrote:
> curt@kcwc.com (Curt Welch) writes:
> > Russ Allbery <rra@stanford.edu> wrote:
>
> >> but that's not the same thing as binary-clean.  (The terms are
> >> defined in the MIME standards.)
>
> > Does "binary-clean" in MIME mean "no trailing CR LF requirement"?
>
> Binary-clean means that it can handle arbitrary data with no encoding.
> The additional requirements over 8-bit-clean is that it handle all
> control characters, nuls, and not require line endings (which includes
> no trailing CRLF at the end of the message).
>
> Note, however, that in MIME one can only transport binary data when it
> is the entirety of the body part.  The multipart/* MIME content types
> cannot handle binary data since they rely on line boundaries for finding
> the part boundary delimiters.  It's therefore impossible in MIME to
> create a binary attachment without using a C-T-E of some kind.

Is it possible in SMTP to transport a binary MIME message (binary body) or
does it have the same issue as NNTP has so it required C-T-E of some type
as well?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: basic nntp connections question
#80680
Author: Russ Allbery
Date: Thu, 23 Apr 2009 00:33
15 lines
2407 bytes
curt@kcwc.com (Curt Welch) writes:

> Is it possible in SMTP to transport a binary MIME message (binary
> body) or does it have the same issue as NNTP has so it required C-T-E
> of some type as well?

It's possible for SMTP servers implementing RFC 3030, which was what we
expected a future binary extension for NNTP to be modelled after
(although I don't know that NNTP will need the chunking bits).

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: basic nntp connections question
#80759
Author: Julien ÉLIE
Date: Sun, 26 Apr 2009 10:58
31 lines
2795 bytes
Hi Urs,

> | < 281 News.GigaNews.Com
> | > CAPABILITIES
> | < 101 capability list
> | < VERSION 2
> | < READER
> | < POST
> | < LIST OVERVIEW.FMT ACTIVE ACTIVE.TIMES NEWSGROUPS
> | < XFEATURE 1
> | < XFEATURE-COMPRESS GZIP TERMINATOR
> | < XFEATURE-METADATA BYTES
> | < XFEATURES 1
> | < .
>
> but I couldn't find any infomation what those XFEATURE(s) are and how
> to use them.

I have received an answer from Giganews about that.  Difficult to reach
their technical service (they wondered how I could have seen CAPABILITIES,
what was my account, where did it come from, if I was a competitor of
their service, etc.).  Anyway, they told me XFEATURE was still under
development and not yet activated.  When it is ready, detailed specifications
will show up through their news page at <http://www.giganews.com/news.html>.

-- 
Julien ÉLIE

« -- Nous voyageons plus vite que la lumière !
  -- Alors comment y voir clair dans tout ça ? » (Astérix) 
Re: basic nntp connections question
#81312
Author: Julien ÉLIE
Date: Sun, 07 Jun 2009 15:09
57 lines
2600 bytes
Hi Urs,

>> Broken implementation.
>
> it was worse a week ago
>
> | 101 capability list
> | VERSION 2
> | .
>
> (no MODE-READER or READER (or POST or IHAVE) and no AUTHNIFO)

I wrote them in April and they have just fixed that:

17:03 iulius@denver ~% telnet news.giganews.com 119
Trying 216.196.109.131...
Connected to news.giganews.com.
Escape character is '^]'.
200 News.GigaNews.Com
CAPABILITIES
101 capability list
VERSION 2
READER
AUTHINFO USER
..

That's great!
They understood what READER means (feeder/reader).



AUTHINFO USER a
381 more authentication required
AUTHINFO PASS b
481 Invalid username or password

Fixed too.



But unfortunately not this one (which should answer 501):

CAPABILITIES a
101 capability list
VERSION 2
READER
AUTHINFO USER
..

-- 
Julien ÉLIE

« Je fais souvent ce rêve étrange et pénétrant
  D'une femme inconnue, et que j'aime, et qui m'aime,
  Et qui n'est, chaque fois, ni tout à fait la même
  Ni tout à fait une autre, et m'aime et me comprend. » (Paul Verlaine)
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