This is a continuation of my NNCP post.
I am interested in a Usenet feed. – 2022-02-04 Wondering about NNCP
2022-02-04 Wondering about NNCP
I’m following @jgoerzen’s instructions:
Usenet, of course, originally ran over UUCP in quite a few cases. Since NNCP is quite similar to UUCP – in fact, you can map UUCP commands to NNCP ones – it is quite possible, and not all that hard, to run Usenet over NNCP. – Usenet over NNCP
Create new section in /etc/nncp.hjson:
news.quux.org: { id: 6QVFU7QIHQNI6TWNRK7OAJUUBDZT262XX3I5YHGZOGLTVYOQM47Q exchpub: DBHZYJFEXNGJ5UFC6TZVYRAAAKKKVLT3DAAXCQXZZYERXPLLEQIQ signpub: OKFURSS5YFXUEEPYCAEGPBIPZDHDBISNJA47LHGMVECH6KC5PEWA noisepub: ZXEYBPZN5WAI4674NBF5ZRX6ZG7YEILVMRDGQT3NWHA7Q5ZMXQXQ via: ["quux"] incoming: "/tmp" # or more appropriate path; only if you intend to freq active from news.quux.org exec: { rnews: ["/usr/local/bin/rnews"] # hardcoded with -h news.quux.org } }
This local copy of rnews wraps the actual rnews:
#!/bin/sh exec /usr/bin/rnews -h news.quux.org
Create a new /usr/local/bin/nncp-uux:
#!/usr/bin/env bash set -eo pipefail while [ -n "$1" ]; do if echo "$1" | grep -q "!rnews"; then HOST="$(echo "$1" | sed 's/!rnews//')" # This exec will terminate the script here exec /usr/bin/nncp-exec -quiet "$HOST" rnews fi shift done echo "Couldn't find valid host" exit 5
OK. I think I’m done with the NNCP setup (and I haven’t asked John Goerzen for the news.quux.org connection).
I’m ready to set up a local news server. I think I should try and get that working, first of all.
Installing inn2 fails:
Setting up inn2 (2.6.3-1+deb10u2) ... innconfval: hostname does not resolve or domain not set in inn.conf dpkg: error processing package inn2 (--configure): installed inn2 package post-installation script subprocess returned error exit status 1
This is a weird problem to have. You need to install it for the inn.conf file to exist, and it fails because the default values don’t work.
Well, now that I have a borked install, I can continue with the instructions, editing /etc/news/inn.conf. Here’s what I’ve changed:
pathhost: news.alexschroeder.ch domain: alexschroeder.ch innflags: "-C" addinjectionpostinghost: false complaints: alex@alexschroeder.ch
I don’t need to touch the TLS/SSL support section as I will be using NNCP.
Let’s see if I can reinstall inn2, now.
sudo apt reinstall inn2
No errors this time. 😃
Let’s try to create a newsgroup:
sudo -u news /usr/lib/news/bin/ctlinnd newgroup campaignwiki.misc y ctlinnd: no innd.pid file; did server die? ctlinnd: cannot send "newgroup" command (sendto failure): No such file or directory
Uhm, that’s not good. And when I restart inn2, I still get weird output:
sudo systemctl restart inn2 sudo journalctl -u inn2 … Starting LSB: INN news server... … SERVER descriptors 1023 … SERVER outgoing 1010 … Starting news server: innd. … Started LSB: INN news server. … dbz: bad first line in .dir history file … dbzinit: getconf failure … can't dbzinit /var/lib/news/history Numerical argument out of domain … dbzclose: not opened! … can't dbzclose /var/lib/news/history Numerical argument out of domain … SERVER can't open history /var/lib/news/history: Numerical argument out of domain
And of course newsgroup creation still fails.
Looking at the directory in question and considering @nono’s friendly suggestions, I’m thinking I will try to rebuild those files in /var/lib/news?
-rw-r--r-- 1 news news 0 Feb 6 13:35 .news.daily -rw-r--r-- 1 news news 178 Feb 6 12:35 active -rw-r--r-- 1 news news 0 Feb 6 13:35 active.times -rw-r--r-- 1 news news 0 Feb 6 12:35 history -rw-rw-r-- 1 news news 93 Feb 6 12:35 history.dir -rw-rw-r-- 1 news news 0 Feb 6 12:35 history.pag -rw-r--r-- 1 news news 243 Feb 6 12:35 newsgroups
Sadly, that doesn’t seem to be possible. Or maybe it is? The order seems important…
sudo systemctl stop inn2 sudo -u news /usr/lib/news/bin/makehistory makehistory: tradspool: mapping file /var/spool/news/tradspool.map not found sudo -u news /usr/lib/news/bin/makedbz sudo -u news /usr/lib/news/bin/makehistory
OK, now:
ls -l /var/lib/news/ -rw-r--r-- 1 news news 178 Feb 6 12:35 active -rw-r--r-- 1 news news 0 Feb 6 13:35 active.times -rw-r--r-- 1 news news 0 Feb 6 17:36 history -rw-rw-r-- 1 news news 43 Feb 6 17:36 history.dir -rw-r--r-- 1 news news 0 Feb 6 17:36 history.hash -rw-r--r-- 1 news news 0 Feb 6 17:36 history.index -rw-r--r-- 1 news news 43 Feb 6 17:36 history.n.dir -rw-r--r-- 1 news news 0 Feb 6 17:36 history.n.hash -rw-r--r-- 1 news news 0 Feb 6 17:36 history.n.index -rw-rw-r-- 1 news news 0 Feb 6 12:35 history.pag -rw-r--r-- 1 news news 243 Feb 6 12:35 newsgroups
And restart:
sudo systemctl start inn2
I think we’re doing better this time!
sudo journalctl --unit inn2 … Starting LSB: INN news server... … SERVER descriptors 1023 … SERVER outgoing 1010 … Started LSB: INN news server. … Starting news server: innd. … SERVER ccsetup control:12 … SERVER lcsetup localconn:14 … SERVER rcsetup remconn:15 … SERVER rcsetup remconn:17 … controlchan! spawned controlchan!:21:proc:59365 … SERVER perl filtering enabled … SERVER starting … starting … ctlinnd command s
Yes we are!
sudo -u news /usr/lib/news/bin/ctlinnd newgroup campaignwiki.misc y Ok
I installed tin! Use y to show all the groups available. And here’s my group!
Group Selection (6) h=help u 1 control News server internal gro u 2 control.cancel News server internal gro u 3 junk News server internal gro u 4 misc.test For testing of network s u 5 misc.test.moderated Testing of posting to mo 6 campaignwiki.misc <n>=set current to n; n=next unread; g,/=search pattern; c=catchup ^N=line down; ^P=line up; h=help; m=move; q=quit; r=toggle all/unread s=subscribe; S=sub pattern; u=unsubscribe; U=unsub pattern; y=yank i... *** End of groups ***
Use s to subscribe, use y to no longer show the other groups, use w to write a new post for the newsgroup.
Done!
Sadly, the post doesn’t seem to show when I try to visit the group: it keeps telling me “no articles”.
I found some mail for the admin saying:
No .news.daily file; need to run news.daily?
I don’t know. Do I?
I checked /etc/cron.d/inn and ran the first command from there:
sudo -u news /usr/lib/news/bin/news.daily expireover delayrm
I got a very long email…
sudo mail -f /var/mail/mail
What’s annoying is that now the command “Web Content” seems to be eating a lot of CPU. How annoying! Ventilator going round and round.
I was wondering… Did I purge the inn config files? Maybe not. I had both /etc/cron.d/inn and /etc/cron.d/inn2 and that’s not right.
sudo apt purge inn sudo systemctl restart inn2
Oops, now I get an error!
cat /var/log/news/rc.news INND: No active file!
How anyoing.
sudo apt reinstall inn2 sudo -u news /usr/lib/news/bin/makedbz sudo -u news /usr/lib/news/bin/makehistory sudo -u news /usr/lib/news/bin/ctlinnd newgroup campaignwiki.misc y
Perhaps we’re back, now? Better reboot.
#Usenet #INN #Administration #NNCP