debianized ezmlm-web 3.0

This commit is contained in:
lars 2006-01-08 02:44:38 +00:00
parent 102471ea88
commit f21f5e041b
17 changed files with 371 additions and 142 deletions

View file

@ -1,109 +0,0 @@
REVISION HISTORY - ezmlm-web.cgi
================================
Version 0.1 - 10/04/98 (Not Released)
* University Vac - I was bored and started to play. The first version just
let people play with the subscribers list. No moderators, no nothing.
Version 0.2 - 13/04/98 (Not Released)
* Allow list creation
* Allowed users to edit moderators
Version 0.3 - 15/04/98
* Allow list deletion (for balin@moria.org)
* Made changes to allow it to run on RedHat 4.2 as well as FreeBSD 3.0
* Fixed some minor bugs (cosmetic irritaions really) that people noticed
* Sorted subscribers list into alphabetical order.
* Added command line switch to change list directory (for nxsy@moria.org)
* Wrote some documentation ...
Version 0.4 - 28/04/98
* Fixed up virtual domain (inlocal) stuff as spotted by bryan@rucus
* Allowed the list directory to be automatically created if necessary.
Version 0.5 - 12/05/98 (Not Released)
* More bug fixes. Mainly for mathew@graham.
Version 1.0 - 01/08/98
* Complete re-write to convert to perl5 and CGI.pm
* Removed a lot of dependancy on the OS. Use builtin functions instead :)
* Added support for ezmlm-idx
* Added a lot more command line option support (-adfgiklmnpqsrstux5)
* Added support for digests and digest subscribers
* Added support for blacklists
* Allowed users to edit the config of existing lists
* Allowed the user to edit headeradd and headerremove as well as mimeremove
* Allowed user to edit any of the files in DIR/text
* Revised interface to make it more user-friendly and ergonomic.
* Changed the background colour for Kether (clb@rucus) *gryn*
* Removed a big bug in the delete_list function that had gone unnoticed.
Version 1.0.1 - 10/08/98
* Fixed a bug in the way 1.0 re-configured virtual hosts (bryan@rucus)
* Made the script read the /var/qmail/control files instead of explicitly
setting variables (for david@summersoft)
Version 1.0.2 - 28/08/98
* Fixed the bug introduced in v1.0.1 :( (keith@rucus)
* Fixed the way we recreate config files (noticed by Glen Stewart)
* Made the script check return values of system calls properly
* Fixed some of the taint checking stuff ... reports less in the logs now.
Version 1.0.3 - 03/10/98
* Fixed the alias-alias-alias-list bug in inlocal (bryan@rucus)
* Added a bit of online help
* Fixed the & in list owner (bryan@rucus)
* Added multi-level access to lists (based on idea by Glen Stewart)
Version 2.0 - 01/01/00
* Rewrote most of the code to take advantage of Mail::Ezmlm
* Made the webuser file more functional (users can alter it)
* Now handles all current, and future command line options
* Changed the colours :)
* Added support for ezmlm-cgi web archives
* Made it -w and use strict clean
* Moved all user config to a separate file
* Fixed the way we worked out list config - now complete
* Allowed a user specific config over-ride ``ezmlmwebrc''
* Allowed the printing of `nice' usernames (for Rhodes CS Dept)
* Took account of non-standard paths for moderators
* Removed all system() and `` calls from ezmlm-web.cgi
* Made `look and feel' virtually all user configurable
* Added a lot more context sensitive help
* Made ezmlm-web 99% language configurable - but no other templates yet :(
* Added support for creating databases
Version 2.1 - 25/09/00
* Fixed the multiple delete thing - finally!
* Fixed the '-' in username problem - The '-' in hostnames problem is fixed
in the new version of Mail::Ezmlm
* Fixed the '_' in list names problem
* Added support for file uploads of email addresses (multiple subscribe)
* Made error handling more friendly
Version 2.2 - 26/01/02005 (not officially released)
* German translation of the web interface - more translations can be added easily
* changed "ALT"-tags to "TITLE" - most browsers will display the tooltip texts now
* fixed security problems (permissions were not thoroughly checked)
* user-based permission for creating lists (can be set in webusersrc)
* the location of the webusers file is now an option in ezmlmwebrc
Version 2.3 - 10/06/02005
* css styles are used instead of tables
* permission check for upload of files fixed
* removed some taint errors
* file upload typo fixed
* update of webusers file fixed
* moderator unsubscribe fixed
Version 3.0 - 12/25/02005
* complete interface rewritten for enhanced usability
* suppurt for msgsize, mimereject, trailer
* fixed insecure writing of webusers data
* define a default MAIL_DOMAIN
* changed directory for safely removed mailinglists
* requires the clearsilver template engine
Version 3.0.1 - 01/06/02006
* allow several special characters in local part of mail address (RFC2822)

106
ezmlm-web-3.0.1/changelog Normal file
View file

@ -0,0 +1,106 @@
Version 3.0.1 - 01/06/02006
* allow several special characters in local part of mail address (RFC2822)
Version 3.0 - 12/25/02005
* complete interface rewritten for enhanced usability
* suppurt for msgsize, mimereject, trailer
* fixed insecure writing of webusers data
* define a default MAIL_DOMAIN
* changed directory for safely removed mailinglists
* requires the clearsilver template engine
Version 2.3 - 10/06/02005
* css styles are used instead of tables
* permission check for upload of files fixed
* removed some taint errors
* file upload typo fixed
* update of webusers file fixed
* moderator unsubscribe fixed
Version 2.2 - 26/01/02005 (not officially released)
* German translation of the web interface - more translations can be added easily
* changed "ALT"-tags to "TITLE" - most browsers will display the tooltip texts now
* fixed security problems (permissions were not thoroughly checked)
* user-based permission for creating lists (can be set in webusersrc)
* the location of the webusers file is now an option in ezmlmwebrc
Version 2.1 - 25/09/00
* Fixed the multiple delete thing - finally!
* Fixed the '-' in username problem - The '-' in hostnames problem is fixed
in the new version of Mail::Ezmlm
* Fixed the '_' in list names problem
* Added support for file uploads of email addresses (multiple subscribe)
* Made error handling more friendly
Version 2.0 - 01/01/00
* Rewrote most of the code to take advantage of Mail::Ezmlm
* Made the webuser file more functional (users can alter it)
* Now handles all current, and future command line options
* Changed the colours :)
* Added support for ezmlm-cgi web archives
* Made it -w and use strict clean
* Moved all user config to a separate file
* Fixed the way we worked out list config - now complete
* Allowed a user specific config over-ride ``ezmlmwebrc''
* Allowed the printing of `nice' usernames (for Rhodes CS Dept)
* Took account of non-standard paths for moderators
* Removed all system() and `` calls from ezmlm-web.cgi
* Made `look and feel' virtually all user configurable
* Added a lot more context sensitive help
* Made ezmlm-web 99% language configurable - but no other templates yet :(
* Added support for creating databases
Version 1.0.3 - 03/10/98
* Fixed the alias-alias-alias-list bug in inlocal (bryan@rucus)
* Added a bit of online help
* Fixed the & in list owner (bryan@rucus)
* Added multi-level access to lists (based on idea by Glen Stewart)
Version 1.0.2 - 28/08/98
* Fixed the bug introduced in v1.0.1 :( (keith@rucus)
* Fixed the way we recreate config files (noticed by Glen Stewart)
* Made the script check return values of system calls properly
* Fixed some of the taint checking stuff ... reports less in the logs now.
Version 1.0.1 - 10/08/98
* Fixed a bug in the way 1.0 re-configured virtual hosts (bryan@rucus)
* Made the script read the /var/qmail/control files instead of explicitly
setting variables (for david@summersoft)
Version 1.0 - 01/08/98
* Complete re-write to convert to perl5 and CGI.pm
* Removed a lot of dependancy on the OS. Use builtin functions instead :)
* Added support for ezmlm-idx
* Added a lot more command line option support (-adfgiklmnpqsrstux5)
* Added support for digests and digest subscribers
* Added support for blacklists
* Allowed users to edit the config of existing lists
* Allowed the user to edit headeradd and headerremove as well as mimeremove
* Allowed user to edit any of the files in DIR/text
* Revised interface to make it more user-friendly and ergonomic.
* Changed the background colour for Kether (clb@rucus) *gryn*
* Removed a big bug in the delete_list function that had gone unnoticed.
Version 0.5 - 12/05/98 (Not Released)
* More bug fixes. Mainly for mathew@graham.
Version 0.4 - 28/04/98
* Fixed up virtual domain (inlocal) stuff as spotted by bryan@rucus
* Allowed the list directory to be automatically created if necessary.
Version 0.3 - 15/04/98
* Allow list deletion (for balin@moria.org)
* Made changes to allow it to run on RedHat 4.2 as well as FreeBSD 3.0
* Fixed some minor bugs (cosmetic irritaions really) that people noticed
* Sorted subscribers list into alphabetical order.
* Added command line switch to change list directory (for nxsy@moria.org)
* Wrote some documentation ...
Version 0.2 - 13/04/98 (Not Released)
* Allow list creation
* Allowed users to edit moderators
Version 0.1 - 10/04/98 (Not Released)
* University Vac - I was bored and started to play. The first version just
let people play with the subscribers list. No moderators, no nothing.

30
ezmlm-web-3.0.1/copyright Normal file
View file

@ -0,0 +1,30 @@
Copyright (C) 1999/2000, Guy Antony Halse, All Rights Reserved.
Please send bug reports and comments to guy-ezmlm@rucus.ru.ac.za
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
Neither name Guy Antony Halse nor the names of any contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

View file

@ -0,0 +1 @@
/etc/ezmlm-web/ezmlmwebrc

View file

@ -0,0 +1,20 @@
Package: ezmlm-web
Version: 3.0-1
Section: admin
Priority: extra
Architecture: all
Depends: perl, httpd-cgi
Suggests: qmail-src, bash (>=2.0), gcc
Maintainer: Lars Kruse <devel@sumpfralle.de>
Description: Web interface for ezmlm-idx mailing list administration
This web interface allows you to configure every part of an ezmlm-idx
mailing list.
Access control makes it possible, to share the administrative work in a
controlled way.
This package depends on the following programs, that are not part of the main
debian distribution:
* qmail - http://cr.yp.to/qmail.html
* ezmlm-idx - http://ezmlm.org/
* clearsilver for perl (>= 0.10.2) - http://www.clearsilver.net/downloads/
* some perl modules (see README)

View file

@ -0,0 +1,3 @@
#!/bin/sh
true

View file

@ -0,0 +1,3 @@
#!/bin/sh
true

View file

@ -0,0 +1,3 @@
#!/bin/sh
true

View file

@ -0,0 +1,54 @@
How to use ezmlm-web with debian
Table of content
1 - install the package
2 - install required additional software
3 - create user-sprecific suid binaries
4 - create a user-specific configuration
5 - access control
6 - testing
#################################################################
1) install the package
you surely did this already :)
2) install required additional software
Take a look at /usr/share/doc/ezmlm-web/README - section III (Requirements).
If you are able to run /usr/lib/ezmlm-web/ezmlm-web.pl without problems, then
you are ready for the next step.
3) create user-specific suid binaries
As perl-suid is considered deprecated, you have to compile a C-wrapper
for every user of your debian system, who wants to manage his mailing
lists with ezmlm-we.
Usually you do this only for your virtual mailing list user.
to create a wrapper, type the following:
ezmlm-web-make-suid USERNAME DESTINATION_FILE
e.g: ezmlm-web-make-suid john ~john/public_html/cgi-bin/ezmlm-web
4) create a user-specific configuration file (optional)
Copy /usr/share/doc/ezmlm-web/examples/ezmlmwebrc to ~john/.ezmlmwebrc
and change its content according to your setup.
5) access control (optional)
configure access control for the fresh cgi binary. Maybe you can
use the htaccess.sample file in /usr/share/doc/ezmlm-web/examples as
a template.
Now you should create a webusers file to define the permissions of all
possible web users. An example webusers file can be found at
/usr/share/doc/ezmlm-web/examples/webusers.sample.
See /usr/share/doc/ezmlm-web/README for details about access control.
6) testing
Now you can access the ezmlm-web interface by using your web browser.
e.g. point it to http://localhost/~john/cgi-bin/ezmlm-web

View file

@ -0,0 +1,3 @@
ezmlm-web (0.3.0-1) unstable; urgency=low
* Initial release
-- Lars Kruse <devel@sumpfralle.de> Sat, 08 Jan 2006 03:15:42 +0100

View file

@ -0,0 +1,33 @@
#!/bin/sh
#
# create user-specific suid binaries to call ezmlm-web.cgi
#
# parameters: [USERNAME] DESTINATION_FILE
# e.g.: john ~john/public_html/cgi-bin/ezmlm-web
# only root may choose a USERNAME
#
set -eu
C_SOURCE=/usr/share/ezmlm-web/index.c
which cc >/dev/null || { echo "no compiler (cc) installed - sorry" >&2; exit 1; }
[ $(id -u) -ne 0 ] && [ $# -ne 1 ] && echo "Syntax (for non-root): $(basename $0) DESTINATION_FILE" >&2 && exit 1
[ $(id -u) -eq 0 ] && [ $# -gt 2 -o $# -lt 1 ] && echo "Syntax (for root): $(basename $0) [USERNAME] DESTINATION_FILE" >&2 && exit 1
if [ $# -eq 1 ]
then EZ_USER=$(id -un)
EZ_FILE=$1
else EZ_USER=$1
EZ_FILE=$2
fi
cc -o "$EZ_FILE" "$C_SOURCE"
if [ $(id -u) -eq 0 ]
then chown "$EZ_USER". "$EZ_FILE" || { echo "the user '$EZ_USER' does not exist" >&2; rm "$EZ_FILE"; exit 1; }
fi
chmod u+s "$EZ_FILE"
echo "Successfully created '$EZ_FILE' for user '$EZ_USER'."

View file

@ -0,0 +1,10 @@
#include <stdio.h>
/* C wrapper to allow ezmlm-web.cgi to run suid */
/* Copyright (C) 1999/2000, Guy Antony Halse, All Rights Reserved */
/* See the README file in this distribution for copyright information */
int main(void) {
/* Change this path to wherever you decided to put ezmlm-web.cgi */
execv("/usr/lib/ezmlm-web/ezmlm-web.pl");
}

View file

@ -0,0 +1,25 @@
.TH ezmlm-web-make-suid 1 "January 02006" "ezmlm-web" "helper script"
.SH NAME
ezmlm-web-make-suid \- create user-specific suid wrappers for ezmlm-web
.SH SYNOPSIS
.B ezmlm-web-make-suid
[\fIUSERNAME\fR] \fIDESTINATION_FILE\fR
.SH DESCRIPTION
.PP
Create a user-specific suid wrapper for ezmlm-web. This is necessary, as
the mailing lists are usually not owned by the webserver, that executes
the cgi.
.PP
The destination file determines where to put the resulting binary.
.PP
Only root is allowed to choose a username.
.SH EXAMPLES
.PP
ezmlm-web-make-suid john ~john/public_html/ezmlm-web
.SH AUTHOR
Written by Lars Kruse
.SH "REPORTING BUGS"
Report bugs to <devel@sumpfralle.de>
.SH COPYRIGHT
Copyright \(co 02006 Lars Kruse

View file

@ -1,37 +1,6 @@
#!/usr/bin/perl #!/usr/bin/perl
#=========================================================================== #===========================================================================
# ezmlm-web.cgi - version 2.3 - 10/06/02005 # ezmlm-web.cgi - version 3.0
#
# Copyright (C) 1999/2000, Guy Antony Halse, All Rights Reserved.
# Please send bug reports and comments to guy-ezmlm@rucus.ru.ac.za
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# Neither name Guy Antony Halse nor the names of any contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# ========================================================================== # ==========================================================================
# All user configuration happens in the config file ``ezmlmwebrc'' # All user configuration happens in the config file ``ezmlmwebrc''
# POD documentation is at the end of this file # POD documentation is at the end of this file
@ -93,8 +62,10 @@ if(defined($opt_C)) {
require "$HOME_DIR/.ezmlmwebrc"; # User require "$HOME_DIR/.ezmlmwebrc"; # User
} elsif(-e "./ezmlmwebrc") { } elsif(-e "./ezmlmwebrc") {
require "./ezmlmwebrc"; # Install require "./ezmlmwebrc"; # Install
} elsif(-e "/etc/ezmlm-web/ezmlmwebrc") {
require "/etc/ezmlm-web/ezmlmwebrc"; # System (new style)
} elsif(-e "/etc/ezmlm/ezmlmwebrc") { } elsif(-e "/etc/ezmlm/ezmlmwebrc") {
require "/etc/ezmlm/ezmlmwebrc"; # System require "/etc/ezmlm/ezmlmwebrc"; # System (old style)
} else { } else {
&fatal_error("Unable to read config file"); &fatal_error("Unable to read config file");
} }

View file

@ -0,0 +1,76 @@
#!/bin/sh
#
# Copyright (c) 02005 Lars Kruse <devel@sumpfralle.de>
#
# License: This script is distributed under the terms of
# the BSD license
#
# build a debian package
#
set -ue
######### some settings ###########
ROOT_DIR=$(dirname "$0")/..
ROOT_DIR=$(cd "$ROOT_DIR"; pwd)
BUILD_DIR=/tmp/ezmlm-web-build-$$
PACKAGE_DIR=$ROOT_DIR/../tags/packages
[ ! -e "$PACKAGE_DIR" ] && PACKAGE_DIR=$ROOT_DIR/../packages
[ ! -e "$PACKAGE_DIR" ] && echo "package dir not found" >&2 && exit 1
############# do it ###############
[ -e "$BUILD_DIR" ] && rm -rf "$BUILD_DIR"
ACTION=build
[ $# -gt 0 ] && ACTION=$1 && shift
case "$ACTION" in
build )
mkdir -p "$BUILD_DIR/usr/share/ezmlm-web"
mkdir -p "$BUILD_DIR/usr/lib/ezmlm-web"
mkdir -p "$BUILD_DIR/usr/bin"
mkdir -p "$BUILD_DIR/usr/share/man/man1"
mkdir -p "$BUILD_DIR/usr/share/doc/ezmlm-web/examples"
mkdir -p "$BUILD_DIR/etc/ezmlm-web"
mkdir -p "$BUILD_DIR/var/www"
svn export "$ROOT_DIR/template" "$BUILD_DIR/usr/share/ezmlm-web/template" >/dev/null
svn export "$ROOT_DIR/css" "$BUILD_DIR/usr/share/ezmlm-web/css" >/dev/null
ln -s /usr/share/ezmlm-web/css/default.css "$BUILD_DIR/var/www/ezmlm-web.css"
svn export "$ROOT_DIR/lang" "$BUILD_DIR/usr/share/ezmlm-web/lang" >/dev/null
cp "$ROOT_DIR/ezmlm-web.cgi" "$BUILD_DIR/usr/lib/ezmlm-web/ezmlm-web.pl"
cp "$ROOT_DIR/debian-related/index.c" "$BUILD_DIR/usr/share/ezmlm-web"
cp "$ROOT_DIR/htaccess.sample" "$BUILD_DIR/usr/share/doc/ezmlm-web/examples"
cp "$ROOT_DIR/webusers.sample" "$BUILD_DIR/usr/share/doc/ezmlm-web/examples"
sed 's#/usr/local/#/usr/#g' "$ROOT_DIR/ezmlmwebrc" | tee "$BUILD_DIR/usr/share/doc/ezmlm-web/examples/ezmlmwebrc" >"$BUILD_DIR/etc/ezmlm-web/ezmlmwebrc"
cp "$ROOT_DIR/README" "$BUILD_DIR/usr/share/doc/ezmlm-web"
cp "$ROOT_DIR/TODO" "$BUILD_DIR/usr/share/doc/ezmlm-web"
cp "$ROOT_DIR/UPGRADING" "$BUILD_DIR/usr/share/doc/ezmlm-web"
cp "$ROOT_DIR/copyright" "$BUILD_DIR/usr/share/doc/ezmlm-web"
cp "$ROOT_DIR/debian-related/README.Debian" "$BUILD_DIR/usr/share/doc/ezmlm-web"
cp "$ROOT_DIR/debian-related/ezmlm-web-make-suid" "$BUILD_DIR/usr/bin"
gzip --best -c "$ROOT_DIR/changelog" \
>"$BUILD_DIR/usr/share/doc/ezmlm-web/changelog.gz"
gzip --best -c "$ROOT_DIR/debian-related/changelog.Debian" \
>"$BUILD_DIR/usr/share/doc/ezmlm-web/changelog.Debian.gz"
gzip --best -c "$ROOT_DIR/debian-related/man/ezmlm-web-make-suid.1" \
>"$BUILD_DIR/usr/share/man/man1/ezmlm-web-make-suid.1.gz"
svn export "$ROOT_DIR/debian-related/DEBIAN" "$BUILD_DIR/DEBIAN" >/dev/null
fakeroot dpkg-deb --build "$BUILD_DIR" "$PACKAGE_DIR"
rm -rf "$BUILD_DIR"
;;
check )
PACKAGE_FILE=$(find "$PACKAGE_DIR" -type f -name "ezmlm-web*" | grep "\.deb$" | sort -n | tail -1)
if [ -z "$PACKAGE_FILE" ]
then echo "no debian package found in $PACKAGE_DIR"
else lintian "$PACKAGE_FILE"
fi
;;
* )
echo "Syntax: $(basename $0) [ build | check | help ]"
echo
;;
esac

Binary file not shown.