--- ezmlm-web-2.1-orig/ezmlmwebrc Mon Sep 25 14:25:27 2000
+++ ezmlm-web-2.1/ezmlmwebrc Tue Nov 21 11:32:24 2000
@@ -19,7 +19,7 @@
# Where do we store lists on this server ... Try "$HOME_DIR/lists".
# This directory will automatically be created if needed.
-$LIST_DIR = "$HOME_DIR/lists";
+$LIST_DIR = "$HOME_DIR/list";
# Safe list deletion?
# 0 = move list to .list and the .qmails to deleted.qmail/. Recoverable :)
@@ -33,14 +33,14 @@
$QMAIL_BASE = $Mail::Ezmlm::QMAIL_BASE . '/control';
# The url to our web interface - so we can use ezmlm-cgi if necessary
-$EZMLM_CGI_URL = 'http://some.server.that.has/cgi-bin/ezmlm-cgi';
+$EZMLM_CGI_URL = 'http://cpc-opc.drh.net/ezmlm/ezmlm-web-2.1/ezmlm-web.cgi-set';
# Where our ezcgirc file lives (probably /etc/ezmlm/ezcgirc)
$EZMLM_CGI_RC = '/etc/ezmlm/ezcgirc';
# Do we want to allow ``pretty'' names - ie more human readable ones
# This will slow ezmlm-web down a bit for large lists
-$PRETTY_NAMES = 1;
+$PRETTY_NAMES = 0;
# Do we want to allow the users to be allowed to upload a file containing
# lists of email addresses to subscribe?
@@ -51,19 +51,78 @@
# disabled). The defaults below should be reasonable - I use them ;)
$DEFAULT_OPTIONS = 'aBDFGHiJkLMNOpQRSTUWx';
+$PRESETS = [
+
+ [
+ qq[
+ broadcast list
+ Private list with subscription and content moderation. An archive is kept, so the content
+ should not be sensitive. Only recognized senders can access the archive. Only moderators can post.
+ ],
+ "aBDFgHIJkLmNoPQRsTUWx"
+ ],
+
+ [
+ qq[
+ non-archived private discussion list
+ List for private discussion. Content not moderated, but subscription is moderated.
+ No archive is kept, so the content can be sensitive. Anyone can post to the list.
+ ],
+ "ABDFgHIJkLMNOPQRsTUWX"
+ ],
+
+ [
+ qq[
+ archived private discussion list
+ List for private discussion. Content not moderated, but subscription is moderated.
+ An archive is kept and the archive is guarded so that only list members can get at it,
+ so the content shouldn't be too sensitive. Anyone can post to the list.
+ ],
+ "aBDFgHIJkLMNOPQRsTUWX"
+ ],
+
+ [
+ qq[
+ open discussion list
+ List for open discussion. Content not moderated. Subscription is not moderated, so anyone can
+ join the discussion. An archive is kept and the archive is guarded so that only list members
+ can get at it, so the content shouldn't be too sensitive. Anyone can post to the list.
+ ],
+ "aBCDeFgHIJkLMNOPQRSTUVWXYZ"
+ ],
+
+];
+
# Where do we find the nice little help icon - by default HELP_ICON_URL
# points to resources on http://rucus.ru.ac.za/. This will work, but we
# would appreciate it if you changed this to a local site.
-$HELP_ICON_URL = 'http://rucus.ru.ac.za/icons/small/unknown.gif';
+$HELP_ICON_URL = 'help.gif';
# Header for every page (.= concatinates)
-$HTML_HEADER = '
';
-$HTML_HEADER .= '
';
+$HTML_HEADER = <<'EOT';
+
+
+Columbia Presbyterian Church Mailing list management
+If you have any questions about using this interface, please contact
+David Harris at dharris@drh.net or 410-461-2870.
+ |
+
+
+
+|
+EOT
# Footer for every page (.= concatinates)
-$HTML_FOOTER = ' | ';
-$HTML_FOOTER .= '';
+$HTML_FOOTER = < |
+
+
+ezmlm-web
+(v2.1) A web interface to ezmlm
+You are logged in as the user: $ENV{'REMOTE_USER'}
+
+ |
+EOT
# What colour do we want the background to be?
$HTML_BGCOLOR = '#000080';
@@ -114,7 +173,7 @@
l => ['Subscriber List',
'Remote administrators can request a subscriber list'],
m => ['Message Moderation',
- 'All incoming messages are moderated'],
+ 'All incoming messages are moderated. (Modified by u flag)'],
n => ['Text Editing',
'Allow remote administrators to edit files in dir/text/'],
o => ['Others rejected',
@@ -124,13 +183,13 @@
q => ['Service Request Address',
'Process commands sent in the subject to local-request@host'],
r => ['Remote Admin',
- 'Enable remote adminstration of the list'],
+ 'Enable remote administration of the list'],
s => ['Subscription Moderation',
'Subscriptions to the main list and digest will be moderated'],
t => ['Trailer',
'Add a trailer to outgoing messages'],
u => ['User Posts Only',
- 'Posts from unrecognized SENDER addresses will be rejected'],
+ 'Posts from unrecognized SENDER addresses will be rejected. (If combined with m flag, only posts from unrecognized SENDER addresses will be moderated.)'],
# v => version. I doubt you will really need this ;-)
w => ['Remove Warn',
'Remove the ezmlm-warn(1) invocations from the list setup. It is assumed that ezmlm-warn(1) is run by other means'],
--- ezmlm-web-2.1-orig/ezmlm-web.cgi Mon Sep 25 15:58:08 2000
+++ ezmlm-web-2.1/ezmlm-web.cgi-set Tue Nov 21 11:34:30 2000
@@ -53,8 +53,8 @@
my $q = new CGI;
$q->import_names('Q');
-use vars qw[$opt_c $opt_d $opt_C];
-getopts('cd:C:');
+use vars qw[$opt_d $opt_C];
+getopts('d:C:');
# Suid stuff requires a secure path.
$ENV{'PATH'} = '/bin';
@@ -66,7 +66,7 @@
# use strict is a good thing++
use vars qw[$HOME_DIR]; $HOME_DIR=$tmp[7];
-use vars qw[$DEFAULT_OPTIONS %EZMLM_LABELS $UNSAFE_RM $ALIAS_USER $LIST_DIR];
+use vars qw[$DEFAULT_OPTIONS $PRESETS %EZMLM_LABELS $UNSAFE_RM $ALIAS_USER $LIST_DIR];
use vars qw[$QMAIL_BASE $EZMLM_CGI_RC $EZMLM_CGI_URL $HTML_BGCOLOR $PRETTY_NAMES];
use vars qw[%HELPER $HELP_ICON_URL $HTML_HEADER $HTML_FOOTER $HTML_TEXT $HTML_LINK];
use vars qw[%BUTTON %LANGUAGE $HTML_VLINK $HTML_TITLE $FILE_UPLOAD];
@@ -89,6 +89,10 @@
$LIST_DIR = $1 if ($opt_d =~ /^([-\@\w.\/]+)$/);
}
+# Figure out the privledge levels
+my $create_and_delete_priv = ( &webauth('create-and-delete-priv',1) == 0 );
+my $edit_configuration_priv = ( &webauth('edit-configuration-priv',1) == 0 );
+
# Work out default domain name from qmail (for David Summers)
my($DEFAULT_HOST);
open (GETHOST, "<$QMAIL_BASE/me") || open (GETHOST, "<$QMAIL_BASE/defaultdomain") || die "Unable to read $QMAIL_BASE/me: $!";
@@ -285,9 +289,10 @@
print '', $LANGUAGE{'chooselistinfo'};
- print $q->submit(-name=>'action', -value=>"[$BUTTON{'create'}]"), ' ' if (!defined($opt_c));
+ print $q->submit(-name=>'action', -value=>"[$BUTTON{'create'}]"), ' '
+ if ( $create_and_delete_priv );
print $q->submit(-name=>'action', -value=>"[$BUTTON{'edit'}]"), ' ' if(defined(@lists));
- print $q->submit(-name=>'action', -value=>"[$BUTTON{'delete'}]") if(defined(@lists));
+ print $q->submit(-name=>'action', -value=>"[$BUTTON{'delete'}]") if(defined(@lists) && $create_and_delete_priv);
print ' | | |
';
print $q->endform;
}
@@ -320,7 +325,7 @@
# Get a list of subscribers from ezmlm ...
- @subscribers = $list->subscribers;
+ @subscribers = sort { lc($a) cmp lc($b) } $list->subscribers;
# Keep selection box a resonable size - suggested by Sebastian Andersson
$scrollsize = 25 if(($scrollsize = $#subscribers + 1) > 25);
@@ -335,8 +340,13 @@
print $q->scrolling_list(-name=>'delsubscriber', -size=>$scrollsize, -values=>\@subscribers, -labels=>&pretty_names, -multiple=>'true') if defined(@subscribers);
print '';
print ' ', ($#subscribers + 1), ' ', $LANGUAGE{'subscribers'}, ' ' if defined(@subscribers);
+
+ print " To delete an address, select one or more to the left and then click the below button " if defined(@subscribers);
print $q->submit(-name=>'action', -value=>"[$BUTTON{'deleteaddress'}]"), '' if defined(@subscribers);
+
+ print "To add a subscriber enter an e-mail address in this box: ";
print $q->textfield(-name=>'addsubscriber', -size=>'40'), '  ';
+ print "or a filename with a list of subscribers in this box: ";
print $q->filefield(-name=>'addfile', -size=>20, -maxlength=>100), '  ' if ($FILE_UPLOAD);
print $q->submit(-name=>'action', -value=>"[$BUTTON{'addaddress'}]"), ' ';
print '', $LANGUAGE{'additionalparts'}, ': ' if($list->ismodpost || $list->ismodsub || $list->isremote || $list->isdeny || $list->isallow || $list->isdigest);
@@ -346,7 +356,8 @@
print $q->submit(-name=>'action', -value=>"[$BUTTON{'digestsubscribers'}]"), ' ' if ($list->isdigest);
print ' ';
print $q->submit(-name=>'action', -value=>"[$BUTTON{'webarchive'}]"), ' ' if(&ezmlmcgirc);
- print $q->submit(-name=>'action', -value=>"[$BUTTON{'configuration'}]"), ' ';
+ print $q->submit(-name=>'action', -value=>"[$BUTTON{'configuration'}]"), ' '
+ if ( $edit_configuration_priv );
print $q->submit(-name=>'action', -value=>"[$BUTTON{'selectlist'}]");
print ' | | |
';
print $q->endform;
@@ -895,10 +906,11 @@
# Read authentication level from webusers file. Format of this file is
# somewhat similar to the unix groups file
- my($listname) = @_;
+ my($listname,$do_not_match_all) = @_;
open (USERS, "<$LIST_DIR/webusers") || die "Unable to read webusers file: $!";
while() {
if (/^($listname|ALL)\:/i) {
+ next if ( $do_not_match_all && $1 eq 'ALL' );
if (/(\:\s*|,\s+)((?:$ENV{'REMOTE_USER'})|(?:ALL))\s*(,|$)/) {
close USERS; return 0;
}
@@ -915,21 +927,76 @@
my($i, $j);
print "";
- print '';
+ print '';
foreach $i (grep {/\D/} keys %EZMLM_LABELS) {
- if ($opts =~ /^\w*$i\w*\s*/) {
- print $q->checkbox(-name=>$i, -value=>$i, -label=>$EZMLM_LABELS{$i}[0], -on=>'1');
- } else {
- print $q->checkbox(-name=>$i, -value=>$i, -label=>$EZMLM_LABELS{$i}[0]);
- }
- print ' ';
+ my $on = $opts =~ /^\w*$i\w*\s*/;
+ print $q->checkbox(-name=>$i, -value=>$i, -label=>"($i) " . $EZMLM_LABELS{$i}[0],
+ -onClick => 'update_warnings();',
+ -on=> $on ? '1' : undef);
+ print ' ', $EZMLM_LABELS{$i}[1] , '';
+ # print ' ';
print ' | '; $j++;
if ($j >= 3) {
$j = 0; print ' ';
}
- print '| ';
+ print ' | ';
}
print ' | ';
+
+ print <
+
+
+
+Warning on message moderation and user-posts-only interaction:
+The "U" (user posts only) option significantly modifies the behavior of
+the "M" (message moderation) option in a possibly undesirable way.
+The U flag modifies the M flag so that posts from recognized senders
+(list subscribers) go through without moderation, but then posts from
+non-subscribers are sent for moderation.
+This combination allows creation of a basically non-moderated list where posting is
+restricted to subscribers, where the list admin can let non-subscribers
+post occasionally, as well as to catch subscribers posting from non-subscriber addresses.
+This is not, however, a way to have a secure moderation of a list.
+
+ |
+
+
+
+
+
+EOT
+
+ print " Presets: ";
+ print qq{ };
+ my $preset_num;
+ foreach my $preset ( @$PRESETS ) {
+ my ($preset_name, $preset_opts) = @$preset;
+ $preset_num++;
+ my $preset_funcname = "preset_$preset_num";
+ print "\n";
+ my $preset_opts_summary = join ",", grep { /[a-z]/ } split "", $preset_opts;
+ print qq{ - $preset_name (options: $preset_opts_summary) [apply]
\n};
+ }
+ print " | ";
+
+ print "Additional options (not affected by presets)";
print ' ';
foreach $i (grep {/\d/} keys %EZMLM_LABELS) {
|