NAME
nntpfs – network news transport protocol (NNTP) file system

SYNOPSIS
nntpfs [ –a ] [ –s service ] [ –m mountpoint ] [ system ]

DESCRIPTION
Nntpfs dials the TCP network news transport protocol (NNTP) port, 119, on system (default '$nntp') and presents at mountpoint (default /mnt/news) a file system corresponding to the news articles stored on system.

If the –s option is given, the file system is posted as /srv/service. If the –a option is given, nntpfs authenticates to the system with a user name and password obtained from factotum(4). The key specifier is
proto=pass service=nntp server=server user? !password?

The file system contains a directory per newsgroup, with dots turned into slashes, e.g., comp/os/plan9 for comp.os.plan9. Each newsgroup directory contains one numbered directory per article. The directories follow the numbering used by the server. Each article directory contains three files: article, header, and body. The article file contains the full text of the article, while header and body contain only the header or body.

Each newsgroup directory contains a write–only post file that may be used to post news articles. RFC1036–compliant articles should be written to it. The post file will only exist in a given newsgroup directory if articles are allowed to be posted to it. Other than that, the post file is not tied to its directory's newsgroup. The groups to which articles are eventually posted are determined by the newsgroups: header lines in the posted article, not by the location of the post file in the file system.

The qid version of a newsgroup directory is the largest numbered article directory it contains (~0, if there are no articles).

The modification time on a newsgroup directory is the last time a new article was recorded during this nntpfs session. To force a check for new articles, stat(2) the newsgroup directory.

To force a check for new newsgroups, stat(2) the root directory. Note that this causes the entire list of groups, which can be about a megabyte, to be transferred.

To terminate the connection, unmount the mount point.

Nntpfs makes no effort to send ``keepalives'' so that servers do not hang up on it. Instead, it redials as necessary when hangups are detected.

EXAMPLE
Authenticate to a private news server:
% echo key proto=pass service=nntp server=nose.mit.edu \
user=rsc !password=secret >/mnt/factotum/ctl
% nntpfs –a nose.mit.edu

SOURCE
/sys/src/cmd/nntpfs.c

BUGS
Directories are presented for deleted articles; the files in them cannot be opened.