Use cyrus as « newsgroup server » throw IMAP
If you have a cyrus-imap was installed, you can use it as « nntp reader » (all examples are with a Debian Etch).
My problem is : I have many computer where I read my mail, blog (rss) and now newsgroup.
For my mails, I use a IMAP server (cyrus-imap), for my rss I use FoFRedux and now I search a solution for read newsgroup.
Now with cyrus-imap you can feed newsgroup in NNTP :
apt-get install cyrus-nntpd-2.2
In a directory (such as home directory). You can launch it as normal user. It’s to get tools scripts
apt-get source cyrus-imapd-2.2
vi /etc/cyrus.conf
uncomment nntp lines
vi /etc/imapd.conf
add :
newsprefix: news
Restart cyrus
get mknewsgroups script
wget ftp://ftp.isc.org/usenet/CONFIG/active
./mknewsgroups -n -u cyrus -w fr.comp.text.tex -a "anyone +p news write" localhost
you get this :
reading configure file...
you are using "news" as your news prefix.
done
C01 CREATE "news.fr.comp.text.tex"
S01 SETACL "news.fr.comp.text.tex" news write
S02 SETACL "news.fr.comp.text.tex" anyone +p
If you think it’s ok :
./mknewsgroups -u cyrus -w fr.comp.text.tex -a "anyone +p news write" localhost
cat /usr/local/bin/cyrus-fetchnews
#! /bin/sh
CONF="/etc/news-cyrus-abo"
env > /tmp/cyfetch
if [ ! -f ${CONF} ]; then
echo "${CONF} missing..."
exit 1
fi
if [[ ${LOGNAME} != "cyrus" ]]; then
echo "Must be run as cyrus User"
exit 2
fi
source ${CONF}
for ng in ${ABO_GROUPS}; do
/usr/lib/cyrus/bin/fetchnews ${OPTIONS} -w ${ng} ${SERVER}
done
cat /etc/news-cyrus-abo
SERVER="news.free.fr"
OPTIONS="-n -y"
ABO_GROUPS="fr.comp.text.tex comp.text.tex"
cat /etc/cron.d/cyr-newsgroup
MAILTO=root
*/5 * * * * cyrus /usr/local/bin/cyrus-fetchnews
0 0 * * * cyrus /usr/sbin/cyr_expire -E 60 -v
mboxcfg news expire 60
& to check it :
localhost.localdomain> info news
{news}:
expire: 60
lastpop:
lastupdate: 16-Feb-2007 09:46:58 +0100
partition: default
size: 0
It’s done 😉 & now you can view newsgroup in you favorite IMAP client.