πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #89637

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

#89637
From: Russ Allbery
Date: Tue, 20 Sep 2022 15:53
105 lines
6073 bytes
Julien Γ‰LIE <iulius@nom-de-mon-site.com.invalid> writes:

> Digging in the archives, I found out this message:

> https://lists.isc.org/mailman/htdig/inn-workers/1999-September/000423.html

> """
> Suppose you've got a news farm of twenty-odd
> machines hiding behind news.example.com.  You probably want just
> news.example.com in e-mail addresses, but if you use that for message ID
> generation as well, doesn't that then run a non-trivial risk of duplicate
> message IDs?

> The reason to use the FQDN is so that you can be fairly sure no other
> system is generating message IDs in the same namespace....
> """

Ah, hm.  Yes, INN's mesage ID generation algorithm is not great and we
could indeed get duplicates if multiple hosts are using the same
right-hand side.

> Besides, it could be worthwhile adding a check that the domain parameter
> (inn.conf or readers.conf) contains valid characters for a Message-ID... 
> and fall back to FQDN otherwise (hoping that FQDN also returns a string
> suitable for a Message-ID!).

I think if domain has invalid characters we should probably just abort
with a fatal error, assuming it's worth checking for this.  That seems
like a basic configuration error we should just make people fix.

> I also found out:

>   https://lists.isc.org/mailman/htdig/inn-workers/2002-August/010116.html

> """
>>> There is the "domain" keyword in inn.conf to set the domain name if (and
>>> only if) gethost*name(3) fail. This does not work for me.
>>
>> I tried the same. I think this should be taken as default if domain isn't
>> defined in readers.conf.

> The reason why we didn't do that a while back is because that's not what
> domain was meant to be.  domain was the *domain* name (to which the host
> name should be prepended) and is there as a settable parameter because of
> sites with old or broken DNS.

> domain in readers.conf is something different.  :/

> I suppose we could decide that there aren't any hosts around any more that
> are so old that INN can't figure out the right domain name (although I'm
> not sure this is true for some weird local configurations) and that domain
> could be recycled to set the local host name.  Although if we're going to
> do that, I'd rather just remove the domain parameter and add a new one.
> Like, say, hostname.  :)
> """

Ah!  Okay, yes, I agree with my past self, now that I've read my logic
from 20 years ago.  :)  Maybe the root problem here is that we're
overloading domain.

I think the tactical fix to honor domain in readers.conf regardless of
what domain in inn.conf is set to is the right fix for stable.  I'm trying
to figure out if we need to modify domain in inn.conf or if we should just
configure message ID generation (and Injection-Info generation) in
readers.conf.  We can have it default to inn.conf's domain setting, but
not on the grounds that that's the right place to set it, but that that's
the right place to globally override broken DNS / gethostname.

I don't agree with my past self that we can assume there are no more DNS
issues of this type any more.  If anything, they've gotten more common
with the growth of internal networks.  I think it's quite likely that
there's someone out there with a server where inn_getfdqn() returns
news.office.internal or some such thing, but they want to be news.foo.com
on the Internet, and domain feels like the right overall config setting
for that use case.

What I'm coming around to for the next major release is that the parameter
in readers.conf should just be called something different, since it is
something different, and we should remove the domain setting in
readers.conf (since it doesn't make sense to change the DNS resolution
stuff in readers.conf since that will be a global problem, not just an
nnrpd problem) and have innupgrade change it to some other name.

The ABNF construct that's used in the standards for Xref is server-name.
That's not a bad name for this setting; maybe the new readers.conf setting
should be servername?  Which normally you would want to set to the same
thing as pathhost in inn.conf, but they're distinct settings since there
are cases where you may want them to be different.

The new setting should then have the same interaction with virtualhost
that domain does, I think.

> When all of this has been stated, there will also be a change to make in
> the FAQ:
>   https://www.eyrie.org/~eagle/faqs/inn.html#S6.6

*laugh*.  I didn't even read the FAQ or remember that there was a FAQ
entry about this.  Well, I was certainly right that I did understand all
of this stuff at some point in the past and then forgot!

-- 
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: <87sfkmxcsj.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>

Show Full Headers
Complete Article Headers
Message-ID: <87sfkmxcsj.fsf@hope.eyrie.org>
Subject: Re: How to permit user to set the right part of message-id
Date: Tue, 20 Sep 2022 08:53:32 -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>
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="7103"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:RMm/K5t4WbE1Hwma/osUk9WTvJI=