noel 2002/12/03 23:33:10
Added: src/xdocs mailing_lists_2_1.xml
www mailing_lists_2_1.html
Log:
Added first draft of a Mailing List How-To for v2.1
Revision Changes Path
1.1 jakarta-james/src/xdocs/mailing_lists_2_1.xml
Index: mailing_lists_2_1.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>James 2.1 - Creating Mailing Lists</title>
</properties>
<body>
<section name="How To Create Mailing Lists">
<p>One of the frequent questions on the James-User Mailing List is how
to create a mailing list. This document explains one way of using the
currently supplied Matchers and Mailets in James v2.1.</p>
<p>Basically, the process requires creating two <mailet> entries
and a repository. The first mailet handles list commands (currently
only <i>list-name</i>-on and <i>list-name</i>-off). The second mailet
handles list messages. The repository will hold the e-mail addresses
of list subscribers.</p>
<p>The mailets go into the processor chain (e.g., at the top of the
<i>transport</i> processor, the last one goes into the
<users-store> block.</p>
<subsection name="Setting up the Mailets">
<p>You need to setup two mailets.</p>
<p>The first mailet that you need to setup is an instance of the <a
href="provided_mailets_2_1.html#AvalonListservManager">Avalon Listserv
Manager</a> mailet. This will handle subscribing and unsubscribing.
[Note: the current code does not support confirmed opt-in, just basic
commands.] The <a
href="provided_matchers_2_1.html#CommandForListserv">CommandForListserv</a>
matcher is used to invoke match messages containing commands for the
mailing list.</p>
<p>The second mailet is an instance of the <a
href="provided_mailets_2_1.html#AvalonListserv">Avalon Listserv</a>
mailet. That mailet actually receives messages for the list and
causes them to be distributed. The <a
href="provided_matchers_2_1.html#RecipientIs">RecipientIs</a> matcher
is used to match messages intended for the mailing list.</p>
<p>The following illustrates the two <mailet> elements that need to be
added:</p>
<source>
<mailet match="CommandForListserv=<i>list-name</i>@<i>domain</i>"
class="AvalonListservManager">
<repositoryName><i>list-name</i></repositoryName>
</mailet>
<mailet match="RecipientIs=<i>list-name</i>@<i>domain</i>"
class="AvalonListserv">
<repositoryName><i>list-name</i></repositoryName>
... list options ...
</mailet>
</source>
</subsection>
<subsection name="Setting up the Repository">
<p>The mailing list mailets need a repository within which to store
the subscriber list. There is a separate repository for each mailing
list, and is completely independent of the user repository used by
James to manage e-mail accounts. This is configured in the
<users-store> block of config.xml.</p>
<p>The following illustrates a database-backed repository using JDBC
with the ListUsersJdbcRepository class. Notice that there will be a
single table, <i>lists</i>, created in the db://maildb resource
defined elsewhere. There are currently two columns: the list name and
the list subscriber.</p>
<source>
<repository name="<i>list-name</i>"
class="org.apache.james.userrepository.ListUsersJdbcRepository"
destinationURL="db://maildb/lists/<i>list-name</i>">
<sqlFile>file://conf/sqlResources.xml</sqlFile>
</repository>
</source>
<p>The following illustrates a file-system repository using the
UsersFileRepository class. [Note: the destination URL is a child
element when configuring a file-system repository, and an attribute
when configuring a database-backed repository. This inconsistency
will be addressed in a future version of James.]</p>
<source>
<repository name="<i>list-name</i>"
class="org.apache.james.userrepository.UsersFileRepository">
<destination URL="file://var/lists/<i>list-name</i>/" />
</repository>
</source>
</subsection>
</section>
</body>
</document>
1.1 jakarta-james/www/mailing_lists_2_1.html
Index: mailing_lists_2_1.html
===================================================================
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Apache Jakarta James - James 2.1 - Creating Mailing Lists - Java Mail and
News server, SMTP POP3 NNTP</title>
<meta
content="mail,email,SMTP,POP3,NNTP,IMAP,MAILET,JAVA,WINDOWS,LINUX,server,Windows,2k,NT,98,ME,XP,Linux."
name="keywords">
<meta content="Java mail server (mailserver) providing SMTP POP3 IMAP and News NNTP
runs on Microsoft Windows 2k,NT,98,ME,XP, and most flavours of Linux."
name="description">
<meta content="ALL" name="ROBOTS">
<LINK TITLE="Style" HREF="stylesheet.css" TYPE="text/css" REL="stylesheet">
</head>
<body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000"
bgcolor="#ffffff">
<table cellspacing="4" width="100%" border="0">
<!--PAGE HEADER-->
<tr>
<td colspan="2">
<!--JAKARTA LOGO--><a href="http://jakarta.apache.org/"><img border="0" alt="The
Jakarta Project" align="left"
src="http://jakarta.apache.org/images/jakarta-logo.gif"></a>
<!--PROJECT LOGO--><a href="http://jakarta.apache.org/james/"><img border="0"
alt="James - Java Apache Mail Enterprise Server" align="right"
src="http://jakarta.apache.org/james///images/james-logo.jpg"></a></td>
</tr>
<!--HEADER SEPARATOR-->
<tr>
<td colspan="2">
<hr size="1" noshade="">
</td>
</tr>
<tr>
<!--LEFT SIDE NAVIGATION-->
<td nowrap="true" valign="top" width="20%">
<p>
<strong>James</strong>
</p>
<ul>
<li>
<a href="./index.html">Overview</a>
</li>
<li>
<a href="./FAQ.html">James FAQ</a>
</li>
</ul>
<p>
<strong>Translated</strong>
</p>
<ul>
<li>
<a href="http://www.terra-intl.com/jakarta/james/">Japanese (web)</a>
</li>
</ul>
<p>
<strong>Downloads</strong>
</p>
<ul>
<li>
<a href="http://jakarta.apache.org/site/binindex.html">Binaries</a>
</li>
<li>
<a href="http://jakarta.apache.org/site/sourceindex.html">Source Code</a>
</li>
</ul>
<p>
<strong>Current Documentation</strong>
</p>
<ul>
<li>
<a href="./documentation_2_1.html">James 2.1 Documentation</a>
</li>
<li>
<a href="./javadocs/index.html">James Javadocs</a>
</li>
<li>
<a href="./mailet/index.html">Mailet API</a>
</li>
<li>
<a href="./james_and_sendmail.html">James and sendmail</a>
</li>
</ul>
<p>
<strong>Older Documentation</strong>
</p>
<ul>
<li>
<a href="./architecture_v2_0.html">Architecture (version 2.0)</a>
</li>
<li>
<a href="./install.html">Install (version 2.0)</a>
</li>
<li>
<a href="./configuration_v2_0.html">Configuration (version 2.0)</a>
</li>
<li>
<a href="./usingJDBC_v2.0.html">Using JDBC (version 2.0)</a>
</li>
<li>
<a href="./usingLDAP_v1_2.html">Using LDAP (version 1.2)</a>
</li>
<li>
<a href="./usingTLS_v1_2.html">Using TLS (version 1.2)</a>
</li>
<li>
<a href="http://jakarta.apache.org/james/rfclist">Useful RFCs (web)</a>
</li>
</ul>
<p>
<strong>Project</strong>
</p>
<ul>
<li>
<a href="http://jakarta.apache.org/site/bugs.html">Bug Database </a>
</li>
<li>
<a href="./contribute.html">How Can I Contribute?</a>
</li>
<li>
<a href="./code-standards.html">Coding Standards</a>
</li>
<li>
<a href="./license.html">License</a>
</li>
<li>
<a href="./todo.html">TODO</a>
</li>
<li>
<a href="./changelog.html">Changelog</a>
</li>
<li>
<a href="./weare.html">Who We Are</a>
</li>
</ul>
<p>
<strong>Jakarta Information (web)</strong>
</p>
<ul>
<li>
<a href="http://jakarta.apache.org/index.html">Front Page</a>
</li>
<li>
<a href="http://jakarta.apache.org/site/news.html">News & Status</a>
</li>
<li>
<a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
</li>
<li>
<a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
</li>
<li>
<a href="http://jakarta.apache.org/site/cvsindex.html">CVS Repositories</a>
</li>
<li>
<a href="http://jakarta.apache.org/site/library.html">Reference Library</a>
</li>
<li>
<a href="http://jakarta.apache.org/site/faqs.html">FAQs</a>
</li>
</ul>
<p>
<strong>Related Projects (web)</strong>
</p>
<ul>
<li>
<a href="http://jakarta.apache.org/ant/index.html">Ant</a>
</li>
<li>
<a href="http://jakarta.apache.org/avalon/index.html">Avalon</a>
</li>
</ul>
</td>
<!--RIGHT SIDE MAIN BODY--><td align="left" valign="top" width="80%">
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a
name="How%20To%20Create%20Mailing%20Lists"><strong>How To Create Mailing
Lists</strong></a></font></td>
</tr>
<tr>
<td>
<blockquote>
<p>One of the frequent questions on the James-User Mailing List is how
to create a mailing list. This document explains one way of using the
currently supplied Matchers and Mailets in James v2.1.</p>
<p>Basically, the process requires creating two <mailet> entries
and a repository. The first mailet handles list commands (currently
only <i>list-name</i>-on and <i>list-name</i>-off). The second mailet
handles list messages. The repository will hold the e-mail addresses
of list subscribers.</p>
<p>The mailets go into the processor chain (e.g., at the top of the
<i>transport</i> processor, the last one goes into the
<users-store> block.</p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a
name="Setting%20up%20the%20Mailets"><strong>Setting up the
Mailets</strong></a></font></td>
</tr>
<tr>
<td>
<blockquote>
<p>You need to setup two mailets.</p>
<p>The first mailet that you need to setup is an instance of the <a
href="provided_mailets_2_1.html#AvalonListservManager">Avalon Listserv
Manager</a> mailet. This will handle subscribing and unsubscribing.
[Note: the current code does not support confirmed opt-in, just basic
commands.] The <a
href="provided_matchers_2_1.html#CommandForListserv">CommandForListserv</a>
matcher is used to invoke match messages containing commands for the
mailing list.</p>
<p>The second mailet is an instance of the <a
href="provided_mailets_2_1.html#AvalonListserv">Avalon Listserv</a>
mailet. That mailet actually receives messages for the list and
causes them to be distributed. The <a
href="provided_matchers_2_1.html#RecipientIs">RecipientIs</a> matcher
is used to match messages intended for the mailing list.</p>
<p>The following illustrates the two <mailet> elements that need to be
added:</p>
<div align="left">
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td><td height="1" bgcolor="#023264"><img
border="0" hspace="0" vspace="0" height="1" width="1" src="/images/void.gif"></td><td
height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td>
</tr>
<tr>
<td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1"
width="1" src="/images/void.gif"></td><td height="1" bgcolor="#ffffff">
<pre>
<mailet match="CommandForListserv=<i>list-name</i>@<i>domain</i>"
class="AvalonListservManager">
<repositoryName><i>list-name</i></repositoryName>
</mailet>
<mailet match="RecipientIs=<i>list-name</i>@<i>domain</i>"
class="AvalonListserv">
<repositoryName><i>list-name</i></repositoryName>
... list options ...
</mailet>
</pre>
</td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td>
</tr>
<tr>
<td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td><td height="1" bgcolor="#023264"><img
border="0" hspace="0" vspace="0" height="1" width="1" src="/images/void.gif"></td><td
height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td>
</tr>
</table>
</div>
</blockquote>
</td>
</tr>
</table>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a
name="Setting%20up%20the%20Repository"><strong>Setting up the
Repository</strong></a></font></td>
</tr>
<tr>
<td>
<blockquote>
<p>The mailing list mailets need a repository within which to store
the subscriber list. There is a separate repository for each mailing
list, and is completely independent of the user repository used by
James to manage e-mail accounts. This is configured in the
<users-store> block of config.xml.</p>
<p>The following illustrates a database-backed repository using JDBC
with the ListUsersJdbcRepository class. Notice that there will be a
single table, <i>lists</i>, created in the db://maildb resource
defined elsewhere. There are currently two columns: the list name and
the list subscriber.</p>
<div align="left">
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td><td height="1" bgcolor="#023264"><img
border="0" hspace="0" vspace="0" height="1" width="1" src="/images/void.gif"></td><td
height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td>
</tr>
<tr>
<td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1"
width="1" src="/images/void.gif"></td><td height="1" bgcolor="#ffffff">
<pre>
<repository name="<i>list-name</i>"
class="org.apache.james.userrepository.ListUsersJdbcRepository"
destinationURL="db://maildb/lists/<i>list-name</i>">
<sqlFile>file://conf/sqlResources.xml</sqlFile>
</repository>
</pre>
</td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td>
</tr>
<tr>
<td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td><td height="1" bgcolor="#023264"><img
border="0" hspace="0" vspace="0" height="1" width="1" src="/images/void.gif"></td><td
height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td>
</tr>
</table>
</div>
<p>The following illustrates a file-system repository using the
UsersFileRepository class. [Note: the destination URL is a child
element when configuring a file-system repository, and an attribute
when configuring a database-backed repository. This inconsistency
will be addressed in a future version of James.]</p>
<div align="left">
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td><td height="1" bgcolor="#023264"><img
border="0" hspace="0" vspace="0" height="1" width="1" src="/images/void.gif"></td><td
height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td>
</tr>
<tr>
<td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1"
width="1" src="/images/void.gif"></td><td height="1" bgcolor="#ffffff">
<pre>
<repository name="<i>list-name</i>"
class="org.apache.james.userrepository.UsersFileRepository">
<destination URL="file://var/lists/<i>list-name</i>/" />
</repository>
</pre>
</td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td>
</tr>
<tr>
<td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td><td height="1" bgcolor="#023264"><img
border="0" hspace="0" vspace="0" height="1" width="1" src="/images/void.gif"></td><td
height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0"
height="1" width="1" src="/images/void.gif"></td>
</tr>
</table>
</div>
</blockquote>
</td>
</tr>
</table>
</blockquote>
</td>
</tr>
</table>
</td>
</tr>
<!--FOOTER SEPARATOR-->
<tr>
<td colspan="2">
<hr size="1" noshade="">
</td>
</tr>
<!--PAGE FOOTER-->
<tr>
<td colspan="2">
<div align="center">
<font size="-1" color="#525D76"><em>
Copyright © 1999-2002, Apache Software Foundation
</em></font>
</div>
</td>
</tr>
</table>
</body>
</html>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>