Leafnode & aioe.org howto

 

Table of contents

  1. Introduction
  2. How to fetch remote messages
  3. How to post local articles

 
1. Introduction
 
Leafnode is an open source NNTP cache server designed for small local networks. When somebody connects to Leafnode and requests a previously unseen group, it starts to download the articles from a real remote NNTP server acting as a normal client. If the local users don't read a newsgroup any more, automatically Leafnode stops downloading from this group. This method has got the great advantage to save bandwidth and system resources because Leafnode keeps only those groups which are read by its local users.
Leafnode can retrieve the articles through several different servers so if a single remote host goes down, the local users can still read the news. Leafnode also allows to choose which remote server has to be used to send the local posts. In this way, the local server can download the articles from several fast read only real hosts and - at the same time - it can post its own local messages through the slower Aioe.org. All these routing processes are made by Leafnode in a transparent manner.
 

 
2. How to fetch remote messages
 
A good tutorial about Leafnode is available in the Linux.ie site. The most important Leafnode configuration file is called config. Debian GNU Linux stores it in the /etc/news/leafnode/ directory. This file contains all Leafnode configuration directives and it has to be modified with care. All statements have exactly three mandatory fields: a plain text parameter, an assignment character (=) optionally surrounded by whitespace and a value. A detailed description of each parameter is available on the Leafnode official site.

Those who wish to use the Aioe.org server as the only one remote host, could replace their original Leafnode config file with the following example:
 
# Keep the articles for 70 days
expire = 70

# Fetch max the last 500 articles
maxfetch = 500
# The max size of each article is 32KB
maxbytes = 32000

# Max 3 groups may be inserted as crosspost
maxcrosspost = 3
# Fetch the articles from news.aioe.org
server = nntp.aioe.org

# Avoid to download the group descriptions
nodesc = 1
# Don't use XOVER (which is slow)
noxover = 1

# Send only if all destination groups are available on aioe.org
only_groups_match_all = 1
 
Using this configuration, Leafnode will download all remote articles and will post all local messages through news.aioe.org. We don't recommend this setup because it doesn't offer any advantage over the traditional newsreaders.
There are some read only public NNTP servers which are faster and more reliable than the Aioe.org hosts. Using the configuration shown below, Leafnode will download the articles from both nntp.aioe.org and news.aioe.org
 
# Keep the articles for 70 days
expire = 70
maxfetch = 500
maxbytes = 32000
maxcrosspost = 3

## Aioe.org Configuration

# nntp.aioe.org

server = nntp.aioe.org
only_groups_match_all = 1
nodesc = 1
noxover = 1

# news.aioe.org

server = news.aioe.org
nopost = 1

 

 
Advanced users could desire to have got a backup server. In this way, when all involved servers work well, the download is faster and the articles are propagated in less time. When a single host goes down, Leafnode is still able to download the messages and to post the local articles. In this example four servers are involved:

 

Expire = 70
maxbytes = 32000
maxcrosspost = 3
maxfetch = 3000

### Outgoing Servers (local messages are sent to them)
server = nntp.aioe.org
noread = 1
only_groups_match_all = 1

server = news.mixmin.net
noread = 1
noactive = 1
post_anygroup = 1
### Incoming server (remote articles are received from these hosts)

server = dp-news.maxwell.syr.edu
nopost = 1
server = biggulp.readfreenews.net
nopost = 1

 
3. How to post local articles

 

The Aioe.org server refuses as antispam measure all articles which include a wrong time in the Date header. This implies that those who are using suckfeeds must delete the Date header from all outgoing messages before sending them to us. Leafnode doesn't include any built-in filter but all outgoing messages are saved in a spool directory called out.going. Each file includes a single message and fetchnews doesn't care about the headers when sends them to the remote server. This simple bash script does this (thanks to Ali Polatel <31415926j@gmail.com>)
 
#!/bin/bash
OUT="/var/spool/news/out.going"
sed -i -e "/^Date:/d" $OUT/*
/usr/sbin/fetchnews -q  >/dev/null 2>&1