Leafnode-1.11.5

Introduction to Leafnode

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

Package Information

Leafnode Dependencies

Required

PCRE-6.7 and TCP Wrapper-7.6

Recommended

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/leafnode

Installation of Leafnode

As the root user, create the group and user news, if not present:

groupadd -g 36 news &&
useradd -c "Leafnode News Server" -d /var/spool/news -g news \
        -u 36 news

Install Leafnode by running the following commands:

./configure --prefix=/usr \
    --localstatedir=/var --sysconfdir=/etc/leafnode \
    --with-lockfile=/var/lock/leafnode/fetchnews.lck &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

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

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

make update: Run this command if you are upgrading from a very old version of Leafnode.

Configuring Leafnode

Config Files

/etc/leafnode/config, /etc/nntpserver, /etc/sysconfig/createfiles /etc/inetd.conf or /etc/xinetd.conf or /etc/xinetd.d/nntp

Configuration Information

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

cp /etc/leafnode/config.example /etc/leafnode/config

Change the

server = 

entry to reflect your news provider.

The /etc/nntpserver file must contain 127.0.0.1 to prevent news clients from reading news from the upstream feed. Create this file using the following command:

cat > /etc/nntpserver << "EOF"
127.0.0.1

EOF

The /etc/rc.d/init.d/cleanfs script, part of the LFS bootscript package, will remove the /var/lock/leafnode directory during the system boot sequence. Install the following line in the /etc/sysconfig/createfiles file to re-create the directory:

/var/lock/leafnode   dir   2775   news   news

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.

If you use xinetd, the following command will create the Leafnode file as /etc/xinetd.d/nntp:

cat >> /etc/xinetd.d/nntp << "EOF"
# Begin /etc/xinetd.d/nntp

        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
        }

# End /etc/xinetd.d/nntp
EOF

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

Add entries to the root or news user's crontab to run the fetchnews and texpire commands at the desired time intervals.

Contents

Installed Programs: applyfilter, checkgroups, fetchnews, leafnode, leafnode-version, newsq, and texpire
Installed Libraries: None
Installed Directories: /etc/leafnode, /var/lock/leafnode, and /var/spool/news

Short Descriptions

applyfilter

filters newsgroup articles according to regular expressions.

checkgroups

inserts newsgroup titles into the newsgroup database.

fetchnews

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

leafnode

is an NNTP server daemon.

leafnode-version

prints the Leafnode version.

newsq

shows articles waiting to be sent upstream.

texpire

expires old articles and unread groups.

Last updated on 2007-01-15 17:25:53 -0600