Introduction to Leafnode

Leafnode is an NNTP server designed for small sites to provide a local USENET spool.

Package information

Leafnode dependencies


PCRE-4.5 and tcpwrappers-7.6

Installation of Leafnode

Create the group and user news, if not present:

groupadd news &&
useradd -g news news

Install Leafnode by running the following commands:

./configure --prefix=/usr --localstatedir=/var \
    --sysconfdir=/etc/news --with-lockfile=/var/lock/fetchnews.lck &&
make &&
make install &&
ldconfig &&
make update

Installation command explanations

--localstatedir=/var: Change the default spool directory of /usr/var.

--sysconfdir=/etc/news: leafnode reads its configuration data from a file called config which will be created in /etc/news to avoid any potential conflict with other packages.

make update: Create an initial /etc/news/config.example file, which must be renamed to /etc/news/config.

Configuring Leafnode

Config files

/etc/news/config, /etc/inetd.conf or /etc/xinetd.conf

Leafnode may be configured to use inetd by adding an entry to the /etc/inetd.conf file with the following command:

echo "nntp stream tcp nowait news /usr/sbin/tcpd /usr/sbin/leafnode" \
>> /etc/inetd.conf

Issue a killall -HUP inetd to reread the changed inetd.conf file.

Alternatively, Leafnode may be configured to use xinetd by adding an entry to the /etc/xinetd.conf file with the following command:

cat >> /etc/xinetd.conf << "EOF" 
        service nntp
           flags           = NAMEINARGS NOLIBWRAP
           socket_type     = stream
           protocol        = tcp
           wait            = no
           user            = news
           server          = /usr/sbin/tcpd
           server_args     = /usr/sbin/leafnode
           instances       = 7
           per_source      = 3

Issue a killall -HUP xinetd to reread the changed xinetd.conf file.

The /etc/news/config file must be edited to reflect the name of the upstream NNTP provider. Copy the example configuration file to /etc/news/config and save the original for reference:

cp /etc/news/config.example /etc/news/config

Change the

server = 

entry to reflect your news provider.

The NNTPSERVER environment variable must be set to to prevent news clients from reading news from the upstream feed, so add the following to /etc/profile or $HOME/.bash_profile:



The Leafnode package contains leafnode-version, leafnode, applyfilter, texpire, checkgroups, fetchnews and newsq.



leafnode-version prints the leafnode version.


leafnode is the NNTP server daemon.


applyfilter filters newsgroup articles according to regular expressions.


texpire expires old articles and unread groups.


checkgroups inserts newsgroup titles into the newsgroup database.


fetchnews sends posted articles to and retrieves new articles from an upstream news server.


newsq shows articles waiting to be sent upstream.