home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_495053bfcd616daf5f8fba9db9856a2b
< prev
next >
Wrap
Text File
|
2000-03-23
|
6KB
|
147 lines
<HTML>
<HEAD>
<TITLE>NNML::Server - a minimal NNTP server</TITLE>
<LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
<LINK REV="made" HREF="mailto:">
</HEAD>
<BODY>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> NNML::Server - a minimal NNTP server</P></STRONG>
</TD></TR>
</TABLE>
<A NAME="__index__"></A>
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
<LI><A HREF="#synopsis">SYNOPSIS</A></LI>
<LI><A HREF="#description">DESCRIPTION</A></LI>
<LI><A HREF="#authorization">AUTHORIZATION</A></LI>
<LI><A HREF="#features">FEATURES</A></LI>
<LI><A HREF="#bugs">BUGS</A></LI>
<LI><A HREF="#see also">SEE ALSO</A></LI>
<LI><A HREF="#author">AUTHOR</A></LI>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>NNML::Server - a minimal NNTP server</P>
<P>
<HR>
<H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
<UL>
<LI>Linux</LI>
<LI>Solaris</LI>
<LI>Windows</LI>
</UL>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<PRE>
perl -MNNML::Server -e server
perl -MNNML::Server -e unspool</PRE>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P><STRONG>NNML::Server</STRONG> server implements a minimal NNTP server. It is (hope-)
fully conformant to rfc977. In addition the commands <CODE>XOVER</CODE> and
<CODE>AUTHINFO</CODE> are implemented.</P>
<P>Supported commands:</P>
<PRE>
ARTICLE, AUTHINFO, BODY, GROUP, HEAD, HELP, IHAVE, LAST, LIST,
MODE, NEWGROUPS, NEWNEWS, NEXT, POST, QUIT, SLAVE, STAT</PRE>
<PRE>
XOVER, XHDR, LIST NEWSGROUPS ng-spec
</PRE>
<PRE>
The main reason for writing this was to synchronize my mail directories
across different hosts. The Mail directories are MH-Style with a F<.overview>
file in each folder and an F<active> file in the base
directory. These are maintained by the B<Emacs> B<Gnus> backend
B<NNML>. To get started, you can generate/update this files using the
B<overview> program. Upon C<POST> and C<IHAVE> commands this files
will also be updated.</PRE>
<P>To start from scratch use:</P>
<PRE>
touch /tmp/active;
perl -MNNML::Server -e 'server(base => "/tmp", port => 3000)'</PRE>
<P>To export your mh-Mail use:</P>
<PRE>
perl overview -base ~/Mail
perl -MNNML::Server -e 'server(base => "$ENV{HOME}/Mail", port => 3000)'</PRE>
<P>The command <STRONG>POST</STRONG> and <STRONG>IHAVE</STRONG> honour the <CODE>Newsgroups</CODE> header <STRONG>if</STRONG>
not overwritten by the <CODE>X-Nnml-Groups</CODE> header. Articles will contain
an appropriate <CODE>X-Nnml-Groups</CODE> header when retrieved by message-id.</P>
<P>When the client submits the <CODE>SLAVE</CODE> command, all forther post
requests are spooled in <CODE>$Config-</CODE>spool> (usually
<EM>~/Mail/NNML.spool</EM>) for performance reasons. You can process the
spooled articles by submitting the <CODE>XUNSPOOL</CODE> command or by calling</P>
<PRE>
perl -MNNML::Server -e unspool</PRE>
<P>Rejected articles will be saven in <CODE>$Config-</CODE>bad> (usually
<EM>~/Mail/NNML.bad</EM>)</P>
<P>
<HR>
<H1><A NAME="authorization">AUTHORIZATION</A></H1>
<P>To enable access restrictions use:</P>
<PRE>
perl -MNNML::Auth -e "NNML::Auth::add_user($ENV{LOGANME}, 'passwd', \
'read', 'write', 'admin')"</PRE>
<P>If <EM>base</EM><EM>/passwd</EM> exists, three levels of authorization are recognized:</P>
<DL>
<DT><STRONG><A NAME="item_admin"><STRONG>admin</STRONG></A></STRONG><BR>
<DD>
Users with permission <STRONG>admin</STRONG> may shut down the server using <CODE>SHUT</CODE>.
Also these users may create new groups simply by posting to them.
Permission <STRONG>admin</STRONG> is also required for the <CODE>XUNSPOOL</CODE> command.
<P></P>
<DT><STRONG><A NAME="item_write"><STRONG>write</STRONG></A></STRONG><BR>
<DD>
Users with permission <STRONG>write</STRONG> may use the <STRONG>POST</STRONG> and <STRONG>IHAVE</STRONG> commands.
<P></P>
<DT><STRONG><A NAME="item_read"><STRONG>read</STRONG></A></STRONG><BR>
<DD>
All other commands require the <STRONG>read</STRONG> permission.
<P></P></DL>
<P>
<HR>
<H1><A NAME="features">FEATURES</A></H1>
<P>Version 1.06 implements the <CODE>MODE GZIP</CODE> command. After submiting this
commands, all articles, heads and bodies will be piped through <CODE>gzip
-cf | mimencode</CODE>. The server will recognize post requeste using the
same pipe automatically. This will speed up <STRONG>nnmirror</STRONG> if the line is
sufficiant slow.</P>
<P>
<HR>
<H1><A NAME="bugs">BUGS</A></H1>
<P>The server handles multiple connections in a single thread. So a hung
<CODE>POST</CODE> or <CODE>IHAVE</CODE> would block all connections. Therfore a post
request is interrupted if the server could not read any bytes for 30
seconds. The Client is notified by message 441. If the client
continues to send the article, it is interpreted by the command loop.</P>
<P>
<HR>
<H1><A NAME="see also">SEE ALSO</A></H1>
<P>The <STRONG>overview</STRONG>(1) and <STRONG>nnmirror</STRONG>(1) manpages.</P>
<P>
<HR>
<H1><A NAME="author">AUTHOR</A></H1>
<P>Ulrich Pfeifer <<EM><A HREF="mailto:pfeifer@ls6.informatik.uni-dortmund.de">pfeifer@ls6.informatik.uni-dortmund.de</A></EM>></P>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> NNML::Server - a minimal NNTP server</P></STRONG>
</TD></TR>
</TABLE>
</BODY>
</HTML>