Noel,

AvalonListServeManager works for JDBCListserve even if you don't expect it
to from the code...

You may also be interested in this..
I've been working for some time with the attached classes which achieve the
following:

1/ lists are configured from a db table.
2/ list subscritions are mapped to "users" which, if the mail address is
changed, affects all subscriptions for the user
3/ individual aliases can be set up
4/ basic v.host forwarding is provided.
5/ new subscriptions, new lists/aliases & config changes are applied
instantly to the processing of incoming mail with no need to re-start James

It has to be administered by a web-app (cos we use it for private lists and
aliases) and the tables can contain other fields (such as login details and
permissions for the web app).

The classes are attached as found (I make no appologies for the mess), and
among reasons I haven't commited them are:
a) they are nasty hacks in the best tradition of cut'n'paste reuse ;-) and
need tidying up.
b) they don't make use of SQL resources
c) the names stink
d) they ignore the potential of systematic and intelligent inheritance from
any of JDBCListserve, AvalonListserve or Redirect.
e) there is no subscription mailet, which needs to support moderation
f) I cant release our web-app OS.

Please feel free to submit improvements back to the list, and if its nicely
done I'll add it.


The configuration is thus:
Put this at the top of the root processor (or beneath the anti-spam config)
so that all mail is re-addressed before any further processing occurs.

<mailet match="InJDBCListsListserv=db://listdb/list_config"
class="JDBCListsListserv">
     <data_source>listdb</data_source>
        <!-- table containing the list configurations -->
     <listserv_table>list_config</listserv_table>
        <!-- table containing the subscriptions -->
     <members_table>list_members</members_table>
        <!-- table containing the user details -->
     <people_table>people</people_table>
</mailet>

and the SQL is thus (Dumped from MySQL, i.e. no FK refrences):



-- Table structure for table 'list_config' based upon avalon list serve
parameters
--

CREATE TABLE list_config (
  list_address varchar(50) NOT NULL default '',
  members_only varchar(10) default NULL,
  attachments_allowed varchar(10) default NULL,
  reply_to_list varchar(10) default NULL,
  subject_prefix varchar(50) default NULL,
  PRIMARY KEY  (list_address)
)

--
-- Table structure for table 'list_members' joins list-config to people
many-to-many using the two PK's,
-- the uid PK of this field is used to simplify administration refrences to
subscriptions.
--

CREATE TABLE list_members (
  uid int(11) NOT NULL auto_increment,
  list_address varchar(50) default NULL,
  user_id int(11) default NULL,
  PRIMARY KEY  (uid),
  UNIQUE KEY list_address (list_address,user_id)
)

--
-- Table structure for table 'people'
-- Note that this table can include other fields, such as admin login
details.
--

CREATE TABLE people (
  user_id int(11) NOT NULL auto_increment,
  email_address varchar(50) default NULL,
  PRIMARY KEY  (user_id),
)

Attachment: JDBCListsListserv.java
Description: Binary data

Attachment: InJDBCListsListserv.java
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to