DISTRIB.PATS(5)
β¨ DISTRIB.PATS(5) β¨
okay so bestie, real talk β this is the manual page for distrib.pats, which lives in the InterNetNews docs, and it's literally the file that decides what goes in your Distribution header field by default π
π NAME π
distrib.pats β the default values for the Distribution header field, no cap π¦
πΈ DESCRIPTION πΈ
So the file pathetc/distrib.pats is what nnrpd reads to figure out the default body of the Distribution header field. Like, the default-default, the one nobody typed π
Okay so, the parsing rules, listen up:
- blank lines? ignored π«Ά
- lines starting with a number sign (
#)? also ignored, they're just vibes π - literally every other line is three fields, separated by a colon:
<weight>:<pattern>:<value>
Now let's break down the three fields one by one, because they each have main character energy β¨
Field numero uno β the weight. This is the weight you assign to this match. If a newsgroup matches multiple lines, the line with the highest weight gets used. This should be an arbitrary integer greater than zero. And the order of the lines in the file? Only matters if groups have equal weight β in that case the first matching line wins. So yeah, ties go to whoever showed up first π₯
Field numero dos β the pattern. This is either the name of a newsgroup, or a uwildmat-style pattern specifying a whole set of newsgroups. Iconic flexibility ngl π
Field numero tres β the body. This is the actual body that should be used for the Distribution header field of a posted article, if this line got picked as the best match and no Distribution header field was supplied by the user. It's allowed to be an empty string, which means "no Distribution header field should be added", periodt. And if it's not empty? It's better to only use US-ASCII characters for that field β otherwise make sure it's encoded in UTF-8, bestie, please π
Now the actual behaviour, the part where it all comes together π«
When a post is received by nnrpd that doesn't already contain a Distribution header field, every newsgroup the article is posted to gets checked against this file in turn, and the matching line with the highest weight becomes the body of the Distribution header field. Slay.
But β and this is important β if no lines match, or if the matching line has an empty string in its third field, then no header field gets added at all. Simple as that π
β οΈ okay so this is the caveat and I need you to actually read it: in case a distribution is added bynnrpd, make sure it is not rejected by the newsfeedsMEentry. Like, fr fr, check yourMEentry, don't let it eat your post π€
And if you want a list of recommended distributions, you can specify and describe them in distributions(5) β that's the sister file, go say hi π
π¦ HISTORY π¦
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. Converted to POD by Russ Allbery <eagle@eyrie.org>. Respect the OGs π
π SEE ALSO π
aaand that's the whole page, bestie, you ate that π β¨ this was INN 2.7.4, dated 2022-07-10 β go forth and configure your distribution defaults, mwah πππ«Ά
π¦ where this page comes from
- arch rolling: inn 2.7.4-4 Β· ISC
- epel 10: inn 2.7.4-5.el10_3 Β· ISC AND BSD-3-Clause AND BSD-4-Clause AND FSFAP AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND MIT AND NTP
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms