Article View: news.software.readers
Article #263503Re: 80 character header limits?
From: VanguardLH
Date: Thu, 28 Mar 2019 06:27
Date: Thu, 28 Mar 2019 06:27
159 lines
8414 bytes
8414 bytes
Michael Bรคuerle wrote:
> Eli the Bearded wrote:
>> In news.software.readers, VanguardLH <V@nguard.LH> followed up to me:
>>>
>>> [...]
>>> As for the References header, *yes*, it can be and must often get
>>> folded; i.e., it may be a multi-line header.
>
> According to RFC 5536 [1] it can be folded (as part of CFWS).
> But such folding is never required because of the length limit,
> see below.
>
>> This is totally against what I have seen in practice and seen
>> "documented" by Usenet posts. Consider:
>>
>> https://groups.google.com/d/msg/news.software.misc/AeLPuWntcgM/lEx8p-TtRKYJ
>>
>> Posted to news.software.misc in the year 2000, Johnny Favorite wrote:
>> It gets trickier if the header gets really long. You're not
>> supposed to create a references header that's longer than 998 chars,
>> contains more than 20 message IDs, or is "line-folded." Of course
>> some newsreaders do anyway but it's not good form. What I do in my
>> newsreader is always keep the root-level message ID no matter what
>> so that it's possible to group together all messages that belong in
>> the same thread. If References is too long in a message I'm
>> creating I start peeling them off at the second ID until I get it
>> down to a max 20 IDs and 998 chars.
>
> This was later named "trimming".
>
>> Note that the original RFC1036 doesn't mention folding vis-a-vis
>> References:, but does talk about editing it when it gets "too long",
>> which sounds to me like an implied "it's a single line" rule. At the end
>> of section "2.2.5. References":
>>
>> It is permissible to not include the entire previous "References"
>> line if it is too long. An attempt should be made to include a
>> reasonable number of backwards references.
>
> RFC 1036 is obsolete since a decade. The current RFC 5537 [2] says:
>|
>| If the resulting References header field would, after unfolding,
>| exceed 998 characters in length (including its field name but not the
>| final CRLF), it MUST be trimmed (and otherwise MAY be trimmed).
>| Trimming means removing any number of message identifiers from its
>| content, except that the first message identifier and the last two
>| MUST NOT be removed.
>
> The algorithm above ("peeling them off at the second ID [...]") is fully
> compliant.
>
>>> [...]
>> Since you've prompted me to consult the RFCs, 821 has 1000 octets as
>> the limit and includes the CRLF in that, hence 998.
>>
>>> https://tools.ietf.org/html/rfc5536
>>> Section 3.1.1 - Message-ID
>>> "The <msg-id> MUST NOT be more than 250 octets in length."
>>
>> That's interesting. How do they expect you to generate message IDs if
>> you go for the longest RFC1034 allowed domain name?
>>
>> To simplify implementations, the total number of octets that represent a
>> domain name (i.e., the sum of all label octets and label lengths) is
>> limited to 255.
>>
>> Length: "?" (63)
>> Label: this-is-label-is-63-octets-in-length-label-rfc-1034-dns-maximum
>> Accumulated-length: 64
>> Length: "?" (63)
>> Label: this-is-label-is-63-octets-in-length-label-rfc-1034-dns-maximum
>> Accumulated-length: 128
>> Length: "?" (63)
>> Label: this-is-label-is-63-octets-in-length-label-rfc-1034-dns-maximum
>> Accumulated-length: 192
>> Length: "?" (63)
>> Label: this-is-label-is-63-octets-in-length-label-rfc-1034-dns-maximum
>> Accumulated-length: 192
>> Length: "7" (57)
>> Label: now-this-unexpected-a-label-only-57-octets-to-fit-dot-com
>> Length: \03 (3)
>> Label: com
>> Accumulated-length: 254
>> Final-root: \01
>> Accumulated-length: 255
>
> You simply can't use such a domain name to create a valid RFC 5536
> Message-ID (such long domain names should be an academic case anyway).
>
>>> [...]
>>> I consider use of the FollowUp-To header to be rude. You chose to post
>>> to multiple groups to enlarge your audience but then you rudely yank
>>> away the discussion to your personally favorite group(s) which users in
>>> the other newsgroups may not and likely do not visit. There are few
>>> examples of where FollowUp-To is appropriate, like spam exhibits posted
>>> in one newsgroup but discussions about them are in another newsgroup;
>>> i.e., don't taint the exhibit group with the discussion group.
>>
>> As a long-ago moderator, I'll also say that follow-ups to non-moderated
>> groups is one good exception. It was also typical of FAQs to have a home
>> group for follow-ups even if posted to several. I will make a point of
>> using follow-ups to direct traffic where I think it is appropriate when
>> I join a thread with too many. I always include a comment when adding
>> such a header.
>
> I use Xpost and Followup-To for announcements. Normally they should only
> be informative (not for discussion), but if somebody has a question the
> Followup-To should be used.
> Yes, I read all groups that I Xpost to and the Followup-To is just my
> suggestion for a potential discussion (e.g. if one of the groups is
> from the german hierarchy, I think this group is not a good place for
> discussion because there are likely more people that speak english than
> german).
>
> __________________
> [1] <https://tools.ietf.org/html/rfc5536#section-3.2.10>
> [2] <https://tools.ietf.org/html/rfc5537#section-3.4.4>
I looked at RFC 5322 on the Message-ID header. In section , the msg-id
definition doesn't specify the maximum size of the id-left and id-right
tokens, as in <id-left@id-right>. The RFC says msg-id is a limited form
of the addr-spec token, so I looked at that in section 3.4. Still no
mention of maximums for the local-part and domain tokens, as in
<local-part@domain>.
With no specified maximums in the RFC, it seems a Message-ID's value
could be up to 986 characters long:
Message-ID: <id-left@id-right>
\_12 chars_/\___986 chars____/
\__________998 chars_________/
If you are correct that the unrolled maximum length for the References
header is still 998 characters, then its value's maximum length is also
986 characters, as in:
References: {message-id-list}
\_12 chars_/\___986 chars___/
\__________998 chars________/
If a troll used an excessily long msg-id of 986 characters, that means
the References header could contain only 1 Message-ID value, which must
the parent of an entire subthread. The subthread could be quite deep,
but a troll's reply with the excessively long msg-id would have its
References header pointing to the upmost parent of a [sub]thread.
Although a reply, the article would get threaded under the first article
in the thread. The troll doesn't need to use a 986-character msg-id
value. It could be 200 characters long and after a few replies by the
troll the threading gets screwed up due to truncating the References
header.
What limits, if anything, the maximum length of the Message-ID header's
value (the msg-id value)? While the domain token may be limited to 255
octets, what limits the length of the local-part or id-left tokens? On
just the 255 limit on the domain or id-right tokens, it wouldn't take
many replies by a poster with such a hugely long token to end up causing
References to get truncated (trimmed) to screw up the threading with
just a 998-char limit on the header length.
Technical Details
Message-ID:
<3jqehvxw2xcx.dlg@v.nguard.lh>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mailReferences:
<c18onk.9d4.19.1@news.alt.net> <eli$1903011515@qaz.wtf> <1brxy36ifclri.dlg@v.nguard.lh> <eli$1903020051@qaz.wtf> <AABceojHSbgAAAnn.A1.flnews@Server4.micha.freeshell.org>Show Full Headers
Complete Article Headers
Message-ID: <3jqehvxw2xcx.dlg@v.nguard.lh> Subject: Re: 80 character header limits? Date: Thu, 28 Mar 2019 01:27:06 -0500 From: VanguardLH <V@nguard.LH> References: <c18onk.9d4.19.1@news.alt.net> <eli$1903011515@qaz.wtf> <1brxy36ifclri.dlg@v.nguard.lh> <eli$1903020051@qaz.wtf> <AABceojHSbgAAAnn.A1.flnews@Server4.micha.freeshell.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail Newsgroups: news.software.readers Organization: Usenet Elder Lines: 159 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Trace: individual.net K310eAo8UNi1JpiU1YJKGgKU2mHfZ0YEa5q2Dnl5wVxoMr/vXT Keywords: VanguardLH VLH811 Cancel-Lock: sha1:qtDHWsBWo11zRBHsOnlYvyTv5dc= User-Agent: 40tude_Dialog/2.0.15.41 X-Received-Bytes: 8256 X-Received-Body-CRC: 1448293877