🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #89331

Re: Relay : List of headers that should appear only once in an article?

#89331
From: Russ Allbery
Date: Sun, 15 May 2022 16:31
71 lines
3266 bytes
Franck <my@mail.is.invalid> writes:

> When RELAYING an article, I am currently only testing the unicity of a
> few headers that are useful for the relay but I would like to do better.

> Is there an exhaustive list of headers that should only appear once that
> I could test when receiving an article in a server to server exchange?

It is to some degree up to you.  Relaying agents are allowed to be strict
about RFC 5536 compliance, or they're allowed to relay messages that don't
follow the standard but can still be processed.

I think it's generally better for Usenet to be fairly strict, but the
minimum is probably the headers that have direct protocol effect and which
therefore make the article ambiguous in ways that affect relaying if there
are duplicate headers, namely:

    Control
    Date
    Distribution
    Injection-Date
    Message-ID
    Newsgroups
    Path
    Supersedes

Not directly affecting relaying, but still probably nonsensical if
duplicated and thus probably worth rejecting because readers or serving
agents won't be able to make sense of the article if they're duplicated,
are:

    Archive
    Content-Transfer-Encoding
    Content-Type
    Expires
    Followup-To
    Injection-Info
    MIME-Version
    References

RFC 5536 also requires all of the following headers occur at most once:

    Approved
    Lines
    Organization
    Summary
    User-Agent
    Xref

but duplication is unlikely to cause major practical problems (although
some servers may honor Lines instead of count lines for themselves and get
confused, and duplicated Xref headers would cause serious problems when
copying article numbers from another server).

I may be forgetting some of the MIME headers since I didn't refresh my
memory from the relevant RFCs.

In some cases it's arguable that the article is still sensible if the
header is duplicated but both copies of the header have the same value
(the most common duplication error in my experience), but it's still
technically invalid to duplicate them.

The list in innd/innd.c controls what headers are exposed to posting
filters, so is sort of absurdly long and includes all kinds of things that
probably aren't directly relevant.

-- 
Russ Allbery (eagle@eyrie.org)             <https://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <https://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <87pmke7o5k.fsf@hope.eyrie.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!apf2.newsdeef.eu!not-for-mail
References: <6280a4d0$0$18038$426a74cc@news.free.fr>

Show Full Headers
Complete Article Headers
Message-ID: <87pmke7o5k.fsf@hope.eyrie.org>
Subject: Re: Relay : List of headers that should appear only once in an article?
Date: Sun, 15 May 2022 09:31:51 -0700
From: Russ Allbery <eagle@eyrie.org>
References: <6280a4d0$0$18038$426a74cc@news.free.fr>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!apf2.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org; logging-data="8903"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:vvAWnSV3YfLjv6wR2w8DHj6fYjk=