πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #89648

Re: How to permit user to set the right part of message-id

#89648
From: Russ Allbery
Date: Fri, 23 Sep 2022 15:21
60 lines
4177 bytes
Julien Γ‰LIE <iulius@nom-de-mon-site.com.invalid> writes:

> Do you think we should improve the generation of Message-IDs?  They're
> currently based on the date, PID and a counter incrementing at each
> call.  A quick improvement could be to also add for instance 6 bytes
> from RAND_bytes() if OpenSSL support is available (which is most often
> the case I believe).

Yeah, something like that is a good idea, I think.

INN's current algorithm is sort of interesting in that under most
circumstances it will guarantee (as opposed to make probabilistically
likely) unique message IDs, but only if the FQDN is unique.  And it does
that at the cost of using a global static variable, which is usually
considered poor code, although INN uses static variables all over the
place so it doesn't really matter.

In theory, tossing the counter and the PID and replacing both with eight
random bytes is better, since it doesn't rely as heavily on the uniqueness
of the right-hand side.  In practice, it feels weird because we're giving
up designed uniqueness for probability!  But it's probably still the right
thing to do.

I think this is the only use of the Radix32() function in INN as well,
which doesn't assume that message IDs are case-sensitive.  I see that we
were worried about case-insensitive matching on message IDs when we wrote
5536.  That's unfortunate, since if you assume case-sensitivity, like I
did in my other message, you could make the message ID a lot shorter.

> Yes, servername looks like an appropriate name.  It will be a useful
> improvement for the next major release.  I propose to also have a
> servername parameter in inn.conf as inews generates Message-IDs (and
> currently uses the value of the domain parameter in inn.conf).  And the
> value of servername can be overriden in readers.conf.

Ah, yes, I forgot about inews.

One interesting wrinkle here: if serverhost and pathhost are set to
different things, it's unclear what should go into Injection-Info.  It
looks like we never said.  The ABNF grammar says it's a path-identity,
which sort of implies it should be pathhost, but the grammar of course is
identical for both elements.

I suspect the right way to think of it is that serverhost is the identity
of nnrpd and pathhost is the identity of innd, so it should be serverhost.
(This is probably most interesting in the unusual configuration where you
have a farm of nnrpd servers on different hosts all feeding into a central
innd.)

> The default value of servername in inn.conf (optional parameter) would
> then be pathhost (mandatory to set in inn.conf).

Yup, that sounds right.  99% of the time you're probably going to want to
set them to the same thing.

-- 
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: <878rmaf75b.fsf@hope.eyrie.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <632790d3$0$22052$426a74cc@news.free.fr> <argle-bargle@argle.bargle.xyz> <63279bd2$0$22055$426a74cc@news.free.fr> <87h7148aq4.fsf@hope.eyrie.org> <6328a840$0$2976$426a74cc@news.free.fr> <tgaje6$6pa5$1@news.trigofacile.com> <6328dcc9$0$5132$426a74cc@news.free.fr> <tganq1$6pa5$2@news.trigofacile.com> <87y1ufxary.fsf@hope.eyrie.org> <tgc30j$7s0o$4@news.trigofacile.com> <87sfkmxcsj.fsf@hope.eyrie.org> <tgfttk$2enqk$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <878rmaf75b.fsf@hope.eyrie.org>
Subject: Re: How to permit user to set the right part of message-id
Date: Fri, 23 Sep 2022 08:21:52 -0700
From: Russ Allbery <eagle@eyrie.org>
References: <632790d3$0$22052$426a74cc@news.free.fr> <argle-bargle@argle.bargle.xyz> <63279bd2$0$22055$426a74cc@news.free.fr> <87h7148aq4.fsf@hope.eyrie.org> <6328a840$0$2976$426a74cc@news.free.fr> <tgaje6$6pa5$1@news.trigofacile.com> <6328dcc9$0$5132$426a74cc@news.free.fr> <tganq1$6pa5$2@news.trigofacile.com> <87y1ufxary.fsf@hope.eyrie.org> <tgc30j$7s0o$4@news.trigofacile.com> <87sfkmxcsj.fsf@hope.eyrie.org> <tgfttk$2enqk$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: hope.eyrie.org; logging-data="16559"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:xmwrREEVSanGRxcH2lSZ7nnr1+Q=