Leafnode FAQ (original) (raw)

A good way to approach communication problems with leafnode is to switch on the debugmode. This is done by putting "debugmode = 1" into the leafnode configuration file and then turning on the logging of the "debug" priority for the facility "news" in /etc/syslogd.conf. To turn on logging, do the following:

This most frequently seems to happen on Linux. The reason is that Leafnode depends on some system-specific information which is usually included in the sources of the kernel. Unfortunately, nowadays many Linux distribution do not install kernel sources by default; therefore, compilation of Leafnode (and most other programs as well) will fail. The obvious solution is to install the kernel sources. If compilation still does not work afterwards, complain to your distributor. On Linux, if the kernel sources are installed in /usr/src/linux-a.b.cc (with a.b.cc being the version number of your kernel), create a symlink to /usr/src/linux.

I have never done this myself, but leafnode should have no problems with it. Assuming that your new server is called "new.upstream.server" and your old server "old.upstream.server", I recommend following the procedure outlined below:

Most likely your setup is incorrect. This can have several reasons.

You can test your setup by opening a telnet connection to your newsserver. This is done by doing "telnet localhost 119". You should get back something like

where xx is the version number and yy your hostname. Type "quit" after seeing this message. If you don't get any connection at all or something different, check through points 1-4 above.

Beginning with version 7.1, Redhat has replaced inetd with xinetd. xinetd is an advanced inetd which features access control by itself (i.e. you do not need tcpwrappers). Unfortunately, its configuration syntax is completely different from the one in inetd.conf.

Here is a sample /etc/xinetd/leafnode entry. The entry in the "server" field has to point to your locally installed leafnode executable. Dependent on the installation, this executable may not reside in /usr/sbin but elsewhere (e.g. /usr/local/sbin if you installed leafnode from the source code).

If the leafnode binary is not installed in /usr/sbin but elsewhere (for example in /usr/local/sbin), you will have to adjust the path in the "server" field.

5. My news reader complains about repeated frequent timeouts of the NNTP server.

This is most likely the result of a corrupt groupinfo file. Rebuild it by starting fetchnews with the -f parameter.

[ Back to top ]

6. Does Leafnode support local newsgroups?

The 1.x versions do not support local newsgroups. The 2.x versions will do that.

[ Back to top ]

7. tin complains about a missing file "/var/lib/news/active".

Either you have started the wrong version of tin (the one which tries to read news directly from the spool) or your groupinfo file is corrupt.

In the first case, simply invoke tin with the -r flag: "tin -r". If this does not help, try to rebuild the groupinfo file by starting fetchnews with the -f flag.

[ Back to top ]

8. When searching news with Netscape, I only get back "unknown command".

To search news, older versions of Netscape needed a news server which supports the XPAT command. Leafnode does not. If you want to use Netscape, you have to upgrade to version 4.5 and press the "options" button which appears in the "search messages" window. In the box which appears you have to select "on your local system".

[ Back to top ]

9. When running leafnode in "delaybody" mode, I can only view the headers with Netscape/Outlook Express.

This is a problem of Netscape and Outlook Express, not of Leafnode. These programs store read articles in the cache and (for some odd reason) refuse to reload an article that has been already read. To force Netscape to reload articles, clear the cache (Options/Network Preferences in version 3.0x). Better, get a sensible newsreader. (If somebody has a solution for OE, please email me.)

[ Back to top ]

10. fetchnews does not fetch any articles.

Here are the two most common occurences which cause this error:

  1. Your groupinfo file is corrupt. Restart fetchnews with the -f parameter.
  2. /var/spool/news may have the wrong permissions. /var/spool/news and all its subdirectories should be drwxrwsr-x and owned by user and group news.

[ Back to top ]

11. Fetchnews is slow. Can I speed it up?

In the 1.9.x versions of fetchnews, each command is handled at a time. Since headers and bodies are fetched separately, fetchnews is quite slow when compared to other news transport programs. There is currently no remedy for that problem other than to wait for 2.x.

[ Back to top ]

12. fetchnews has problems retrieving new newsgroups.

Maybe your upstream server supports neither the "XGTITLE news.group.name" nor the "LIST NEWSGROUPS news.group.name" command. In this case, add "nodesc" to your server entry as described in leafnode(8) and the config.example file.

[ Back to top ]

13. When fetching articles, the connection is interrupted by the pppd.

The article which causes the interruption contains three plus signs ("+++") which is interpreted by a subset of modems as the beginning of a command. You can either change the command introduction sequence or switch off the command completely. Consult the instructions of your modem to find out how this is done.

[ Back to top ]

14. fetchnews crashes with a segmentation fault.

This should not happen, especially not with the current version. As a workaround, do the following: If fetchnews crashes during posting, it helps to post the articles separately (with "fetchnews -P"). If fetchnews crashes during reading news, repeatedly calling it will often fetch all the articles.

[ Back to top ]

15. I want to invoke fetchnews as normal user.

Fetchnews can only be started as user root or news. Many people find this inconvenient, but it improves security on the system and prevents possible damage from berserk processes.

The tool "sudo" allows a normal user to start any other program with root or other priorities. "sudo" is available fromhttp://www.courtesan.com/sudo/.

If "sudo" is installed on your system, root priviledges for fetchnews are invoked as follows:

  1. As user root, invoke the program "visudo". This will edit the file /etc/sudoers.
  2. Enter the following line (replace "username" with the name of the user who wants to invoke fetchnews and "hostname" with the name of your machine or ALL):
    username hostname = (news) NOPASSWD: /path/to/fetchnews
  3. Quit "visudo".
  4. Now the user who has been entered into /etc/sudoers may invoke fetchnews with
    sudo -u news /usr/sbin/fetchnews

[ Back to top ]

16. I have unsubscribed a newsgroup, but fetchnews still retrieves articles from it.

Your news reader talks to leafnode via the NNTP protocol. This protocol provides no means for Leafnode to determine which newsgroups you are actually subscribe. Therefore, Leafnode assumes that a newsgroup that is not read for a certain time (which can be configured with the "timeout_long" parameter) is unsubscribed and will only stop retrieving articles in it after this time.

If you are somewhat impatient and want to immediately stop fetchnews retrieving articles from a certain group, delete the appropriate file in the directory /var/spool/news/interesting.groups/ . The articles already in your spool will be normally expired by texpire.

[ Back to top ]

17. leafnode generates incorrect/incomplete message IDs.

First you should check whether it is indeed Leafnode which generates the message ID. Leafnode will not touch any message IDs generated by newsreaders (many of which generate message IDs themselves). A message ID that is generated by leafnode has the following general appearance:
<local-part.ln@host-name>
The local-part is generated by Leafnode and you cannot influence it. For host-name, Leafnode tries to figure out the name of your computer by calling gethostname(2) and using the return value for a gethostbyname(3) call. Therefore, if you set the name of your computer correctly (using hostname(1)) you should also get correct message IDs.

If you don't want to change the name of your machine, you can change the part of the Message-ID behind the @ sign by putting "hostname = correct.hostname" in your config file. For more information, see the leafnode(8) man page.

[ Back to top ]

18. texpire does not expire articles.

The backup software that you are using may not reset the atime after reading a file. Check if you can reconfigure it.

Run texpire with the -f parameter. This will expire articles somewhat earlier because the time of last access on the files will be ignored. If you have an urgent need to free some space in your spool directory, reduce the expiry time in the config file and re-run texpire -f.

[ Back to top ]

19. I want to switch off the automatic expiring of newsgroups.

Run fetchnews with the -n parameter.

[ Back to top ]

20. Why is Leafnode not licensed under the GPL?

There are several reasons:

  1. Originally, Arnt Gulbrandsen licensed Leafnode under his own license:

    Use, modification and distribution is allowed without limitation, warranty, or liability of any kind.
    This license is very broad. The same spirit is (in my opinion) contained in the X11 license, which is used by Leafnode nowadays.

  2. I do not like the philosophy of the FSF. They seem to emphasize that every project they conceived is good whereas everything else is bad. If they cannot argue the software away this way, they claim it to be part of the project, such as calling Linux "GNU/Linux". Or, as Arnt Gulbrandsen put it: Freedom includes the freedom to disagree with me and still use my software.

[ Back to top ]