🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
10 messages
10 total messages Started by Franck Sat, 07 Nov 2020 06:57
Headers that exceed the length of 998 characters.
#88509
Author: Franck
Date: Sat, 07 Nov 2020 06:57
18 lines
1810 bytes
Hello,

I see some articles with headers that exceed the length of 998 
characters, imposed by the protocol (mainly the 'References' header).

For the moment I accept these articles but I am moving them to "junk" 
because they do not fully comply with the protocol.

What do you think is the best thing to do for a server?

- Accept the non-compliant article and place it in the right newsgroup(s),
- Accept the non-compliant article and place it in 'junk',
- Reject the article.

INN seems to accept this kind of articles as I see some of them passing 
by. Is it fixed or an option in its configuration?

Thank you in advance for your answers.
Re: Headers that exceed the length of 998 characters.
#88510
Author: news
Date: Sat, 07 Nov 2020 18:52
22 lines
1679 bytes
Franck <my@mail.is.invalid> wrote:
> I see some articles with headers that exceed the length of 998 
> characters, imposed by the protocol (mainly the 'References' header).
> 
> For the moment I accept these articles but I am moving them to "junk" 
> because they do not fully comply with the protocol.
> 
> What do you think is the best thing to do for a server?
> 
> - Accept the non-compliant article and place it in the right newsgroup(s),
> - Accept the non-compliant article and place it in 'junk',
> - Reject the article.

My opinion is that the first option is probably best. (The user might not
know what went wrong if the second option is used, it would seem to me.
Or maybe I am wrong; you can tell me if you think that I made a mistake.)

For long threads, the References header might be very long.

-- 
This signature intentionally left blank.
(But if it has these words, then actually it isn't blank, isn't it?)
Re: Headers that exceed the length of 998 characters.
#88512
Author: Julien ÉLIE
Date: Sat, 07 Nov 2020 22:57
36 lines
2473 bytes
Hi Franck,

> I see some articles with headers that exceed the length of 998 
> characters, imposed by the protocol (mainly the 'References' header).
> 
> What do you think is the best thing to do for a server?
> 
> - Accept the non-compliant article and place it in the right newsgroup(s),
> - Accept the non-compliant article and place it in 'junk',
> - Reject the article.

Note that RFC 5536 does not mention any length limit for the References 
header field.  Section 3.4.4 of RFC 5537 states that a posting agent 
MUST trim the References header field when generating it.  Then 
injecting agents MUST reject articles not syntactically correct with RFC 
5536.

So I believe such articles are conformant for injection, relaying and 
serving.



> INN seems to accept this kind of articles as I see some of them passing 
> by. Is it fixed or an option in its configuration?

This is not configurable.
Indeed, INN accepts the injection (nnrpd) and relaying (innd) of such 
articles.
And mailpost, a utility shipped with INN, and acting as a posting agent, 
correctly trims References header fields :-)

-- 
Julien ÉLIE

« Un ami fidèle qui parle très bien votre langue et toutes les langues
   vivantes : le latin, le grec, le celte, etc. » (Astérix)
Re: Headers that exceed the length of 998 characters.
#88511
Author: Franck
Date: Sun, 08 Nov 2020 05:10
37 lines
2825 bytes
Le 07/11/2020 à 23:57, Julien ÉLIE a écrit :

Hello Julien,

> Note that RFC 5536 does not mention any length limit for the References 
> header field.  Section 3.4.4 of RFC 5537 states that a posting agent 
> MUST trim the References header field when generating it.  Then 
> injecting agents MUST reject articles not syntactically correct with RFC 
> 5536
 >
 > So I believe such articles are conformant for injection, relaying and
 > serving.
 >

Of course, I already knew that there was no limit on the size of a 
header (by folding it into lines of a maximum of 998 characters, except 
for encoded headers which would have to be folded into lines of 76 
characters, for reading purposes).

But you did well to remind me of this RFC (!) since a slower reading 
would have allowed me not to miss the "BUT MAY ACCEPT" of this 
precaunisation: "Compliant software MUST NOT generate (but MAY accept) 
header field lines of more than 998 bytes".

Currently, I reject badly formed articles during a POST with an error 
message such as: 441 posting failed, 'NameOfHeader' header is too long.

My question, and it's a mistake not to have specified it, was about a 
client who uses the IHAVE command (a feed) and who offers me an article, 
already injected despite it being badly formed (The "References" exceed 
998 characters beacause it is not folded), like this one :

Message-ID: <05fe2d84-ce15-4a89-8d4a-a2046003d154n@googlegroups.com>


I therefore consider that the "BUT MAY ACCEPT" will remain what I have 
to remember? Right?
Re: Headers that exceed the length of 998 characters.
#88513
Author: Franck
Date: Sun, 08 Nov 2020 06:46
23 lines
2317 bytes
Le 08/11/2020 à 06:10, Franck a écrit :

> Message-ID: <05fe2d84-ce15-4a89-8d4a-a2046003d154n@googlegroups.com>

In this article, the header 'References' has a length of 1642 characters 
and should have been folded to comply with RFC 5322.

https://tools.ietf.org/html/rfc5322#section-2.2.3

In the same way, if you look article <ro7hlp$jaf$1@gioia.aioe.org>, you 
will see that 'References' is correctly folded BUT at least one line of 
the body has a length of more than 998 characters, which goes against 
the second limit imposed by RFC 5322.

https://tools.ietf.org/html/rfc5322#section-2.3

So, my question was here. Does a server have to accept articles that do 
not comply with certain RFCs without considering them as "junk" (Either 
by using the POST command or the IHAVE command)?

Except if I have to deal with the "but MAY accept" from RFC5536 
(Compliant software MUST NOT generate (but MAY accept) header field 
lines of more than 998 octets) did I miss something?
Re: Headers that exceed the length of 998 characters.
#88514
Author: Franck
Date: Sun, 08 Nov 2020 07:21
37 lines
2543 bytes
Hello,

> My opinion is that the first option is probably best. (The user might not
> know what went wrong if the second option is used, it would seem to me.
> Or maybe I am wrong; you can tell me if you think that I made a mistake.)

When client use the POST command, it can be warned by sending a 441 
reply code with the reason, like this :

441 posting failed ('References' header is too long).

In this case, I only accept article POSTed by compliant software 
(because RFC 5536 say that "a compliant software MUST NOT generate 
header field lines of more than 998 octets).

In the other hand, the same RFC say that a compliant software (There is 
no mention if it's a server or a news reader) MAY accept them.

So? Witch is better? Accept, move to junk, reject?

---

When client use the IHAVE command (a feed) or ARTICLE (a suck feed), 
it's différent because article was already injected even if the 998/78 
character limitations per line is not respected (no folding used).

So? Witch is better? Accept, move to junk, reject?

> For long threads, the References header might be very long.

In this case, it MUST be folded.


I think I will accept the articles without moving them to 'junk' as a 
compliant 'news reader' MAY accept them...

Re: Headers that exceed the length of 998 characters.
#88516
Author: // My2Cents
Date: Sun, 08 Nov 2020 07:31
14 lines
1835 bytes
Hello,


> When client use the IHAVE command (a feed) or ARTICLE (a suck feed), 
> it's différent because article was already injected even if the 998/78 
> character limitations per line is not respected (no folding used).

You have to read :

When client use the IHAVE command (a feed) or a server use ARTICLE to 
suck news from another server (suck feed), it's different because 
article was already injected even if the 998/78 character limitations 
per line is not respected (no folding used).
Re: Headers that exceed the length of 998 characters.
#88515
Author: Julien ÉLIE
Date: Sun, 08 Nov 2020 08:54
43 lines
3114 bytes
Bonjour Franck,

> In this article, the header 'References' has a length of 1642 characters 
> and should have been folded to comply with RFC 5322.
[...]
> In the same way, if you look article <ro7hlp$jaf$1@gioia.aioe.org>, you 
> will see that 'References' is correctly folded BUT at least one line of 
> the body has a length of more than 998 characters, which goes against 
> the second limit imposed by RFC 5322.
[...]
> So, my question was here. Does a server have to accept articles that do 
> not comply with certain RFCs without considering them as "junk" (Either 
> by using the POST command or the IHAVE command)?

When using POST for injection, a server should reject a malformed 
article.  Once injected, relaying with IHAVE should be done.  I do not 
believe such articles should be considered as "junk".


RFC 5537:

3.1.  General Principles

    There are two important principles that news implementors and
    administrators need to keep in mind.  The first is the well-known
    Internet Robustness Principle:

       Be liberal in what you accept, and conservative in what you send.

    As applied to Netnews, this primarily means that unwanted or non-
    compliant articles SHOULD be rejected as early as possible, but once
    they are in general circulation, relaying and serving agents may wish
    to accept them where possible rather than lose information.  Posting
    agents and injecting agents SHOULD therefore be maximally strict in
    their application of both this protocol and [RFC5536], and reading
    agents SHOULD be robust in the presence of violations of the Netnews
    article format where possible.

-- 
Julien ÉLIE

« Le sel de l'existence est essentiellement dans le poivre qu'on y
   met. » (Alphonse Allais)
Re: Headers that exceed the length of 998 characters.
#88517
Author: Franck
Date: Sun, 08 Nov 2020 12:29
27 lines
2601 bytes
Le 08/11/2020 à 09:54, Julien ÉLIE a écrit :

> When using POST for injection, a server should reject a malformed 
> article.  Once injected, relaying with IHAVE should be done.  I do not 
> believe such articles should be considered as "junk".

In fact, until now I used to accept and move them into the "junk" 
newsgroup because I was wondering what was the best action to take.

> RFC 5537: 
>        Be liberal in what you accept, and conservative in what you send.

That's the best answer you could give me!

>     As applied to Netnews, this primarily means that unwanted or non-
>     compliant articles SHOULD be rejected as early as possible, but once
>     they are in general circulation, relaying and serving agents may wish
>     to accept them where possible rather than lose information.  Posting
>     agents and injecting agents SHOULD therefore be maximally strict in
>     their application of both this protocol and [RFC5536], and reading
>     agents SHOULD be robust in the presence of violations of the Netnews
>     article format where possible.

So, no matter how much we read them, often the answers are in the RFCs!

Thanks Julien!
Re: Headers that exceed the length of 998 characters.
#88519
Author: Julien ÉLIE
Date: Sun, 08 Nov 2020 13:35
25 lines
2070 bytes
Bonjour Franck,

>> RFC 5537: Be liberal in what you accept, and conservative in 
>>           what you send.
> 
> That's the best answer you could give me!

You're welcome :)



> So, no matter how much we read them, often the answers are in the RFCs!

Another pretty useful document to read is that Internet Draft:
   https://tools.ietf.org/html/draft-ietf-usefor-useage-01

Unfortunately, USEAGE did not reach the RFC status like USEFOR (5536) 
and USEPRO (5537) because of lack of time and energy after all the NNTP 
and article format standardization at that time, but is really 
worthwhile reading.

-- 
Julien ÉLIE

« Sol lucet omnibus. »
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