2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY latex "LaTeX">
6 <book id="sonews.xml" lang="en">
7 <title>sonews Usenet News Server</title>
9 <emphasis role="bold">sonews</emphasis> is NNTP server than can provide
10 access to both local and global Usenets newsgroups. It is written in
11 <ulink url="http://java.sun.com/">Java</ulink> and uses a relational
15 <emphasis role="bold">2009/07/01</emphasis>:
16 <emphasis>sonews/0.5.1</emphasis>
17 (<ulink url="files/sonews-0.5.1.tar.bz2">binary tarball</ulink>,
18 <ulink url="files/sonews-0.5.1-src.tar.bz2">source tarball</ulink>) bugfix
20 Broken Cancel-mechanism and broken buildscript fixed.
21 See <ulink url="http://code.xerxys.info:8000/hgwebdir.cgi/sonews-0.5/log/287">
22 changelog</ulink> for more details.
25 <emphasis role="bold">2009/06/29</emphasis>:
26 <emphasis>sonews/0.5.0</emphasis>
27 (<ulink url="files/sonews-0.5.0.tar.bz2">binary tarball</ulink>,
28 <ulink url="files/sonews-0.5.0-src.tar.bz2">source tarball</ulink>) final
30 The setup is a little clumsy but the software is stable and works well.
34 <title>Introduction</title>
35 <para>sonews is a RCF3977 compliant NNTP Usenet server.
36 It is written in Java and uses a relation database management system
37 (RDBMS) as backend (currently
38 <ulink url="http://www.postgresql.com/">PostgreSQL</ulink> and
39 <ulink url="http://www.mysql.com/">MySQL</ulink>).
40 sonews is highly multithreaded and uses Java NIO asynchronous sockets
41 to handle thousands of concurrent connections.</para>
42 <para>sonews is Free and Open Source Software (FOSS) licensed under the
44 <ulink url="http://www.gnu.org/licenses/gpl.html">GNU General Public License</ulink>
45 Version 3 (or later).</para>
48 <title>History</title>
49 <para>Ancestor of sonews is probably the Neat NNTP Daemon (n3tpd)
50 although there is very little code in sonews that can be identified
52 sonews was developed as diploma thesis project of Christian Lins at
53 <ulink url="http://de.sun.com/">StarOffice development</ulink>
54 in Hamburg and is now a Free Software project.</para>
58 <title>Roadmap</title>
60 <title>sonews/0.6</title>
61 <para>Planned to implement the XPAT command for searching, correctly
62 hashed Message-Ids and a news purging command.
63 See <ulink url="http://bugs.xerxys.info/">Bugtracker</ulink> for
64 issues with target sonews/0.6.x.</para>
70 <title>Installation and initial setup</title>
72 <title>Download & Installation</title>
74 <title>Debian based systems</title>
75 <para>You can install sonews with
76 <ulink url="http://www.debian.org/doc/manuals/apt-howto/">APT</ulink>
78 Add the following line to /etc/apt/sources.list:</para>
79 <screen>deb http://packages.xerxys.info/debian/ unstable main
81 <para>And add the GPG-Key for package authentification, see
82 <ulink url="http://packages.xerxys.info/debian/">Xerxys Debian Repository</ulink>
83 for more details.</para>
84 <para>Then force an update of your local package list:</para>
85 <screen># apt-get update
87 <para>To install sonews and all prerequisites issue the following command:</para>
88 <screen># apt-get install sonews
90 <para>This method should work for all recent Debian-based distributions
91 (<ulink url="http://www.debian.org/">Debian</ulink>, <ulink url="http://www.ubuntu.com/">Ubuntu</ulink>, etc.).</para>
95 <title>Other *nix systems</title>
96 <para>See <ulink url="files/">Files Section</ulink> for recent binary and source tarballs.</para>
97 <para>Use the binary archive and extract it in a directory of your choice. Make sure your system
98 provides the necessary prerequisites:</para>
101 <para>Java6 compatible runtime (JRE)</para>
104 <para>Java Mail API implementation, e.g. <ulink url="http://java.sun.com/products/javamail/">Sun Java Mail</ulink>.
105 GNU JavaMail has a broken POP3 Provider and does not work with sonews.</para>
108 <para>JSP Servlet Container (e.g.
109 <ulink url="http://kitten.sonews.org/">Kitten</ulink>) [optional]</para>
116 <title>Initial database setup</title>
117 <para>Before you start sonews, you must prepare the database. Currently sonews is known
118 to work with PostgreSQL and MySQL.</para>
119 <para>It is highly recommended to create an own database for every sonews instance, e.g.
120 called 'sonews'. Additionally, it is recommended to create a unique database user
121 for sonews, e.g. 'sonewsuser'. Please do not use the root user for sonews!
122 The sonews user needs rights for SELECT, INSERT and UPDATE statements.
123 Refer to the database's manual for instructions.</para>
124 <para>You will find the SQL Schema definitions in the helpers subdirectory of
125 the source and binary distributions. You can create the tables manually using
126 this templates or you can use the setup helper:</para>
127 <screen>user@debian$ sonews setup
129 <para>or on other *nix systems:</para>
130 <screen>user@nix$ java -jar sonews.jar org.sonews.util.DatabaseSetup
132 <para>The tool will ask for some information about your database environment,
133 connect to the database, create the tables and creates a default bootstrap
134 config file called sonews.conf.</para>
139 <title>Running sonews</title>
141 <title>Configuration</title>
142 <para>There is a bootstrap configuration in /etc/sonews/sonews.conf and a regular configuration
143 in the database table config.</para>
144 <para>There are various configuration values that can be adapted:</para>
147 <term>‘<literal>sonews.article.maxsize</literal>’</term>
149 <para>Maximum allowed body size of a news message given in kilobytes. Please note that
150 for MySQL the ‘<literal>max_allowed_packet</literal>’ configuration variable must
151 be set to a value higher than ‘<literal>sonews.article.maxsize</literal>’ otherwise posting
152 of large mails will fail.</para>
156 <term>‘<literal>sonews.debug</literal>’</term>
159 If set to true every(!) data going through sonews' socket
160 is written to sonews.log. After a night the logfile can be
161 several gigabytes large, so be careful with this setting.
166 <term>‘<literal>sonews.hostname</literal>’</term>
168 <para>Canonical name of the server instance. This variable is part of the server's
169 hello message to the client and used to generate Message-Ids.</para>
173 <term>‘<literal>sonews.timeout</literal>’</term>
175 <para>Socket timeout for client connections in seconds.</para>
179 <term>‘<literal>sonews.port</literal>’</term>
181 <para>Listening port of sonews daemon.</para>
188 <title>Command line arguments</title>
189 <para>If you like to start sonews directly, you can use one of the following
191 <screen>java -jar sonews.jar [arguments]
193 -c|-config <path to config file> if custom config file preferred
194 -dumpjdbcdriver Prints out a list of available JDBC drivers
195 -feed Enables feed daemon for pulling news from peer servers
197 -mlgw Enables the Mailinglist Gateway poller
198 -p portnumber Port on which sonews is listening for incoming connections.
199 Overrides port settings in config file and database.
205 <title>Webinterface</title>
206 <para>The package sonews-web provides an optional webinterface that can be used to
207 review statistical information and configuration values of sonews.</para>
208 <screen>sonews-web start|stop
210 <para>The webinterface uses the the lightweight Servlet Container Kitten and is
211 per default listening on HTTP-Port 8080 (go to http://localhost:8080/sonews).</para>
216 <title>Development</title>
217 <para>You're welcome to create patches with bugfixes or additional features. The
218 Mercurial DSCM makes this step an easy task.</para>
219 <para>Just clone the public <ulink url="http://www.selenic.com/mercurial/">Mercurial</ulink> repository:</para>
220 <screen>hg clone http://code.xerxys.info:8000/hg/sonews/trunk sonews-trunk
222 <para>Then make your changes, create a bundle of changesets and send this to me via email.
223 Or ask for push access to the public repository.</para>
225 There is a nightly generated <ulink url="apidoc/">Javadoc API documentation</ulink> that will help
226 you to get in touch with the sonews source.
228 <para>Some debugging hints: if the server blocks and does not longer respond you
229 probably found a deadlock. Do not kill the process with "kill -9 <pid>"
230 but send a SIGQUIT signal with "kill -3 <pid>" and the Java VM will output
231 a stracktrace of all threads. This output is the most valuable information to
232 fix the deadlock.</para>
235 <title>Contributors</title>
236 <para>Maintainer and project lead:
237 Christian Lins (contact christian.lins (at) fh-osnabrueck.de)</para>
241 <title>Sponsors</title>
242 <para>The author thanks <ulink url="http://www.sun.com/">Sun Microsystems</ulink> for fully
243 financing the first version of sonews. A really free software supporting company!</para>
244 <para>If you like to support sonews with a donation of any kind (hardware, books, money, donuts,...),
245 feel free to contact the project leader.
246 A friendly email or a bug report is most welcome, too :-)</para>
251 <title>Links and further information</title>
254 <para><ulink url="http://bugs.xerxys.info/">Bugtracker</ulink>, register necessary, see project 'sonews'.</para>
257 <para><ulink url="http://www.sun.com/">Sun Microsystems</ulink>, friendly sponsor.</para>
260 <para><ulink url="http://www.fh-osnabrueck">University of Applied Sciences Osnabrueck</ulink></para>