1TINYLEAF(8)               InterNetNews Documentation               TINYLEAF(8)
2
3
4

NAME

6       tinyleaf - Very simple IHAVE-only NNTP server
7

SYNOPSIS

9       tinyleaf spool [processor]
10

DESCRIPTION

12       tinyleaf is intended to be the simplest possible transit news server
13       that still does something useful.  It must be run under inetd(8) or
14       some equivalent, and only implements three commands (HELP, IHAVE, and
15       QUIT).  When it receives an article, it saves it into the directory
16       spool and, if processor is given, passes information about the article
17       to processor via a pipe.  The file name of the article will be the MD5
18       hash of its message-ID, and if a file by that name already exists,
19       tinyleaf will refuse the article, reporting it as a duplicate.
20
21       If processor is given, it should specify the path to a program.  That
22       program is started when tinyleaf starts, and its current working
23       directory will be spool.  For each article received by tinyleaf, a
24       single line will be sent to standard input of processor.  That line
25       will consist of the file name of the received article (relative to
26       spool), a single space, and the message-ID of the received article.
27       Note that the message-ID will be taken from the argument to the IHAVE
28       command and may not match the Message-ID: header in the article.  When
29       tinyleaf shuts down, standard input to processor will be closed.
30
31       tinyleaf does no syntax verification of received articles whatsoever;
32       it just stores them and optionally passes them off to processor.  It
33       also never deletes articles; normally, processor should do that when
34       it's finished doing whatever it needs to with the article.
35
36       tinyleaf expects NNTP commands on standard input and replies on
37       standard output.  Status information and any error messages are sent to
38       standard error.  It does no authentication; any authentication must be
39       done by inetd(8) or by a wrapper program.  (One simple authentication
40       mechanism is to invoke tinyleaf via tcpd(8) from TCP wrappers and use
41       /etc/hosts.allow and /etc/hosts.deny to restrict who can talk to the
42       server.)
43
44       tinyleaf has a (currently hard-coded) maximum message size of 1 MB and
45       a (similarly hard-coded) timeout of ten minutes for each command or
46       chunk of article data.
47

EXAMPLE

49       Suppose that you want to archive news articles on a particular host
50       (like the FTP server for a newsgroup archive) where you don't want the
51       overhead of running a full-blown news server.  Write a program that
52       reads one line at a time from standard input and treats everything
53       before the first space as the filename of a news article to archive.
54       Each time the program reads a line, it should archive that file and
55       then delete it, and it should exit when it gets end of file on standard
56       input.
57
58       Then, add a line like:
59
60           nntp stream tcp nowait archive /usr/sbin/tcpd \
61             <pathbin>/tinyleaf <pathspool>/tinyleaf <pathbin>/archive
62
63       (all on one line -- the backslash and split in this line is just for
64       readability) where "archive" is the user that owns the archive,
65       /usr/sbin/tcpd is the path to tcpd(8), pathbin/tinyleaf is the path to
66       this program, pathspool/tinyleaf is some scratch directory that the
67       user "archive" has write access to, and pathbin/archive is the path to
68       your archive script.
69
70       You can now restrict access to tinyleaf to just your local news server
71       with "/etc/hosts.allow" and "/etc/hosts.deny" and set up an ordinary
72       feed from the server to the archive host, just like you would to any
73       other news server, of only the newsgroup that you want to archive.
74
75       Note that the archiving script should probably perform basic syntax and
76       validity checks on the input, since tinyleaf doesn't.
77
78       This is the application that motivated the original development of this
79       program.
80

BUGS

82       The timeout and maximum message size should really be configurable.
83       tinyleaf should also probably not just respond 500 to every command
84       other than HELP, IHAVE, and QUIT; there are more useful (and more
85       expected) error codes that could be returned.
86
87       An option to scan the spool directory for any left-over files and pass
88       them to the processor when starting up would be useful.
89

HISTORY

91       Written by Russ Allbery <eagle@eyrie.org> for InterNetNews.
92
93       $Id: tinyleaf.pod 9767 2014-12-07 21:13:43Z iulius $
94

SEE ALSO

96       hosts_access(5), inetd(8), tcpd(8).
97
98
99
100INN 2.6.4                         2015-09-12                       TINYLEAF(8)
Impressum