🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87525

Re: Multiple occurences of header fields

#87525
From: Julien ÉLIE
Date: Mon, 05 Sep 2016 20:49
113 lines
5972 bytes
Hi Adam,

>>>> => This check is currently not done.  I suggest to do nothing about it
>>>> because it will otherwise probably do harm when receiving
>>>> "internationalized" header fields (for instance encoded in UTF-8).
>>
>> The problem with such a check is that INN would reject current valid
>> articles.  We already have UTF-8 chars in wide in a few circumstances,
>> especially for internationalized newsgroup names.
>
> I guess you could check the other fields.

If a deployed version of a news server rejects articles containing UTF-8 
for instance in the Subject: header field, it will be problematic when 
(and if) we standardize internationalized Netnews headers.
Such deployed versions would incorrectly reject those articles.

See for instance RFC 6532 that already does that for Email headers. 
We'll probably do a similar thing one day for Netnews.

Abstract of RFC 6532:

    Internet mail was originally limited to 7-bit ASCII.  MIME added
    support for the use of 8-bit character sets in body parts, and also
    defined an encoded-word construct so other character sets could be
    used in certain header field values.  However, full
    internationalization of electronic mail requires additional
    enhancements to allow the use of Unicode, including characters
    outside the ASCII repertoire, in mail addresses as well as direct use
    of Unicode in header fields like "From:", "To:", and "Subject:",
    without requiring the use of complex encoded-word constructs.  This
    document specifies an enhancement to the Internet Message Format and
    to MIME that allows use of Unicode in mail addresses and most header
    field content.



>> INN currently does not check anything about the References: header
>> field.
>
> How about a check for strings in Message-ID syntax?

Are there still such Message-IDs generated nowadays?

I know that Appendix A.2 of RFC 3977 mentions them:

    This specification states that message-ids are the same if and only
    if they consist of the same sequence of octets.  Other specifications
    may define two different sequences as being equal because they are
    putting an interpretation on particular characters.  RFC 2822
    [RFC2822] has a concept of "quoted" and "escaped" characters.  It
    therefore considers the three message-ids:

       <ab.cd@example.com>
       <"ab.cd"@example.com>
       <"ab.\cd"@example.com>

    as being identical.  Therefore, an NNTP implementation handing email
    articles must ensure that only one of these three appears in the
    protocol and that the other two are converted to it as and when
    necessary, such as when a client checks the results of a NEWNEWS
    command against an internal database of message-ids.  Note that
    RFC 1036 [RFC1036] never treats two different strings as being
    identical.  Its successor (as of the time of writing) restricts the
    syntax of message-ids so that, whenever RFC 2822 would treat two
    strings as equivalent, only one of them is valid (in the above
    example, only the first string is valid).



I think we can check that for the Message-ID: header field, as INN 
already does (nnrpd will reject <"ab.cd"@example.com>).  I am unsure it 
will change anything to enforce that in the References: header field. 
It does no harm if a quoted message-ID is mentioned there, doesn't it?
I fear enforcing that rules for the References: header field would be 
counter-productive and prevent people from actually posting articles. 
They usually cannot change that automatically added header field to 
their post.

If I post a message with an invalid message-ID, you wouldn't be able to 
answer me!



> Here's something I don't know: How does a News server or newsreader
> learn of valid distributions? Is there a a file that a newsreader
> would typically download?

I do not know such a file that a news reader or a news server would 
download.
A news admin may provide a list of distributions he wishes to advertise, 
but there is no obligation.  See how LIST DISTRIBUTIONS and LIST 
DISTRIB.PATS work (RFC 6048).

LIST DISTRIBUTIONS
215 Distributions in form "distribution description"
fr           Local to France.
trigofacile  Local distribution.
..

LIST DISTRIB.PATS
215 Default distributions in form "weight:group-pattern:distribution"
10:trigofacile.test:trigofacile
..

-- 
Julien ÉLIE

« – Par Toutatis ! On tire encore sur nous !
   – Nous sommes au dessus de Tyr.
   – Alors tirons-nous vite ! » (Astérix)

Technical Details
Message-ID: <nqkln7$b1m$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
References: <2116899503.484444288.248931.dunno-dunno.dunno@news.mixmin.net> <ni2afm$96b$1@news.trigofacile.com> <nqhfo8$nvl$1@news.albasani.net> <nqhtcb$8h7$1@news.trigofacile.com> <nqi262$oj3$1@news.albasani.net>

Show Full Headers
Complete Article Headers
Message-ID: <nqkln7$b1m$1@news.trigofacile.com>
Subject: Re: Multiple occurences of header fields
Date: Mon, 5 Sep 2016 22:49:04 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <2116899503.484444288.248931.dunno-dunno.dunno@news.mixmin.net> <ni2afm$96b$1@news.trigofacile.com> <nqhfo8$nvl$1@news.albasani.net> <nqhtcb$8h7$1@news.trigofacile.com> <nqi262$oj3$1@news.albasani.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 5 Sep 2016 20:48:39 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="2a01cb080103c80039f4a606e2a4ce74.ipv6.abo.wanadoo.fr:2a01:cb08:103:c800:39f4:a606:e2a4:ce74";
 logging-data="11318"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0)
 Gecko/20100101 Thunderbird/45.2.0
In-Reply-To: <nqi262$oj3$1@news.albasani.net>
X-Received-Bytes: 5866
X-Received-Body-CRC: 24926928