Newsreaders and INN Newsreaders running on the same
Newsreaders and INN Newsreaders running on the same machine as the server (or having mounted the server’s news spool via NFS) can read articles from the spool directly. To post an article composed by the user, they invoke the inewsprogram, which adds any header fields that are missing and forwards them to the daemon via NNTP. Alternatively, newsreaders can access the server remotely via NNTP. This type of connection is handled differently from NNTP-based news feeds, to avoid tying up the daemon. Whenever a newsreader connects to the NNTP server, innd forks a separate program called nnrpd, which handles the session while innd returns to the more important things (receiving incoming news, for example).138 You may be wondering how the innd process can distinguish between an incoming news feed and a connecting newsreader. The answer is quite simple: the NNTP protocol requires that an NNTP-based newsreader issue a mode reader command after connecting to the server; when this command is received, the server starts the nnrpd process, hands the connection to it, and returns to listening for connections from another news server. There used to be at least one DOS-based newsreader which was not configured to do this, and hence failed miserably when talking to INN, because innd itself does not recognize any of the commands used to read news if it doesn’t know the connection is from a news reader. We’ll talk a little more about newsreader access to INN under “Controlling Newsreader Access,” later in the chapter. Installing INN Before diving into INN’s configuration, let’s talk about its installation. Read this section, even if you’ve installed INN from one of the various Linux distributions; it contains some hints about security and compatibility. Linux distributions included Verson INN-1.4sec for quite some time. Unfortunately, this version had two subtle security problems. Modern versions don’t have these problems and most distributions include a precompiled Linux binary of INN Version 2 or later. If you choose, you can build INN yourself. You can obtain the source from ftp.isc.org in the /isc/inn/ directory. Building INN requires that you edit a configuration file that tells INN some detail about your operating system, and some features may require minor modifications to the source itself. Compiling the package itself is pretty simple; there’s a script called BUILD that will guide you through the process. The source also contains extensive documentation on how to install and configure INN. After installing all binaries, some manual fixups may be required to reconcile INN with any other applications that may want to access its rnewsor inews programs. UUCP, for instance, expects to find the rnewsprogram in /usr/bin or /bin, while INN installs it in /usr/lib/bin by default. Make sure /usr/lib/bin/ is in the default search path, or that there are symbolic links pointing to the actual location of the rnews and inews commands. Configuring INN: the Basic Setup One of the greatest obstacles beginners may face is that INN requires a working network setup to function properly, even when running on a standalone host. Therefore, it is essential that your kernel supports TCP/IP networking when running INN, and that you have set up the loopback interface as explained in Chapter 5, Configuring TCP/IP Networking. Next, you have to make sure that innd is started at boot time. The default INN installation provides a script file called boot in the /etc/news/ directory. If your distribution uses the SystemV-style init package, all you have to do is create a symbolic link from your /etc/init.d/inn file pointing to /etc/news/boot. For other flavors of init, you have to make sure /etc/news/boot is executed from one of your rc scripts. Since INN requires networking support, the startup script should be run after the network interfaces are configured. The name apparently stands for NetNews Read & Post Daemon.