Thread View: news.software.nntp
54 messages
54 total messages
Page 1 of 2
Started by LaLibreParole
Sun, 18 Sep 2022 21:42
Page 1 of 2 • 54 total messages
How to permit user to set the right part of message-id
Author: LaLibreParole
Date: Sun, 18 Sep 2022 21:42
Date: Sun, 18 Sep 2022 21:42
6 lines
976 bytes
976 bytes
Hi, What is the parameter to allow user to customize right part of the message-id field when posting a message ? I don't see the right parameter to do that in inn.conf
Re: How to permit user to set the right part of message-id
Author: John Levine
Date: Sun, 18 Sep 2022 21:51
Date: Sun, 18 Sep 2022 21:51
13 lines
1406 bytes
1406 bytes
It appears that LaLibreParole <vrai.ou.faux@laposte.net> said: >Hi, > >What is the parameter to allow user to customize right part of >the message-id field when posting a message ? If you post a message that already has a Message-ID, inn won't change it. It'll add a Message-ID in the usual case that there isn't one. -- Regards, John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies", Please consider the environment before reading this e-mail. https://jl.ly
Re: How to permit user to set the right part of message-id
Author: LaLibreParole
Date: Sun, 18 Sep 2022 22:29
Date: Sun, 18 Sep 2022 22:29
18 lines
1443 bytes
1443 bytes
John Levine <johnl@taugh.com> composa la prose suivante: >It appears that LaLibreParole <vrai.ou.faux@laposte.net> said: >>Hi, >> >>What is the parameter to allow user to customize right part of >>the message-id field when posting a message ? > >If you post a message that already has a Message-ID, inn won't change >it. You're right, thank's > It'll add a Message-ID in the usual case that there isn't one. And in this case, inn will use something_uniq@machinename.domain Is it possible to suppress "machinename" ?
Re: How to permit user to set the right part of message-id
Author: Russ Allbery
Date: Mon, 19 Sep 2022 00:32
Date: Mon, 19 Sep 2022 00:32
13 lines
1348 bytes
1348 bytes
LaLibreParole <vrai.ou.faux@laposte.net> writes:
> And in this case, inn will use something_uniq@machinename.domain
> Is it possible to suppress "machinename" ?
Set domain in the readers.conf access stanza to whatever you want to use
on the right-hand side of message IDs.
--
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.
Re: How to permit user to set the right part of message-id
Author: LaLibreParole
Date: Mon, 19 Sep 2022 17:34
Date: Mon, 19 Sep 2022 17:34
11 lines
1391 bytes
1391 bytes
Russ Allbery <eagle@eyrie.org> composa la prose suivante: >LaLibreParole <vrai.ou.faux@laposte.net> writes: > >> And in this case, inn will use something_uniq@machinename.domain >> Is it possible to suppress "machinename" ? > >Set domain in the readers.conf access stanza to whatever you want to use >on the right-hand side of message IDs. I didn't succeed: it also adds the name of the server machine.
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Mon, 19 Sep 2022 20:28
Date: Mon, 19 Sep 2022 20:28
19 lines
2317 bytes
2317 bytes
Bonsoir LaLibreParole, >>> And in this case, inn will use something_uniq@machinename.domain >>> Is it possible to suppress "machinename" ? >> >> Set domain in the readers.conf access stanza to whatever you want to use >> on the right-hand side of message IDs. > > I didn't succeed: it also adds the name of the server machine. Do you happen to also have the domain parameter set in inn.conf to the same value as the one you added to readers.conf? (If that's the case, I think it won't be taken into account. Try to unset the domain parameter in inn.conf, and only keep the one in readers.conf.) -- Julien ÉLIE « Même avec Dieu, il ne faut pas tenter le Diable. » (Raymond Devos)
Re: How to permit user to set the right part of message-id
Author: LaLibreParole
Date: Mon, 19 Sep 2022 21:19
Date: Mon, 19 Sep 2022 21:19
31 lines
2064 bytes
2064 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> composa la prose suivante: >Bonsoir LaLibreParole, > >>>> And in this case, inn will use something_uniq@machinename.domain >>>> Is it possible to suppress "machinename" ? >>> >>> Set domain in the readers.conf access stanza to whatever you want to use >>> on the right-hand side of message IDs. >> >> I didn't succeed: it also adds the name of the server machine. > >Do you happen to also have the domain parameter set in inn.conf to the >same value as the one you added to readers.conf? yes. > (If that's the case, I think it won't be taken into account. You're right ! > Try to unset the domain parameter in inn.conf, and only > keep the one in readers.conf.) If i do that, inn does not start and "incheck" say: "innconfval: hostname does not resolve or domain not set in inn.conf" But you gave me the solution: put two different values: one in inn.conf and a different one in readers.conf. Thanks Julien and Russ :-)
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Mon, 19 Sep 2022 21:43
Date: Mon, 19 Sep 2022 21:43
30 lines
2652 bytes
2652 bytes
Bonsoir LaLibreParole, >> Do you happen to also have the domain parameter set in inn.conf to the >> same value as the one you added to readers.conf? > > yes. > >> (If that's the case, I think it won't be taken into account. > > You're right ! > > the solution: put two different values: one in inn.conf > and a different one in readers.conf. I don't know why we do that comparison when generating Message-IDs. If domain is set in both inn.conf and readers.conf to the same value, we take the FQDN. If domain is not set in inn.conf but is set in readers.conf, or both are set and different, we take the one in readers.conf. I would tend to take the one from readers.conf anyway. As it is forced in readers.conf, there may be a reason; inn.conf documentation says to have a look at domain (or virtualhost) in readers.conf to change the righthand side of autogenerated Message-IDs, but that special rule is not mentioned. I would just drop it... -- Julien ÉLIE « Une robe de femme doit être comme une plaidoirie : assez longue pour couvrir le sujet, assez courte pour être suivie. »
Re: How to permit user to set the right part of message-id
Author: LaLibreParole
Date: Mon, 19 Sep 2022 21:55
Date: Mon, 19 Sep 2022 21:55
40 lines
2568 bytes
2568 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> composa la prose suivante: >Bonsoir LaLibreParole, > >>> Do you happen to also have the domain parameter set in inn.conf to the >>> same value as the one you added to readers.conf? >> >> yes. >> >>> (If that's the case, I think it won't be taken into account. >> >> You're right ! >> >> the solution: put two different values: one in inn.conf >> and a different one in readers.conf. > >I don't know why we do that comparison when generating Message-IDs. If >domain is set in both inn.conf and readers.conf to the same value, we >take the FQDN. If domain is not set in inn.conf but is set in >readers.conf, or both are set and different, we take the one in >readers.conf. Yes. There another curious thing. When domain is set in inn.conf and not in readers.conf, the message-id has the form "machin.domain" When domain is set in inn.conf and in readers.conf but different, the message-id has the form "domain" (take from reader.conf) Is there a reason for this different behavior ? >I would tend to take the one from readers.conf anyway. As it is forced >in readers.conf, there may be a reason; inn.conf documentation says to >have a look at domain (or virtualhost) in readers.conf to change the >righthand side of autogenerated Message-IDs, but that special rule is >not mentioned. I would just drop it... I think it's a good idea.
Re: How to permit user to set the right part of message-id
Author: Russ Allbery
Date: Mon, 19 Sep 2022 22:24
Date: Mon, 19 Sep 2022 22:24
49 lines
2989 bytes
2989 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes:
> I don't know why we do that comparison when generating Message-IDs. If
> domain is set in both inn.conf and readers.conf to the same value, we
> take the FQDN. If domain is not set in inn.conf but is set in
> readers.conf, or both are set and different, we take the one in
> readers.conf.
Yeah, I was going to say that seemed weird. I'm not sure why we ended up
doing things that way, but it doesn't make sense to me. If domain is set
in readers.conf, we should just use it.
> I would tend to take the one from readers.conf anyway. As it is forced
> in readers.conf, there may be a reason; inn.conf documentation says to
> have a look at domain (or virtualhost) in readers.conf to change the
> righthand side of autogenerated Message-IDs, but that special rule is
> not mentioned. I would just drop it...
BTW, I had a bit of a hard time following the documentation, because
inn.conf says to set domain in readers.conf but then domain isn't
documented in readers.conf except in the list of inn.conf settings that
can also be set there.
If the inn.conf documentation is correct, the domain setting is ignored if
inn_getfqdn() succeeds, which also seems a bit weird. It feels like an
expicitly-set configuration option should override whatever we discover
while probing around on the system.
I found all of this surprisingly confusing! I'm sure it all made sense to
me at some point fifteen years ago.
I think the right result may be:
* Use domain unconditionally for forming message IDs if it's set in
readers.conf.
* Use domain if it's set in inn.conf, regardless of what we can discover
from other system calls. (This is backwards-incompatible, so maybe not
on the stable branch.)
* Document domain as a first-class configuration parameter for access
groups in readers.conf, saying that it changes the way message IDs are
constructed. (I'm not sure if it does anything else?)
--
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.
Re: How to permit user to set the right part of message-id
Author: yamo'
Date: Tue, 20 Sep 2022 05:49
Date: Tue, 20 Sep 2022 05:49
13 lines
1963 bytes
1963 bytes
Hi, Russ Allbery a écrit : > * Document domain as a first-class configuration parameter for access > groups in readers.conf, saying that it changes the way message IDs are > constructed. (I'm not sure if it does anything else?) Changing it, add the domain value to the Path for messages added by nnrpd and when getting messages with a client of nnrpd. -- Stéphane
Re: How to permit user to set the right part of message-id
Author: LaLibreParole
Date: Tue, 20 Sep 2022 07:55
Date: Tue, 20 Sep 2022 07:55
20 lines
1991 bytes
1991 bytes
yamo' <user@tld.invalid> composa la prose suivante: >Hi, >Russ Allbery a écrit : > >> * Document domain as a first-class configuration parameter for access >> groups in readers.conf, saying that it changes the way message IDs are >> constructed. (I'm not sure if it does anything else?) > >Changing it, add the domain value to the Path for messages added by nnrpd >and when getting messages with a client of nnrpd. No: only if "virtualhost" is set to true in reader.conf. If "virtualhost" is not present it only modify the path in injection info. For example: With virtualhost: "injection-Info: machinename.readersconfDomain" Without virtualhost: "injection-Info: machinename.InnConfDomain" it's a pity that we can't delete the name of the machine at this place
Re: How to permit user to set the right part of message-id
Author: LaLibreParole
Date: Tue, 20 Sep 2022 08:03
Date: Tue, 20 Sep 2022 08:03
20 lines
1996 bytes
1996 bytes
yamo' <user@tld.invalid> composa la prose suivante: >Hi, >Russ Allbery a écrit : > >> * Document domain as a first-class configuration parameter for access >> groups in readers.conf, saying that it changes the way message IDs are >> constructed. (I'm not sure if it does anything else?) > >Changing it, add the domain value to the Path for messages added by nnrpd >and when getting messages with a client of nnrpd. No: only if "virtualhost" is also set to true in reader.conf. If "virtualhost" is not present it only modify the path in injection info. For example: With virtualhost: "injection-Info: machinename.readersconfDomain" Without virtualhost: "injection-Info: machinename.InnConfDomain" it's a pity that we can't delete the name of the machine at this place
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Tue, 20 Sep 2022 08:10
Date: Tue, 20 Sep 2022 08:10
30 lines
2649 bytes
2649 bytes
Bonjour Stéphane,
>> * Document domain as a first-class configuration parameter for access
>> groups in readers.conf, saying that it changes the way message IDs are
>> constructed. (I'm not sure if it does anything else?)
>
> Changing it, add the domain value to the Path for messages added by nnrpd
> and when getting messages with a client of nnrpd.
Only when virtualhost is also set to true!
I agree, Russ, that domain should be documented as a first-class
configuration parameter, like virtualhost is.
When virtualhost is set to true, domain is used in:
- Xref,
- Path but only in the case of pathhost being the same in inn.conf and
readers.conf, to better differentiate virtual hosts.
In all cases, domain is used in:
- Message-ID,
- Injection-Info (the path identity at the beginning of that header field),
- the e-mail address at the end of the HELP command ("Report problems to
<usenet@DOMAIN>.")
--
Julien ÉLIE
« Pas encore uici, hélas, pas tout à fait uici… » (César)
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Tue, 20 Sep 2022 08:18
Date: Tue, 20 Sep 2022 08:18
44 lines
3143 bytes
3143 bytes
Hi Russ, >> I would tend to take the one from readers.conf anyway. As it is forced >> in readers.conf, there may be a reason; inn.conf documentation says to >> have a look at domain (or virtualhost) in readers.conf to change the >> righthand side of autogenerated Message-IDs, but that special rule is >> not mentioned. I would just drop it... > > BTW, I had a bit of a hard time following the documentation, because > inn.conf says to set domain in readers.conf but then domain isn't > documented in readers.conf except in the list of inn.conf settings that > can also be set there. I noticed the same difficulty. It definitely needs improving; I'll have a look. > If the inn.conf documentation is correct, the domain setting is ignored if > inn_getfqdn() succeeds, which also seems a bit weird. It feels like an > expicitly-set configuration option should override whatever we discover > while probing around on the system. Yes, I agree. > I think the right result may be: > > * Use domain unconditionally for forming message IDs if it's set in > readers.conf. > > * Use domain if it's set in inn.conf, regardless of what we can discover > from other system calls. (This is backwards-incompatible, so maybe not > on the stable branch.) And run the current call to inn_fqdn() if domain is unset in both readers.conf and inn.conf. A similar algorithm should also be done for Injection-Info, as discussed afterwards in this thread. -- Julien ÉLIE « Vinum bonum laetificat cor hominis. »
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Tue, 20 Sep 2022 10:00
Date: Tue, 20 Sep 2022 10:00
90 lines
4985 bytes
4985 bytes
Hi Russ, > I found all of this surprisingly confusing! I'm sure it all made sense to > me at some point fifteen years ago. 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.... """ Maybe one of the reasons for using FQDN instead of domain by default? 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 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. :) """ 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 """ 6.6. Change the domain used for message IDs By default, any message IDs generated by INN will use the domain of the local system for the right-hand-side of the message ID. In some cases, this isn't desirable for various reasons (the server may have an internal name that doesn't make sense on Usenet at large, or one may not want to expose the name of the server). In INN 2.3.3 and later, you can set virtualhost: to true in an access stanza of readers.conf and then set domain: in the same stanza, and all posts coming from connections to which that access stanza applies will use that domain to generate message IDs. So if you need to change the domain used to generate message IDs for every local post from your server, just add virtualhost: and domain: keys to every access stanza in readers.conf. This is really overkill for this option, and eventually the domain: parameter in inn.conf will probably be changed to allow this to be modified for the whole server. (Right now, domain: in inn.conf means something completely different.) """ -- Julien ÉLIE « César, c'est un Jules tout de même ! » (Astérix)
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Tue, 20 Sep 2022 10:23
Date: Tue, 20 Sep 2022 10:23
21 lines
2590 bytes
2590 bytes
Bonjour LaLibreParole, > If "virtualhost" is not present it only modify the path in injection > info. > For example: > With virtualhost: "injection-Info: machinename.readersconfDomain" > Without virtualhost: "injection-Info: machinename.InnConfDomain" > > it's a pity that we can't delete the name of the machine at this > place It's also a behaviour, dating back to the obsolete X-Trace header field, that should be changed and follow a similar algorithm as the one suggested by Russ for Message-ID (directly take domain from readers.conf and inn.conf in that order, and fall back to FQDN otherwise). -- Julien ÉLIE « – Mais je leur ai simplement demandé si c'était la bonne route !!! – Ils nous ont fait une 'éponse de No'mand ! » (Astérix)
Re: How to permit user to set the right part of message-id
Author: yamo'
Date: Tue, 20 Sep 2022 11:59
Date: Tue, 20 Sep 2022 11:59
11 lines
1817 bytes
1817 bytes
Hi, LaLibreParole a tapoté le 20/09/2022 10:03: > No: only if "virtualhost" is also set to true in reader.conf. Without virtualhost I haven't succeeded in configuring it... Now I'm not using it. It may be broken in 2.6.4? -- Stéphane Sorry for my bad English.
Re: How to permit user to set the right part of message-id
Author: Russ Allbery
Date: Tue, 20 Sep 2022 15:53
Date: Tue, 20 Sep 2022 15:53
105 lines
6073 bytes
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.
Re: How to permit user to set the right part of message-id
Author: LaLibreParole
Date: Tue, 20 Sep 2022 20:23
Date: Tue, 20 Sep 2022 20:23
12 lines
1622 bytes
1622 bytes
yamo' <yamo@beurdin.invalid> composa la prose suivante: >Hi, > >LaLibreParole a tapoté le 20/09/2022 10:03: >> No: only if "virtualhost" is also set to true in reader.conf. > >Without virtualhost I haven't succeeded in configuring it... >Now I'm not using it. It may be broken in 2.6.4? Perhaps: i use 2.6.3-3 The last in my ubuntu version.
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Wed, 21 Sep 2022 20:58
Date: Wed, 21 Sep 2022 20:58
60 lines
4195 bytes
4195 bytes
Hi Russ, > 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. 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). >> 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. Yes, people should fix such a misconfiguration. > 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 also agree; I'll do that. > 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? 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. > 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 default value of servername in inn.conf (optional parameter) would then be pathhost (mandatory to set in inn.conf). -- Julien ÉLIE « C'est une forêt vierge où la main de l'homme n'a jamais mis le pied. »
Re: How to permit user to set the right part of message-id
Author: LaLibreParole
Date: Wed, 21 Sep 2022 21:46
Date: Wed, 21 Sep 2022 21:46
59 lines
3870 bytes
3870 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> composa la prose suivante: >Hi Russ, > >> 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. > >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). > > >>> 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. > >Yes, people should fix such a misconfiguration. > > >> 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 also agree; I'll do that. > > >> 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? > >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. > > >> 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 default value of servername in inn.conf (optional parameter) would >then be pathhost (mandatory to set in inn.conf). it looks good !
Re: How to permit user to set the right part of message-id
Author: Marc SCHAEFER
Date: Thu, 22 Sep 2022 07:14
Date: Thu, 22 Sep 2022 07:14
6 lines
1747 bytes
1747 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote: > 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). Yes, that would be great.
Re: How to permit user to set the right part of message-id
Author: LaLibreParole
Date: Thu, 22 Sep 2022 20:46
Date: Thu, 22 Sep 2022 20:46
25 lines
2250 bytes
2250 bytes
LaLibreParole <vrai.ou.faux@laposte.net> composa la prose suivante: >yamo' <user@tld.invalid> composa la prose suivante: > >>Hi, >>Russ Allbery a écrit : >> >>> * Document domain as a first-class configuration parameter for access >>> groups in readers.conf, saying that it changes the way message IDs are >>> constructed. (I'm not sure if it does anything else?) >> >>Changing it, add the domain value to the Path for messages added by nnrpd >>and when getting messages with a client of nnrpd. > >No: only if "virtualhost" is also set to true in reader.conf. > >If "virtualhost" is not present it only modify the path in injection info. >For example: > With virtualhost: "injection-Info: machinename.readersconfDomain" > Without virtualhost: "injection-Info: machinename.InnConfDomain" > >it's a pity that we can't delete the name of the machine at this place This day, i update ubuntu and inn2 to version 2.6.4-2. The name of the machine has disappeared from injection-info :-)
Re: How to permit user to set the right part of message-id
Author: Adam H. Kerman
Date: Fri, 23 Sep 2022 04:53
Date: Fri, 23 Sep 2022 04:53
49 lines
2889 bytes
2889 bytes
Russ Allbery <eagle@eyrie.org> wrote: >Julien <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. Can I ask a dumb question here? Let's assume the issue applies to hosts on different News sites. Either the News administrator or user decides there's a legitimate privacy reason that it's not desireable to use the working domain of the News server or the user's own host. With better random number generators available these days, is it possible to ensure uniqueness considering the left part of the Message-ID only if multiple News sites or users start to use domains in the right half that they don't uniquely control but are harmless to use, like literally example.com? As long as you are thinking about this, can you give some consideration to appending a check digit to the left part? A certain user I shall not name (but many of you know exactly whom I am talking about) has been forging other users, copying their Injection headers for preloading into the proto forged article which is injected through the News site that he uses. He typically adds crossposted newsgroups that the actual author did not crosspost to. The original Message-ID is preloaded as well, but he gets around clashing Message-IDs by prepending a character. A check digit might prevent that. Of course, he'll find all new ways to commit abuse. >>>. . .
Re: How to permit user to set the right part of message-id
Author: Russ Allbery
Date: Fri, 23 Sep 2022 05:36
Date: Fri, 23 Sep 2022 05:36
79 lines
4835 bytes
4835 bytes
"Adam H. Kerman" <ahk@chinet.com> writes:
> Let's assume the issue applies to hosts on different News sites. Either
> the News administrator or user decides there's a legitimate privacy
> reason that it's not desireable to use the working domain of the News
> server or the user's own host. With better random number generators
> available these days, is it possible to ensure uniqueness considering
> the left part of the Message-ID only if multiple News sites or users
> start to use domains in the right half that they don't uniquely control
> but are harmless to use, like literally example.com?
Yes, assuming you have a good random number generator, any random number
generator suitable for a cryptographic key will probably be good enough
for this. The constraints are slightly different, but avoiding collisions
across a fairly large space ends up looking somewhat similar to what you
need to get protection against brute-force attacks.
The general rule of thumb is that 128 bits is probably good enough for
anything (although I will say that hashes these days have mostly gone to
256 bits). With base64 encoding, that's fairly compact:
4k2LUqc6SWY6vcGiWefcag@example.com
Protection against collision is basically protection against a birthday
attack, and thus grows with the square root of the message ID space. If I
remember the math correctly, when there are 2^128 message IDs, you'll have
a 50% chance of a collision in 2^64 message IDs, which is substantially
larger than the number of Usenet messages there are ever likely to be. In
practice, this should get you to much less than 50% chance, basically low
enough that you don't have to care.
Even if you think that might not be enough somehow, if you add a timestamp
before the randomness, and you assume mostly non-malicious message ID
generators, you reduce the chances of a collision to effectively nothing
fairly easily, and now you don't care about how long Usenet will survive
with unlimited retention because every second you move into a new message
ID space. That gives you a message ID that looks something like:
EmQM4tZ4$4k2LUqc6SWY6vcGiWefcag@example.com
That takes the date as a number (20220922222200) and represents it in 6
bytes, which is good enough for the next 10,000 years. With a timestamp,
I'm pretty sure you could cut that down to 64 bits and still be pretty
comfortable, which gives you something like:
EmQM4tZ4$uYRo9tEy/80@example.com
which is quite compact.
> As long as you are thinking about this, can you give some consideration
> to appending a check digit to the left part?
> A certain user I shall not name (but many of you know exactly whom I am
> talking about) has been forging other users, copying their Injection
> headers for preloading into the proto forged article which is injected
> through the News site that he uses. He typically adds crossposted
> newsgroups that the actual author did not crosspost to.
> The original Message-ID is preloaded as well, but he gets around
> clashing Message-IDs by prepending a character.
> A check digit might prevent that. Of course, he'll find all new ways to
> commit abuse.
I'm not sure I understand how a check digit helps. The check digit won't
match and... then what? You need some way to filter out the forged
messages, but most people aren't going to be using some new message ID
generation algorithm. Also, since the whole message is forged, that
person can just make up a new message ID at the same domain with a good
check digit.
If the goal is for people to be able to opt in to forgery protection, some
sort of public key signature is a more obvious choice.
--
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.
Re: How to permit user to set the right part of message-id
Author: Adam H. Kerman
Date: Fri, 23 Sep 2022 06:52
Date: Fri, 23 Sep 2022 06:52
54 lines
3430 bytes
3430 bytes
Russ Allbery <eagle@eyrie.org> wrote: >"Adam H. Kerman" <ahk@chinet.com> writes: >>Let's assume the issue applies to hosts on different News sites. Either >>the News administrator or user decides there's a legitimate privacy >>reason that it's not desireable to use the working domain of the News >>server or the user's own host. With better random number generators >>available these days, is it possible to ensure uniqueness considering >>the left part of the Message-ID only if multiple News sites or users >>start to use domains in the right half that they don't uniquely control >>but are harmless to use, like literally example.com? >Yes, assuming you have a good random number generator, any random number >generator suitable for a cryptographic key will probably be good enough >for this. The constraints are slightly different, but avoiding collisions >across a fairly large space ends up looking somewhat similar to what you >need to get protection against brute-force attacks. . . . Thank you very much for the detailed explanation. I appreciate it. >>As long as you are thinking about this, can you give some consideration >>to appending a check digit to the left part? >>A certain user I shall not name (but many of you know exactly whom I am >>talking about) has been forging other users, copying their Injection >>headers for preloading into the proto forged article which is injected >>through the News site that he uses. He typically adds crossposted >>newsgroups that the actual author did not crosspost to. >>The original Message-ID is preloaded as well, but he gets around >>clashing Message-IDs by prepending a character. >>A check digit might prevent that. Of course, he'll find all new ways to >>commit abuse. >I'm not sure I understand how a check digit helps. The check digit won't >match and... then what? You need some way to filter out the forged >messages, but most people aren't going to be using some new message ID >generation algorithm. Also, since the whole message is forged, that >person can just make up a new message ID at the same domain with a good >check digit. Fair enough. Suggestion withdrawn >If the goal is for people to be able to opt in to forgery protection, some >sort of public key signature is a more obvious choice. Same issue. No reader checks. He was preserving the original article's text but adding the crosspost. The problem is that the News site was allowing the forged articles to be injected despite the fact of the preloaded Injection headers belongng to another News site, which was quite nonstandard indeed.
Re: How to permit user to set the right part of message-id
Author: Russ Allbery
Date: Fri, 23 Sep 2022 15:04
Date: Fri, 23 Sep 2022 15:04
38 lines
2605 bytes
2605 bytes
"Adam H. Kerman" <ahk@chinet.com> writes:
> Russ Allbery <eagle@eyrie.org> wrote:
>> If the goal is for people to be able to opt in to forgery protection,
>> some sort of public key signature is a more obvious choice.
> Same issue. No reader checks.
Yeah, it's a real problem. We need something that's reasonable for
servers to implement, at least in filters, but the problem with that is
that somehow you need to bootstrap an identity management system since
otherwise forgery is essentially undefined.
This is basicallly "why Usenet stopped being popular" in a nutshell. It's
not the only reason, but lots of things related to identity are, I think,
the top reasons.
*If* you can figure out what public keys to check against, public key
signatures at least do work, technically. They can't be forged and
provide the information you want. But that's a big if.
> The problem is that the News site was allowing the forged articles to be
> injected despite the fact of the preloaded Injection headers belongng to
> another News site, which was quite nonstandard indeed.
Indeed, it violates a MUST in RFC 5537 section 3.5:
2. It MUST reject any proto-article that does not have the proper
mandatory header fields for a proto-article, that has Injection-
Info or Xref header fields, that has a Path header field
containing the "POSTED" <diag-keyword>, or that is not
syntactically valid as defined by [RFC5536].
--
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.
Re: How to permit user to set the right part of message-id
Author: Russ Allbery
Date: Fri, 23 Sep 2022 15:21
Date: Fri, 23 Sep 2022 15:21
60 lines
4177 bytes
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.
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Fri, 23 Sep 2022 21:46
Date: Fri, 23 Sep 2022 21:46
23 lines
2523 bytes
2523 bytes
Bonsoir LaLibreParole, >> If "virtualhost" is not present it only modify the path in injection info. >> For example: >> With virtualhost: "injection-Info: machinename.readersconfDomain" >> Without virtualhost: "injection-Info: machinename.InnConfDomain" >> >> it's a pity that we can't delete the name of the machine at this place > > This day, i update ubuntu and inn2 to version 2.6.4-2. > The name of the machine has disappeared from injection-info :-) There was an improvement in INN 2.6.3 in the way INN gets the FQDN and handles local hostnames not in DNS. It may be the reason of the change you see when upgrading from a version < 2.6.3 to 2.6.4. At least, it solved your issue! -- Julien ÉLIE « Tu te conduis comme un jeune marcassin qui aurait encore des dents de laie. » (Astérix)
Re: How to permit user to set the right part of message-id
Author: Thomas Hochstein
Date: Sat, 24 Sep 2022 15:05
Date: Sat, 24 Sep 2022 15:05
23 lines
2486 bytes
2486 bytes
Russ Allbery schrieb: > 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. I don't think that's a problem because the FQDN should be unique anyway. > 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'm not sure that's the right way to go. The probability of duplicates on correctly configured systems would increase, and this is a poor tradeoff for a decreased probability of duplicates on suboptimally configured systems. -thh -- Do not go gentle into that good night. Rage, rage against the dying of the light.
Re: How to permit user to set the right part of message-id
Author: Russ Allbery
Date: Sat, 24 Sep 2022 15:35
Date: Sat, 24 Sep 2022 15:35
28 lines
2519 bytes
2519 bytes
Thomas Hochstein <thh@thh.name> writes:
> Russ Allbery schrieb:
>> 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'm not sure that's the right way to go. The probability of duplicates
> on correctly configured systems would increase, and this is a poor
> tradeoff for a decreased probability of duplicates on suboptimally
> configured systems.
The math implies that the chance of duplicates should actually go down
because it's more likely that you'll have two systems with the same FQDN
through some error or reuse an nnrpd PID within a second or have some
other very low-probability event occur than that you'll have an accidental
collision within a second in eight random bytes.
But it's very not intuitive and I have a hard time making myself believe
that.
--
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.
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Sat, 24 Sep 2022 17:47
Date: Sat, 24 Sep 2022 17:47
72 lines
4929 bytes
4929 bytes
Hi Russ,
> 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.
Besides, on two different servers, OpenSSL will compute different seeds
at startup (or better say the chance that the seeds are identical is
negligible).
> 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.
Radix32() only generates lower-case chars in the left-hand side. I
don't understand the remark that it "doesn't assume that message IDs are
case-sensitive": is it because it could also have used upper-case
letters and therefore generating even smaller message IDs?
> 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.
Indeed, though RFC 5536 only worries about case-insensitive matching on
the right-hand side:
Some software will try to match the <id-right> of a <msg-id> in a
case-insensitive fashion; some will match it in a case-sensitive
fashion. Implementations MUST NOT generate a Message-ID where the
only difference from another Message-ID is the case of characters in
the <id-right> part.
>> 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.)
Yes, that's an wise view, and we can consider servername for the
identity of nnrpd and pathhost for the identity of innd.
Maybe your point is that the name of the parameter should be serverhost
instead of the previously proposed servername?
--
Julien ÉLIE
« – Tu crois qu'ils auront du sanglier, dis ?
– Faut pas te faire d'idées ; plus les armées sont puissantes, plus la
nourriture est mauvaise. Ça maintient les guerriers de mauvaise
humeur.
– …
– Je ne pensais pas que l'armée romaine était aussi puissante ! »
(Astérix)
Re: How to permit user to set the right part of message-id
Author: Russ Allbery
Date: Sat, 24 Sep 2022 17:59
Date: Sat, 24 Sep 2022 17:59
56 lines
3902 bytes
3902 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes:
> Hi Russ,
>> 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.
> Besides, on two different servers, OpenSSL will compute different seeds
> at startup (or better say the chance that the seeds are identical is
> negligible).
Yeah, hopefully it's using /dev/urandom or getrandom(2) on most hosts.
> Radix32() only generates lower-case chars in the left-hand side. I
> don't understand the remark that it "doesn't assume that message IDs are
> case-sensitive": is it because it could also have used upper-case
> letters and therefore generating even smaller message IDs?
Right, there's no reason to use a 32-character alphabet instead of a
64-character alphabet unless you're worried about case-insensitivity.
(You have to be a little careful of the extra characters needed by base64
since the default ones aren't always valid, but there's usually some
alternate selection that will work.)
> Indeed, though RFC 5536 only worries about case-insensitive matching on
> the right-hand side:
> Some software will try to match the <id-right> of a <msg-id> in a
> case-insensitive fashion; some will match it in a case-sensitive
> fashion. Implementations MUST NOT generate a Message-ID where the
> only difference from another Message-ID is the case of characters in
> the <id-right> part.
Oh! I misread that and thought it said the left-hand side. Yeah, that's
fine then; it should be possible to assume case-sensitive message IDs, in
which case if we switched to a 64-character alphabet for the encoding we
could put substantial randomness, keep the existing elements of the
message ID, and probably still make it shorter (or at least the same
length).
> Yes, that's an wise view, and we can consider servername for the identity
> of nnrpd and pathhost for the identity of innd.
> Maybe your point is that the name of the parameter should be serverhost
> instead of the previously proposed servername?
Whoops, no, that was just a mental error. I think servername is better;
host is a bit confusing here.
--
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.
Re: How to permit user to set the right part of message-id
Author: Franck
Date: Mon, 26 Sep 2022 05:36
Date: Mon, 26 Sep 2022 05:36
32 lines
2621 bytes
2621 bytes
Hello Julien, >> 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. > > 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). Although Spitfire News Server does not support virtual hosts, it uses this form of Message-Id: <session.timestamp_arrival_gmt@fqdn> The "Session" is a complex calculation based on information like "Date" and "PID" but also on other information from the hardware (Processor AND interface that accepts the client socket), which makes it unique to the "machine/interface" pair. The session is generated when a client connects and remains bound to its socket for its lifetime. If articles arrive from different sockets, the "session" makes a difference. If articles arrive from the same socket, the "timestamp" makes the difference. The PID and hardware information does the rest of the work to make the Message-ID (almost) unique in all cases. Franck
Re: How to permit user to set the right part of message-id
Author: Franck
Date: Mon, 26 Sep 2022 06:08
Date: Mon, 26 Sep 2022 06:08
14 lines
1786 bytes
1786 bytes
Hello, > The session is generated when a client connects and remains bound to its > socket for its lifetime. To be more precise, session is generated when a client connect (and linked to the accepted socket) in a way (almost) like this : session = DATE + PID + INFO_PROCESSOR + INFO_INTERFACE_WHO_ACCEPT_CONNECTION + INFO_CLIENT Message-ID = <session.timestamp_arrival_gmt@fqdn> Franck
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Mon, 26 Sep 2022 20:49
Date: Mon, 26 Sep 2022 20:49
22 lines
2499 bytes
2499 bytes
Hi Franck, > Although Spitfire News Server does not support virtual hosts, it uses > this form of Message-Id: > > <session.timestamp_arrival_gmt@fqdn> > > The "Session" is a complex calculation based on information like "Date" > and "PID" but also on other information from the hardware (Processor AND > interface that accepts the client socket), which makes it unique to the > "machine/interface" pair. Are you sure that the information from the hardware will be different in a virtual private server (VPS)? Couldn't all the virtual machines have the same processor and interface name? -- Julien ÉLIE « Lots of people want to ride with you in the limo, but what you want is someone who will take the bus with you when the limo breaks down. » (Oprah Winfrey)
Re: How to permit user to set the right part of message-id
Author: Franck
Date: Tue, 27 Sep 2022 04:58
Date: Tue, 27 Sep 2022 04:58
53 lines
2886 bytes
2886 bytes
Salut Julien, > Are you sure that the information from the hardware will be different in > a virtual private server (VPS)? Couldn't all the virtual machines have > the same processor and interface name? The generation of the "session" name is not only based on the "processor" and "interface" informations. There is a lot of other information taken into account to generate, at a given time, this "session" name. The list was not exhaustive, so I will detail it a little bit more: For the machine (Hardware) : - Processor information. - Network interface information (MAC address). For the machine (Software) : - Name of the Windows platform edition. - Windows serial number. - Date/time of Windows startup. For the service: - Start date/time. - PID. - IP address / FQDN. - Spitfire News Server serial number. For the client (Reader / Feed) : - IP of Network interface accepting the connection. - Date/time of connection. - Remote IP address of the client. - Remote port of the client. - Client's reverse resolution name. - Client account name (if any). This is how I like to kill a fly with a bazooka, and it takes no time to generate. For all this to be identical at any given time, chance really did it right! But since we don't play with chance, I took the precaution of writing: "To make the Message-ID (almost) unique in all cases". "Almost" was the precaution :-) Have nice day, Franck
Re: How to permit user to set the right part of message-id
Author: Franck
Date: Tue, 27 Sep 2022 06:06
Date: Tue, 27 Sep 2022 06:06
15 lines
1924 bytes
1924 bytes
Salut Julien, Even if I am convinced that two articles sent on the same socket (one after one) cannot have the same timestamp to the nearest hundredth of a second, I have taken into account your remark (elsewhere) on the timestamp placed after the "session" name. Spitfire News Server now use this format : <session.number-of-items-submitted-during-the-same-session@fqdn> Btw, it's a good thing because it shorten the Message-ID :-) Have nice day, Franck
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Tue, 27 Sep 2022 07:13
Date: Tue, 27 Sep 2022 07:13
34 lines
2978 bytes
2978 bytes
Salut Franck, > Even if I am convinced that two articles sent on the same socket (one > after one) cannot have the same timestamp to the nearest hundredth of a > second, I have taken into account your remark (elsewhere) on the > timestamp placed after the "session" name. :-) It is true that TAKETHIS can be pipelined contrary to POST, so the chance to POST more than 100 articles in one second is very small, contrary to a feed where we managed to exchange 140 articles in one second with TAKETHIS. A malicious poster may pipeline POST and achieve that rate, but it won't do any harm; his posts will just be discarded because of duplicate Message-IDs. > Spitfire News Server now use this format : > > <session.number-of-items-submitted-during-the-same-session@fqdn> > > Btw, it's a good thing because it shorten the Message-ID :-) That's a good change then :-) <C63328ebc00293aaa.1@news.spitfire-nntp.fr> Thanks for your detailed explanation of what is present in the session number. Pretty complex with rare chances of collision. -- Julien ÉLIE « Un poisson ! Mon règne pour un poisson ! » (Cétautomatix)
Re: How to permit user to set the right part of message-id
Author: Franck
Date: Tue, 27 Sep 2022 20:48
Date: Tue, 27 Sep 2022 20:48
38 lines
2944 bytes
2944 bytes
Bonsoir julien, > :-) > It is true that TAKETHIS can be pipelined contrary to POST, so the > chance to POST more than 100 articles in one second is very small, > contrary to a feed where we managed to exchange 140 articles in one > second with TAKETHIS. I understand that you are making a comparison with TAKETHIS just to refer to the speed of transmission of articles since, in this case, there is no generation of Message-ID. > A malicious poster may pipeline POST and achieve that rate, but it won't > do any harm; his posts will just be discarded because of duplicate > Message-IDs. I think a malicious poster will be confronted with one of the discussions we had about commands that cannot be pipelined, like POST. In this case, my implementation adopts part 3.5 of RFC3977 : If the specific description of a command says it "MUST NOT be pipelined", that command MUST end any pipeline of commands. That is, the client MUST NOT send any following command until it receives the CRLF at the end of the response from the command. The server MAY ignore any data received after the command and before the CRLF at the end of the response is sent to the client. My server does the check, and pipelining will be broken, so I think the client will be disconnected at some point, because of a timeout or for too many consecutive bad commands. I would give it a try... Franck
Re: How to permit user to set the right part of message-id
Author: Franck
Date: Sun, 09 Oct 2022 03:24
Date: Sun, 09 Oct 2022 03:24
18 lines
1693 bytes
1693 bytes
Hello Russ, > That takes the date as a number (20220922222200) and represents it in 6 > bytes, which is good enough for the next 10,000 years. With a timestamp, > I'm pretty sure you could cut that down to 64 bits and still be pretty > comfortable, which gives you something like: > > EmQM4tZ4$uYRo9tEy/80@example.com Quickly implemented in Spitfire News Server for testing purposes. Message-ID: <EmQSD29Yka97hBQCPZo=@news.spitfire-nntp.fr> The result is only slightly larger than my previous format but I give it a chance :) Have nice day. Franck
Re: How to permit user to set the right part of message-id
Author: Russ Allbery
Date: Sun, 09 Oct 2022 05:11
Date: Sun, 09 Oct 2022 05:11
32 lines
2262 bytes
2262 bytes
Franck <franck@email.invalid> writes:
> Hello Russ,
>> That takes the date as a number (20220922222200) and represents it in 6
>> bytes, which is good enough for the next 10,000 years. With a timestamp,
>> I'm pretty sure you could cut that down to 64 bits and still be pretty
>> comfortable, which gives you something like:
>> EmQM4tZ4$uYRo9tEy/80@example.com
> Quickly implemented in Spitfire News Server for testing purposes.
> Message-ID: <EmQSD29Yka97hBQCPZo=@news.spitfire-nntp.fr>
> The result is only slightly larger than my previous format but I give it a
> chance :)
Oh, since someone is actually using this, I should mention that I realized
after my post that this is a kind of silly encoding of the date and you
should just use seconds since epoch, which will carry the same information
and be a lot more compact.
Also, you can drop the = padding signs from the end of the base64 output.
The amount of padding required can be calculated from the length of the
string once you know it's base64-encoded, so it doesn't add any
information.
--
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.
Re: How to permit user to set the right part of message-id
Author: Franck
Date: Sun, 09 Oct 2022 10:04
Date: Sun, 09 Oct 2022 10:04
20 lines
1851 bytes
1851 bytes
Hello Russ, > Oh, since someone is actually using this, I should mention that I realized > after my post that this is a kind of silly encoding of the date and you > should just use seconds since epoch, which will carry the same information > and be a lot more compact. > > Also, you can drop the = padding signs from the end of the base64 output. > The amount of padding required can be calculated from the length of the > string once you know it's base64-encoded, so it doesn't add any > information. Done. Message ID : <Y0KVxHLrtq6oCVJ2@news.spitfire-nntp.fr> Now, the result is slightly smaler than my previous format 😄 Have nice day, Franck
Re: How to permit user to set the right part of message-id
Author: Franck
Date: Tue, 11 Oct 2022 05:58
Date: Tue, 11 Oct 2022 05:58
14 lines
1733 bytes
1733 bytes
Hi Russ, > Oh, since someone is actually using this, I should mention that I realized > after my post that this is a kind of silly encoding of the date and you > should just use seconds since epoch, which will carry the same information > and be a lot more compact. At this time, when generating a Message-ID, there is no chance to get a timestamp (at least) in the range of years 1970 to 2021, witch represent about 1640905200 seconds. Wouldn't it make sense to set the "0 Date" to 2022-01-01 so the Message-ID will be more compact?
Re: How to permit user to set the right part of message-id
Author: Russ Allbery
Date: Tue, 11 Oct 2022 15:31
Date: Tue, 11 Oct 2022 15:31
25 lines
2072 bytes
2072 bytes
Franck <franck@email.invalid> writes:
> Hi Russ,
>> Oh, since someone is actually using this, I should mention that I realized
>> after my post that this is a kind of silly encoding of the date and you
>> should just use seconds since epoch, which will carry the same information
>> and be a lot more compact.
> At this time, when generating a Message-ID, there is no chance to get a
> timestamp (at least) in the range of years 1970 to 2021, witch represent
> about 1640905200 seconds.
> Wouldn't it make sense to set the "0 Date" to 2022-01-01 so the Message-ID
> will be more compact?
Oh, sure, you could definitely do that. I didn't think about it since the
message ID already seemed reasonably short, but that would make it even
shorter (and make more room for other information if one wants to add it).
--
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.
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Wed, 12 Oct 2022 15:51
Date: Wed, 12 Oct 2022 15:51
30 lines
2663 bytes
2663 bytes
Salut Franck, > At this time, when generating a Message-ID, there is no chance to get a > timestamp (at least) in the range of years 1970 to 2021, witch represent > about 1640905200 seconds. > > Wouldn't it make sense to set the "0 Date" to 2022-01-01 so the > Message-ID will be more compact? We could also save 1 byte more (in the resulting Base64 string) if changing the timestamp every minute instead of every second. Dividing the number of seconds by 2^6=64 (or shifting 6 bits to the right) would do that, without really adding a noticeable risk of duplicate Message-IDs I think. > Message-ID: <Y0KVxHLrtq6oCVJ2@news.spitfire-nntp.fr> 16 bytes at the left-hand side of the Message-ID, and probably less with your suggestion of changing the "0 Date". FWIW, INN currently generates 13 bytes (ex: <tgu7qh$8iq1$1@news.trigofacile.com>, without random number) and I see that Gnus generates 14 bytes (ex: <87lepph98o.fsf@hope.eyrie.org>). -- Julien ÉLIE « A program should always respond to the user in the way that astonishes him least. » (Plauger's Law of Least Astonishment)
Re: How to permit user to set the right part of message-id
Author: Franck
Date: Thu, 13 Oct 2022 06:03
Date: Thu, 13 Oct 2022 06:03
14 lines
1744 bytes
1744 bytes
Bonjour Julien, > We could also save 1 byte more (in the resulting Base64 string) if > changing the timestamp every minute instead of every second. Dividing > the number of seconds by 2^6=64 (or shifting 6 bits to the right) would > do that, without really adding a noticeable risk of duplicate > Message-IDs I think. If timestamp is in minutes, with a "0 date" set to 2022-01-01, the Base64 result looks like <QzlcrZx0k8PldQ@news.spitfire-nntp.fr>. It's 14 bytes. Franck
Re: How to permit user to set the right part of message-id
Author: Olivier Miakinen
Date: Thu, 13 Oct 2022 10:46
Date: Thu, 13 Oct 2022 10:46
31 lines
2324 bytes
2324 bytes
Hello,
Le 09/10/2022 12:04, Franck a écrit :
>>
>> Also, you can drop the = padding signs from the end of the base64 output.
>> The amount of padding required can be calculated from the length of the
>> string once you know it's base64-encoded, so it doesn't add any
>> information.
>
> Done.
>
> Message ID : <Y0KVxHLrtq6oCVJ2@news.spitfire-nntp.fr>
>
> Now, the result is slightly smaler than my previous format 😄
For the cancel reports of miakibot, I use the standard timestamp (with 1970
as the "0-date"), but coded in a "base81" of my own. The 81 characters are :
_ATEXT = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + \
"abcdefghijklmnopqrstuvwxyz" + \
"0123456789" + \
"!#$%&'*+-/=?^_`{|}~"
Example :
Message-ID: <m4Pke.TCW.1@miakinen.net>
Where "m4Pke" is the base81 of the timestamp, "TCW" the base81 of the process
id, and "1" a simple disambiguation count if more than one messages are sent
by the same process in the same second.
--
Olivier Miakinen
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Sun, 19 Feb 2023 18:37
Date: Sun, 19 Feb 2023 18:37
28 lines
2694 bytes
2694 bytes
Hi Russ, >> I would tend to take the one from readers.conf anyway. As it is forced >> in readers.conf, there may be a reason; inn.conf documentation says to >> have a look at domain (or virtualhost) in readers.conf to change the >> righthand side of autogenerated Message-IDs, but that special rule is >> not mentioned. I would just drop it... > > BTW, I had a bit of a hard time following the documentation, because > inn.conf says to set domain in readers.conf but then domain isn't > documented in readers.conf except in the list of inn.conf settings that > can also be set there. > > * Use domain unconditionally for forming message IDs if it's set in > readers.conf. > > * Document domain as a first-class configuration parameter for > access groups in readers.conf, saying that it changes the way message > IDs are constructed. I've had a look at this issue today, and made the discussed changes to STABLE. They'll be available in INN 2.7.1. The documentation should also be easier to read now. -- Julien ÉLIE « Inside every large problem is a small problem struggling to get out. »
Re: How to permit user to set the right part of message-id
Author: Julien ÉLIE
Date: Sun, 19 Feb 2023 19:02
Date: Sun, 19 Feb 2023 19:02
49 lines
3941 bytes
3941 bytes
Hi Russ,
> One interesting wrinkle here: if servername 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.
Having a deeper look at it for INN 2.8.0 (as it is a
backwards-incompatible change), I've found the answer in Section 3.2 of
RFC 5537 😄
All news server components (injecting agents, relaying agents, and
serving agents) MUST identify themselves, when processing an article,
by prepending their <path-identity> (defined in Section 3.1.5 of
[RFC5536]) to the Path header field. Injecting agents MUST also use
the same identity in Injection-Info header fields that they add, and
serving and relaying agents SHOULD use the same identity in any Xref
header fields they add.
The server name in Injection-Info MUST be the path identity, and the
server name in Xref SHOULD be the path identity.
Hmm, nnrpd currently leaves the update of the Path header field to innd,
so we'll break a MUST if servername (intended to be the identity of
nnrpd) and pathhost (the identity of innd) are not the same.
I therefore suggest that if servername and pathhost are different, we
add both in Path.
nnrpd will generate "servername!.POSTED.xxx!not-for-mail", and innd will
add "pathhost!!" (with an additional verified diag match "!").
Injection-Info (set by nnrpd) will use servername.
Xref (set by innd) will use pathhost.
I think it will then be all good 😄
P.-S.: Disambiguating the use of "domain" is a good move. Thanks
LaLibreParole for this thread! It will greatly improve how various
parameters are (mis)used and (mis)documented, especially complaints,
newsmaster, fromhost, domain, pathhost, and virtualhost.
--
Julien ÉLIE
« A killfile on Usenet can get you peace and quiet. A killfile in the
real world can get you twenty years to life. » (Nils Nieuwjaar)
Page 1 of 2 • 54 total messages
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads