From: Baptiste Daroussin
Date: Fri, 2 Dec 2022 16:08:41 +0000 (+0100)
Subject: web: remove perl and php frontend
X-Git-Tag: RELEASE_1_4_0_a2~99
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15152c0f3087e6fbfeac616d44915a6edd033c9d;p=thirdparty%2Fmlmmj.git
web: remove perl and php frontend
I have no intention to maintain them
---
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 2608844f..37535181 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -1,4 +1,4 @@
## Process this file with automake to produce Makefile.in
-EXTRA_DIST = web amime-receive foot_filter pymime
+EXTRA_DIST = amime-receive foot_filter pymime
SUBDIRS = receivestrip
diff --git a/contrib/web/perl-admin/README b/contrib/web/perl-admin/README
deleted file mode 100644
index b2d5eaa2..00000000
--- a/contrib/web/perl-admin/README
+++ /dev/null
@@ -1,62 +0,0 @@
-mlmmj-1.0.0 August 20th 2004
-
-To use this web-interface you have to:
-
-0) Make sure you have the CGI::FastTemplate perl module installed. If not, then
- install it. It has no dependencies to other perl modules.
-
-1) Copy the files from the perl-admin directory of the mlmmj distribution to a
- suitable location and point your webroot to the htdocs directory. If you
- don't want the webinterface in the root of your website it is recommended to
- make an alias in your web server configuration in order to keep the conf
- directory at the same level as the htdocs directory and still outside
- webscope.
-
-2) You need to enable cgi in your apache configuration like this
-
- Options ExecCGI
- DirectoryIndex index.cgi
- AddHandler cgi-script .cgi
-
-3) Change the permissions of the listdir/control directories of any list you
- want to control using the web-interface, so the web server can write in it:
-
- # chown -R wwwrun /var/spool/mlmmj/mlmmj-test/control/
-
-4) If the web server does not run as the same user the mailserver writes as
- you need to create a group (eg. mlmmj) and add both users to it. The
- subscribers.d directory then needs to be writable by that group:
-
- # chgrp -R mlmmj /var/spool/mlmmj/mlmmj-test/subscribers.d
- # chmod -R g+w /var/spool/mlmmj/mlmmj-test/subscribers.d
- # chgrp -R mlmmj /var/spool/mlmmj/mlmmj-test/digesters.d
- # chmod -R g+w /var/spool/mlmmj/mlmmj-test/digesters.d
- # chgrp -R mlmmj /var/spool/mlmmj/mlmmj-test/nomailsubs.d
- # chmod -R g+w /var/spool/mlmmj/mlmmj-test/nomailsubs.d
- # chgrp -R mlmmj /var/spool/mlmmj/mlmmj-test/text
- # chmod -R g+w /var/spool/mlmmj/mlmmj-test/text
-
-To enable access control on Apache you have to:
-
-5) Rename dot.htaccess to .htaccess and edit the path inside the file to point
- to a htpasswd file somewhere outside the webscope.
-
- If you don't have one already, you can create one like this
-
- htpasswd -c /home/mlmmj/htpasswd USER
-
- It will then ask you for a password for the given username.
-
-6) That is it, you are ready to use the interface.
-
-Further customization:
-
-You can set two environment variables in your apache config to control the
-configuration of the mlmmj webinterface. Remember to have mod_env loaded if
-you do this.
-
- SetEnv CONFIG_PATH /home/mlmmj/conf/config.pl
- SetEnv TUNABLES_PATH /home/mlmmj/conf/tunables.pl
-
-This allows you to run several instances of the webinterface with e.g. different
-topdirs, translated to another language or with another layout.
diff --git a/contrib/web/perl-admin/conf/config.pl b/contrib/web/perl-admin/conf/config.pl
deleted file mode 100755
index beb73ebc..00000000
--- a/contrib/web/perl-admin/conf/config.pl
+++ /dev/null
@@ -1,2 +0,0 @@
-$topdir = "/var/spool/mlmmj";
-$templatedir = "/home/mlmmj/templates";
diff --git a/contrib/web/perl-admin/conf/tunables.pl b/contrib/web/perl-admin/conf/tunables.pl
deleted file mode 100644
index c57297d7..00000000
--- a/contrib/web/perl-admin/conf/tunables.pl
+++ /dev/null
@@ -1,243 +0,0 @@
-mlmmj_list("listaddress",
- "List address",
- "This option contains all addresses which mlmmj sees as listaddresses (see ".
- "tocc below). The first one is the one used as the primary one, when mlmmj ".
- "sends out mail.");
-
-mlmmj_boolean("closedlist",
- "Closed list",
- "If the list is open or closed. If it's closed subscription ".
- "and unsubscription via mail is disabled.");
-
-mlmmj_boolean("closedlistsub",
- "Closed for subscription",
- "Closed for subscription. Unsubscription is possible.");
-
-mlmmj_boolean("nosubconfirm",
- "No subscribe confirmation",
- "If this option is set, the user is not required to confirm when subscribing or unsubscribing.");
-
-mlmmj_boolean("moderated",
- "Moderated",
- "If this option is set, the emailaddresses in the file listdir/control/moderators will act as moderators for the list.");
-
-mlmmj_list("moderators",
- "Moderators",
- "If the list is moderated, this is the list of moderators.");
-
-mlmmj_list("submod",
- "Subscription moderators",
- "This is the list of moderators that will approve subscriptions.");
-
-mlmmj_boolean("tocc",
- "To: Cc:",
- "If this option is set, the list address does not have to be in the To: or Cc: header of the email to the list.");
-
-mlmmj_boolean("addtohdr",
- "Add To: header",
- "If this option is set, a To: header including the recipients emailaddress will be added to outgoing mail. ".
- "Recommended usage is to remove existing To: headers with delheaders (see below) first.");
-
-mlmmj_boolean("subonlypost",
- "Subscribers only post",
- "If this option is set, only people who are subscribed to the list, are allowed to post to it. ".
- "The check is made against the \"From:\" header.");
-
-mlmmj_boolean("modonlypost",
- "Moderators only post",
- "When this file is present, only people listed in listdir/control/moderators ".
- "are allowed to post to it. The check is made against the "From:" header.");
-
-mlmmj_boolean("modnonsubposts",
- "Moderate non-allowed posts",
- "If this option is set, postings from people who are not allowed to post ".
- "to the list will be moderated instead of denied.");
-
-mlmmj_string("modreqlife",
- "Moderation request lifetime",
- "This specifies how long in seconds a mail awaits moderation before it's ".
- "discarded. Defaults to 604800 seconds, which is 7 days.");
-
-mlmmj_string("prefix",
- "Prefix",
- "The prefix for the Subject: line of mails to the list. This will alter the Subject: line, ".
- "and add a prefix if it's not present elsewhere.");
-
-mlmmj_list("owner",
- "Owner",
- "The emailaddresses in this list will get mails to ".encode_entities($list)."+owner");
-
-mlmmj_list("customheaders",
- "Custom headers",
- "These headers are added to every mail coming through. This is ".
- "the place you want to add Reply-To: header in case you want ".
- "such. ".
- "If a header should not occur twice in the mail it should be listed in the 'Delete headers' box too.");
-
-mlmmj_list("delheaders",
- "Delete headers",
- "In this file is specified *ONE* headertoken to match pr. line. ".
- "If the file consists of: Received: Message-ID: Then all occurences of these headers in incoming list mail will be deleted. ".
- "\"From \" and \"Return-Path:\" are deleted no matter what.");
-
-mlmmj_list("access",
- "Access",
- "If this option is set, all headers of a post to the list is matched against the rules. The first rule to match wins. ".
- "See README.access for syntax and examples. NOTE: If this field is empty access control is *disabled*, ".
- "unlike having an empty control/access file.");
-
-mlmmj_string("memorymailsize",
- "Memory mail size",
- "Here is specified in bytes how big a mail can be and still be prepared for sending in memory. ".
- "It's greatly reducing the amount of write system calls to prepare it in memory before sending it, ".
- "but can also lead to denial of service attacks. Default is 16k (16384 bytes).");
-
-mlmmj_string("relayhost",
- "Relay host",
- "The host specified (IP address or domainname, both works) in this file will be used for relaying the mail sent to the list. ".
- "Defaults to 127.0.0.1.");
-
-mlmmj_string("smtpport",
- "SMTP port",
- "In this file a port other than port 25 for connecting to the relayhost can be specified.");
-
-mlmmj_string("delimiter",
- "Delimiter",
- "This specifies what to use as recipient delimiter for the list.".
- "Default is \"+\".");
-
-mlmmj_boolean("notifysub",
- "Notify subscribers",
- "If this option is set, the owner(s) will get a mail with the address of someone sub/unsubscribing to a mailinglist.");
-
-mlmmj_boolean("notifymod",
- "Notify moderation",
- "If this option is set, the poster (based on the envelope from) will ".
- "get a mail when their post is being moderation.");
-
-mlmmj_string("digestinterval",
- "Digest interval",
- "This option specifies how many seconds will pass before the ".
- "next digest is sent. Defaults to 604800 seconds, which is 7 ".
- "days.");
-
-mlmmj_string("digestmaxmails",
- "Max. digest mails",
- "This option specifies how many mails can accumulate before ".
- "digest sending is triggered. Defaults to 50 mails, meaning ".
- "that if 50 mails arrive to the list before digestinterval have ".
- "passed, the digest is delivered.");
-
-mlmmj_string("bouncelife",
- "Bouncing lifetime",
- "This specifies how long in seconds an address can bounce before it's ".
- "unsubscribed. Defaults to 432000 seconds, which is 5 days.");
-
-mlmmj_boolean("noarchive",
- "No archive",
- "If this option is set, the mails won't be saved in the ".
- "archive but simply deleted");
-
-mlmmj_boolean("noget",
- "No get",
- "If this option is set, listname+get-INDEX is turned off.");
-
-mlmmj_boolean("subonlyget",
- "Subscribers only get",
- "If this option is set, retrieving old posts with +get-N is only possible for subscribers.");
-
-mlmmj_string("verp",
- "VERP",
- "Enable VERP support. Anything added in this variable will be appended the ".
- "MAIL FROM: line. If \"postfix\" is put in the file, it'll make postfix use ".
- "VERP by adding XVERP=-= to the MAIL FROM: line.");
-
-mlmmj_string("maxverprecips",
- "Maximum VERP recipients",
- "How many recipients pr. mail delivered to the smtp server. Defaults to 100.");
-
-mlmmj_boolean("notoccdenymails",
- "No To: Cc: deny mails",
- "This switch turns off whether mlmmj sends out notification about postings ".
- "being denied due to the listaddress not being in To: or Cc: (see 'tocc').");
-
-mlmmj_boolean("noaccessdenymails",
- "No access deny mails",
- "This switch turns off whether mlmmj sends out notification about postings ".
- "being rejected due to an access rule (see 'access').");
-
-mlmmj_boolean("nosubonlydenymails",
- "No subscribers only deny mails",
- "This switch turns off whether mlmmj sends out notification about postings ".
- "being rejected due to a subscribers only posting list (see 'subonlypost').");
-
-mlmmj_boolean("nomodonlydenymails",
- "No moderators only deny mails",
- "This switch turns off whether mlmmj sends out notification about postings ".
- "being rejected due to a moderators only posting list (see 'modonlypost').");
-
-mlmmj_boolean("nosubmodmails",
- "No subscription moderated mails",
- "This switch turns off whether mlmmj sends out notification about ".
- "subscription being moderated to the person requesting subscription".
- "(see 'submod').");
-
-mlmmj_boolean("nodigesttext",
- "No digest text summary",
- "This switch turns off whether digest mails will have a text part with a thread ".
- "summary.");
-
-mlmmj_boolean("nodigestsub",
- "No digest subscribers",
- "If this option is set, subscription to the digest version of the mailinglist ".
- "will be denied. (Useful if you don't want to allow digests and notify users ".
- "about it).");
-
-mlmmj_boolean("nonomailsub",
- "No nomail subscribers",
- "If this option is set, subscription to the nomail version of the mailinglist ".
- "will be denied. (Useful if you don't want to allow nomail and notify users ".
- "about it).");
-
-mlmmj_string("maxmailsize",
- "Max. mail size",
- "With this option the maximal allowed size of incoming mails can be specified.");
-
-mlmmj_boolean("nomaxmailsizedenymails",
- "No max. mail size deny mails",
- "If this is set, no reject notifications caused by violation of maxmailsize ".
- "will be sent.");
-
-mlmmj_boolean("nolistsubsemail",
- "No list subscribers email",
- "If this is set, the LISTNAME+list\@ functionality for requesting an ".
- "email with the subscribers for owner is disabled.");
-
-mlmmj_string("staticbounceaddr",
- "Static bounce address",
- "If this is set to something\@example.org, the bounce address (Return-Path:) ".
- "will be fixed to something+listname-bounces-and-so-on\@example.org ".
- "in case you need to disable automatic bounce handling.");
-
-mlmmj_boolean("ifmodsendonlymodmoderate",
- "If moderator send only moderator moderate",
- "If this is set, then mlmmj in case of moderation checks the ".
- "envelope from, to see if the sender is a moderator, and in that case ".
- "only send the moderation mails to that address. In practice this means that ".
- "a moderator sending mail to the list won't bother all the other moderators ".
- "with his mail.");
-
-mlmmj_list("footer",
- "Footer",
- "The content of this option is appended to mail sent to the list.");
-
-mlmmj_boolean("notmetoo",
- "Not me too",
- "If this is set, mlmmj attempts to exclude the sender of a post ".
- "from the distribution list for that post so people don't receive copies ".
- "of their own posts.");
-
-mlmmj_string("smtphelo",
- "SMTP Helo Name",
- "When this file is present, it contains the hostname to send in the SMTP ".
- "EHLO or HELO command. Otherwise the machine hostname is used.");
diff --git a/contrib/web/perl-admin/htdocs/dot.htaccess b/contrib/web/perl-admin/htdocs/dot.htaccess
deleted file mode 100644
index 6e40ec87..00000000
--- a/contrib/web/perl-admin/htdocs/dot.htaccess
+++ /dev/null
@@ -1,4 +0,0 @@
-Require valid-user
-AuthType Basic
-AuthName "mlmmj web-interface"
-AuthUserFile /home/mlmmj/htpasswd
diff --git a/contrib/web/perl-admin/htdocs/edit.cgi b/contrib/web/perl-admin/htdocs/edit.cgi
deleted file mode 100755
index 389a3b8b..00000000
--- a/contrib/web/perl-admin/htdocs/edit.cgi
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/usr/bin/perl -w
-
-# Copyright (C) 2004 Morten K. Poulsen
-# Copyright (C) 2004 Christian Laursen
-#
-# $Id$
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-use strict;
-use CGI;
-use CGI::FastTemplate;
-use HTML::Entities;
-
-use vars qw($topdir $templatedir $list);
-
-if (exists $ENV{CONFIG_PATH}) {
- require $ENV{CONFIG_PATH};
-} else {
- require "../conf/config.pl";
-}
-
-my $tpl = new CGI::FastTemplate($templatedir);
-
-my $q = new CGI;
-$list = $q->param("list");
-
-die "no list specified" unless $list;
-die "non-existent list" unless -d("$topdir/$list");
-
-$tpl->define(main => "edit.html",
- boolean => "edit_boolean.html",
- string => "edit_string.html",
- list => "edit_list.html");
-
-$tpl->assign(LIST => encode_entities($list));
-
-my $tunables_file = "../conf/tunables.pl";
-if (exists $ENV{TUNABLES_PATH}) {
- $tunables_file = $ENV{TUNABLES_PATH};
-}
-
-do $tunables_file;
-
-print "Content-type: text/html\n\n";
-$tpl->parse(CONTENT => "main");
-$tpl->print;
-
-sub mlmmj_boolean {
- my ($name, $nicename, $text) = @_;
- my $checked = -f "$topdir/$list/control/$name";
-
- $tpl->assign(NAME => encode_entities($name));
- $tpl->assign(NICENAME => encode_entities($nicename));
- $tpl->assign(TEXT => encode_entities($text));
- $tpl->assign(CHECKED => $checked ? ' checked' : '');
-
- $tpl->parse(ROWS => ".boolean");
-}
-
-sub mlmmj_string {
- my ($name, $nicename, $text) = @_;
- my $file = "$topdir/$list/control/$name";
- my $value;
-
- if (! -f $file) {
- $value = "";
- } else {
- open(F, $file) or die("can't open $file");
- $value = ;
- close(F);
- chomp($value);
- }
-
- $tpl->assign(NAME => encode_entities($name));
- $tpl->assign(NICENAME => encode_entities($nicename));
- $tpl->assign(TEXT => encode_entities($text));
- $tpl->assign(VALUE => encode_entities($value));
-
- $tpl->parse(ROWS => ".string");
-}
-
-sub mlmmj_list {
- my ($name, $nicename, $text) = @_;
- my $file = "$topdir/$list/control/$name";
- my $value;
-
- if (! -f $file) {
- $value = "";
- } else {
- open(F, $file) or die("can't open $file");
- while () {
- $value .= $_;
- }
- close(F);
- chomp($value);
- }
-
- $tpl->assign(NAME => encode_entities($name));
- $tpl->assign(NICENAME => encode_entities($nicename));
- $tpl->assign(TEXT => encode_entities($text));
- $tpl->assign(VALUE => encode_entities($value));
-
- $tpl->parse(ROWS => ".list");
-}
-
diff --git a/contrib/web/perl-admin/htdocs/edit_text.cgi b/contrib/web/perl-admin/htdocs/edit_text.cgi
deleted file mode 100755
index c51eb17e..00000000
--- a/contrib/web/perl-admin/htdocs/edit_text.cgi
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/perl -w
-
-# Copyright (C) 2007 Franky Van Liedekerke
-#
-# $Id$
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-use strict;
-use CGI;
-use CGI::FastTemplate;
-use HTML::Entities;
-
-use vars qw($topdir $templatedir $list);
-
-if (exists $ENV{CONFIG_PATH}) {
- require $ENV{CONFIG_PATH};
-} else {
- require "../conf/config.pl";
-}
-
-my $tpl = new CGI::FastTemplate($templatedir);
-
-my $q = new CGI;
-$list = $q->param("list");
-
-die "no list specified" unless $list;
-die "non-existent list" unless -d("$topdir/$list");
-
-$tpl->define(main => "edit_text.html",
- list => "edit_textstring.html");
-
-$tpl->assign(LIST => encode_entities($list));
-
-my $textdir = "$topdir/$list/text";
-my @files;
-opendir(DIR, $textdir ) || die "can't opendir $textdir: $!";
-@files = grep { !/^\./ && -f "$textdir/$_" } readdir(DIR);
-closedir DIR;
-
-for my $textfile (sort @files) {
- mlmmj_text($textfile);
-}
-
-print "Content-type: text/html\n\n";
-$tpl->parse(CONTENT => "main");
-$tpl->print;
-
-sub mlmmj_text {
- my ($name) = @_;
- my $file = "$textdir/$name";
- my $value;
-
- if (! -f $file) {
- $value = "";
- } else {
- open(F, $file) or die("can't open $file");
- while () {
- $value .= $_;
- }
- close(F);
- chomp($value);
- }
-
- $tpl->assign(NAME => encode_entities($name));
- $tpl->assign(VALUE => encode_entities($value));
-
- $tpl->parse(ROWS => ".list");
-}
diff --git a/contrib/web/perl-admin/htdocs/index.cgi b/contrib/web/perl-admin/htdocs/index.cgi
deleted file mode 100755
index 95e648d6..00000000
--- a/contrib/web/perl-admin/htdocs/index.cgi
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/perl -w
-
-# Copyright (C) 2004 Morten K. Poulsen
-# Copyright (C) 2004 Christian Laursen
-#
-# $Id$
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-use strict;
-use URI::Escape;
-use HTML::Entities;
-use CGI::FastTemplate;
-
-use vars qw($topdir $templatedir);
-
-if (exists $ENV{CONFIG_PATH}) {
- require $ENV{CONFIG_PATH};
-} else {
- require "../conf/config.pl";
-}
-
-my $tpl = new CGI::FastTemplate($templatedir);
-
-$tpl->define(main => "index.html",
- row => "index_row.html");
-
-my $lists = "";
-opendir(DIR, $topdir) or die "Couldn't open $topdir for reading: $!";
-while (my $list = readdir(DIR)) {
- next if $list =~ /^\./;
- $tpl->assign(LIST => encode_entities($list));
- $tpl->assign(ULIST => uri_escape($list));
- $tpl->parse(LISTS => '.row');
-}
-closedir(DIR);
-
-print "Content-type: text/html\n\n";
-
-$tpl->parse(CONTENT => "main");
-$tpl->print;
diff --git a/contrib/web/perl-admin/htdocs/save.cgi b/contrib/web/perl-admin/htdocs/save.cgi
deleted file mode 100755
index d0e0d003..00000000
--- a/contrib/web/perl-admin/htdocs/save.cgi
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/usr/bin/perl -w
-
-# Copyright (C) 2004 Morten K. Poulsen
-# Copyright (C) 2004, 2005 Christian Laursen
-#
-# $Id$
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-# We might want some kind of validation of the values we are about to save,
-# but that would require save.cgi to know about all kind of options that mlmmj
-# accepts. I am not sure we want that. -- mortenp 20040709
-
-use strict;
-use CGI;
-use CGI::FastTemplate;
-use HTML::Entities;
-
-use vars qw($topdir $templatedir $list);
-
-if (exists $ENV{CONFIG_PATH}) {
- require $ENV{CONFIG_PATH};
-} else {
- require "../conf/config.pl";
-}
-
-my $tpl = new CGI::FastTemplate($templatedir);
-
-my $q = new CGI;
-$list = $q->param("list");
-
-die "no list specified" unless $list;
-die "non-existent list" unless -d("$topdir/$list");
-
-$tpl->define(main => "save.html");
-$tpl->assign(LIST => encode_entities($list));
-
-my $tunables_file = "../conf/tunables.pl";
-if (exists $ENV{TUNABLES_PATH}) {
- $tunables_file = $ENV{TUNABLES_PATH};
-}
-
-do $tunables_file;
-
-print "Content-type: text/html\n\n";
-$tpl->parse(CONTENT => "main");
-$tpl->print;
-
-sub mlmmj_boolean {
- my ($name, $nicename, $text) = @_;
-
- my $file = "$topdir/$list/control/$name";
-
- my $value = $q->param($name);
- if ($value) {
- open (FILE, ">$file") or die "Couldn't open $file for writing: $!";
- close FILE;
- } else {
- unlink $file;
- }
-}
-
-sub mlmmj_string {
- mlmmj_list(@_);
-}
-
-sub mlmmj_list {
- my ($name, $nicename, $text) = @_;
-
- my $file = "$topdir/$list/control/$name";
-
- my $value = $q->param($name);
-
- if (defined $value && $value !~ /^\s*$/) {
- $value .= "\n" if $value !~ /\n$/;
- $value =~ s/\s*\r?\n/\n/g;
- open (FILE, ">$file") or die "Couldn't open $file for writing: $!";
- print FILE $value;
- close FILE;
- } else {
- unlink $file;
- }
-}
diff --git a/contrib/web/perl-admin/htdocs/save_text.cgi b/contrib/web/perl-admin/htdocs/save_text.cgi
deleted file mode 100755
index 2bdd1d07..00000000
--- a/contrib/web/perl-admin/htdocs/save_text.cgi
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/perl -w
-
-# Copyright (C) 2007 Franky Van Liedekerke
-#
-# $Id$
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-# We might want some kind of validation of the values we are about to save,
-# but that would require save.cgi to know about all kind of options that mlmmj
-# accepts. I am not sure we want that. -- mortenp 20040709
-
-use strict;
-use CGI;
-use CGI::FastTemplate;
-use HTML::Entities;
-
-use vars qw($topdir $templatedir $list);
-
-if (exists $ENV{CONFIG_PATH}) {
- require $ENV{CONFIG_PATH};
-} else {
- require "../conf/config.pl";
-}
-
-my $tpl = new CGI::FastTemplate($templatedir);
-
-my $q = new CGI;
-$list = $q->param("list");
-
-die "no list specified" unless $list;
-die "non-existent list" unless -d("$topdir/$list");
-
-$tpl->define(main => "save_text.html");
-$tpl->assign(LIST => encode_entities($list));
-
-my $textdir = "$topdir/$list/text";
-my @files;
-opendir(DIR, $textdir ) || die "can't opendir $textdir: $!";
-@files = grep { !/^\./ && -f "$textdir/$_" } readdir(DIR);
-closedir DIR;
-
-for my $textfile (sort @files) {
- mlmmj_text($textfile);
-}
-
-print "Content-type: text/html\n\n";
-$tpl->parse(CONTENT => "main");
-$tpl->print;
-
-sub mlmmj_text {
- my ($name, $nicename, $text) = @_;
-
- my $file = "$textdir/$name";
-
- my $value = $q->param($name);
-
- open (FILE, ">$file") or die "Couldn't open $file for writing: $!";
- print FILE $value;
- close FILE;
-}
diff --git a/contrib/web/perl-admin/htdocs/subscribers.cgi b/contrib/web/perl-admin/htdocs/subscribers.cgi
deleted file mode 100755
index 84a60042..00000000
--- a/contrib/web/perl-admin/htdocs/subscribers.cgi
+++ /dev/null
@@ -1,265 +0,0 @@
-#!/usr/bin/perl -w
-
-# Copyright (C) 2004, 2005, 2006, 2007 Christian Laursen
-# Copyright (C) 2007 Franky Van Liedekerke
-#
-# $Id$
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-use strict;
-use URI::Escape;
-use HTML::Entities;
-use CGI;
-use CGI::FastTemplate;
-use Digest::MD5;
-
-use vars qw($topdir $templatedir $list);
-
-if (exists $ENV{CONFIG_PATH}) {
- require $ENV{CONFIG_PATH};
-} else {
- require "../conf/config.pl";
-}
-
-my $mlmmjsub = "/usr/local/bin/mlmmj-sub";
-my $mlmmjunsub = "/usr/local/bin/mlmmj-unsub";
-
-my $tpl = new CGI::FastTemplate($templatedir);
-
-my $q = new CGI;
-$list = $q->param("list");
-my $update = $q->param("update");
-my $search = $q->param("search");
-my $email = $q->param("email");
-my $file = $q->param("file");
-my $removeall = $q->param("removeall");
-
-# Everything is submitted from the same form so a little hackery is needed
-# to pick the right action to perform. When doing subscribe and search we
-# don't depend on the submit buttons since hitting enter in either of the
-# text fields will pick the "Subscribe" button.
-#
-# If an email has been entered for subscription, clear the search field.
-
-if (defined $email && $email !~ /^$/) {
- $search = undef;
-} else {
- $email = undef;
-}
-
-die "no list specified" unless $list;
-die "non-existent list" unless -d("$topdir/$list");
-
-$tpl->define(main => "subscribers.html",
- row => "subscribers_row.html");
-
-my $action = '';
-
-my $subscribers;
-my $subcount;
-
-if (defined $removeall) {
- my $removeall_check = $q->param("removeall_check");
- if ($removeall_check) {
- unlink <$topdir/$list/subscribers.d/*>;
- unlink <$topdir/$list/nomailsubs.d/*>;
- unlink <$topdir/$list/digesters.d/*>;
- $action = "All subscribers have been removed.";
- } else {
- $action = "Safety check not clicked, nothing done.";
- }
-} elsif (defined $file) {
- my $subscriber = $q->param("subscriber");
- my $digester = $q->param("digester");
- my $nomailsub = $q->param("nomailsub");
- my $upload_handle = $q->upload("file");
- binmode $upload_handle;
- while (<$upload_handle>) {
- s/\r?\n$//;
- my $email=$_;
- if ($email =~ /^[a-z0-9\.\-_\@]+$/i) {
- if ($subscriber) {
- system "$mlmmjsub -L $topdir/$list -a $email -U -s";
- }
- if ($digester) {
- system "$mlmmjsub -L $topdir/$list -a $email -Ud -s";
- }
- if ($nomailsub) {
- system "$mlmmjsub -L $topdir/$list -a $email -Un -s";
- }
- if ($? == 0) {
- $action .= "$email has been subscribed. \n";
- } else {
- $action .= "error subscribing $email (code $?) \n";
- }
- } else {
- $action .= '"'.encode_entities($email).'" is not a valid email address. ';
- }
- }
-} elsif (defined $email) {
- my $subscriber = $q->param("subscriber");
- my $digester = $q->param("digester");
- my $nomailsub = $q->param("nomailsub");
- if ($email =~ /^[a-z0-9\.\-_\@]+$/i) {
- if ($subscriber) {
- system "$mlmmjsub -L $topdir/$list -a $email -U -s";
- }
- if ($digester) {
- system "$mlmmjsub -L $topdir/$list -a $email -Ud -s";
- }
- if ($nomailsub) {
- system "$mlmmjsub -L $topdir/$list -a $email -Un -s";
- }
- if ($? == 0) {
- $action = "$email has been added";
- } else {
- $action = "error adding $email (code $?)";
- }
- } else {
- $action = '"'.encode_entities($email).'" is not a valid email address.';
- }
-} elsif (defined $update) {
- my $maxid = $q->param("maxid");
- $subscribers = get_subscribers();
- for (my $i = 0; $i < $maxid; ++$i) {
- my $email = $q->param("email$i");
- if (defined $email) {
- if ($email =~ /^[a-z0-9\.\-_\@]+$/i) {
- my $updated = 0;
-
- my @actions = ();
-
- push @actions, {oldstatus => exists $subscribers->{$email}->{subscriber},
- newstatus => defined $q->param("subscriber$i"),
- action => ''};
- push @actions, {oldstatus => exists $subscribers->{$email}->{digester},
- newstatus => defined $q->param("digester$i"),
- action => '-d'};
- push @actions, {oldstatus => exists $subscribers->{$email}->{nomailsub},
- newstatus => defined $q->param("nomailsub$i"),
- action => '-n'};
-
- for my $action (@actions) {
- if ($action->{oldstatus} && !$action->{newstatus}) {
- system "$mlmmjunsub -L $topdir/$list -a $email $action->{action}";
- $updated = 1;
- } elsif (!$action->{oldstatus} && $action->{newstatus}) {
- system "$mlmmjsub -L $topdir/$list -a $email $action->{action}";
- $updated = 1;
- }
- }
-
- if ($updated) {
- $action .= "Subscription for $email has been updated. \n";
- }
- } else {
- $action .= '"'.encode_entities($email).'" is not a valid email address.'." \n";
- }
- }
- }
-}
-
-$tpl->assign(ACTION => $action);
-
-$subscribers = get_subscribers();
-
-my $paginator = '';
-my $page = $q->param('page');
-$page = 0 unless defined $page && $page =~ /^\d+$/;
-if (keys %$subscribers > 50) {
- $paginator = 'Pages: ';
- my $pages = (keys %$subscribers) / 50;
- $page = 0 unless ($page >= 0 && $page < $pages);
- my $searchstr = (defined $search && $search ne '') ? '&search='.uri_escape($search) : '';
-
- for (my $i = 0; $ i < $pages; ++$i) {
- if ($page == $i) {
- $paginator .= ($i + 1)." ";
- } else {
- $paginator .= "".($i + 1)." ";
- }
- }
-}
-
-my $i = 0;
-my @addresses = sort {lc $a cmp lc $b} keys %$subscribers;
-if ($paginator ne '') {
- @addresses = @addresses[$page * 50 .. ($page + 1) * 50 - 1];
- pop @addresses until defined $addresses[@addresses - 1];
-}
-
-for my $address (@addresses) {
- $tpl->assign(EMAIL => $address,
- ID => $i++,
- SCHECKED => $subscribers->{$address}->{subscriber} ? 'checked' : '',
- DCHECKED => $subscribers->{$address}->{digester} ? 'checked' : '',
- NCHECKED => $subscribers->{$address}->{nomailsub} ? 'checked' : '');
- $tpl->parse(ROWS => '.row');
-}
-if (keys %$subscribers == 0) {
- $tpl->assign(ROWS => '');
-}
-
-$tpl->assign(LIST => encode_entities($list),
- MAXID => scalar(@addresses),
- SEARCH => defined $search ? $search : '',
- PAGINATOR => $paginator,
- PAGE => $page,
- SUBCOUNT => $subcount);
-
-print "Content-type: text/html\n\n";
-
-$tpl->parse(CONTENT => "main");
-$tpl->print;
-
-sub get_subscribers {
- my %subscribers = ();
-
- my @subscribers = `/usr/local/bin/mlmmj-list -L $topdir/$list`;
- my @digesters = `/usr/local/bin/mlmmj-list -L $topdir/$list -d`;
- my @nomailsubs = `/usr/local/bin/mlmmj-list -L $topdir/$list -n`;
-
- chomp @subscribers;
- chomp @digesters;
- chomp @nomailsubs;
-
- if (defined $search) {
- $search = lc $search;
- @subscribers = grep {index(lc $_, $search) != -1} @subscribers;
- @digesters = grep {index(lc $_, $search) != -1} @digesters;
- @nomailsubs = grep {index(lc $_, $search) != -1} @nomailsubs;
- }
-
- for my $address (@subscribers) {
- $subscribers{$address}->{subscriber} = 1;
- }
-
- for my $address (@digesters) {
- $subscribers{$address}->{digester} = 1;
- }
-
- for my $address (@nomailsubs) {
- $subscribers{$address}->{nomailsub} = 1;
- }
-
- $subcount = scalar(keys %subscribers);
-
- return \%subscribers;
-}
diff --git a/contrib/web/perl-admin/templates/edit.html b/contrib/web/perl-admin/templates/edit.html
deleted file mode 100644
index 59880527..00000000
--- a/contrib/web/perl-admin/templates/edit.html
+++ /dev/null
@@ -1,16 +0,0 @@
-mlmmj config
-
\n";
- }
-}
-
-$tpl->assign(array("LISTS" => $lists));
-
-
-$tpl->parse("MAIN","main");
-$tpl->FastPrint("MAIN");
-
-?>
diff --git a/contrib/web/php-admin/htdocs/save.php b/contrib/web/php-admin/htdocs/save.php
deleted file mode 100644
index 73f249f6..00000000
--- a/contrib/web/php-admin/htdocs/save.php
+++ /dev/null
@@ -1,120 +0,0 @@
-
- *
- * mlmmj/php-perl:
- * Copyright (C) 2004 Morten K. Poulsen
- * Copyright (C) 2004 Christian Laursen
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-require(dirname(dirname(__FILE__))."/conf/config.php");
-require(dirname(__FILE__)."/class.rFastTemplate.php");
-
-function mlmmj_boolean($name, $nicename, $text)
-{
- global $tpl, $topdir, $list;
-
- $file = $topdir."/".$list."/control/".$name;
-
- if(isset($_POST[$name]) && !empty($_POST[$name]))
- {
- if(!touch($file))
- die("Couldn't open ".$file." for writing");
- if (!chmod($file, 0644))
- die("Couldn't chmod ".$file);
- }
- else {
- if (file_exists($file)) {
- if (!unlink($file))
- die("Couldn't unlink ".$file);
- }
- }
-}
-
-function mlmmj_string ($name, $nicename, $text)
-{
- mlmmj_list($name, $nicename, $text);
-}
-
-function mlmmj_list($name, $nicename, $text)
-{
- global $tpl, $topdir, $list;
-
- $file = $topdir."/".$list."/control/".$name;
-
- if(isset($_POST[$name]) && !empty($_POST[$name]) && !preg_match('/^\s*$/',$_POST[$name]))
- {
- // remove all \r
- $_POST[$name]=preg_replace('/\r/',"",$_POST[$name]);
-
- // no trailing \n?, then we add one
- if (!preg_match('/\n$/',$_POST[$name]))
- $_POST[$name].="\n";
-
- // we don't like whitespace before a \n
- $_POST[$name]=preg_replace('/\s*\n/',"\n",$_POST[$name]);
-
- if (!$fp = fopen($file, "w"))
- die("Couldn't open ".$file." for writing");
-
- // write the result in a file
- fwrite($fp, $_POST[$name]);
- fclose($fp);
-
- if (!chmod($file, 0644))
- die("Couldn't chmod ".$file);
- }
- else {
- if (file_exists($file)) {
- if (!unlink($file))
- die("Couldn't unlink ".$file);
- }
- }
-}
-
-// Perl's encode_entities (to be able to use tunables.pl)
-function encode_entities($str) { return htmlentities($str); }
-
-
-$tpl = new rFastTemplate($templatedir);
-
-$list = $_POST["list"];
-
-if(!isset($list))
-die("no list specified");
-
-if (dirname(realpath($topdir."/".$list)) != realpath($topdir))
-die("list outside topdir");
-
-if(!is_dir($topdir."/".$list))
-die("non-existent list");
-
-$tpl->define(array("main" => "save.html"));
-$tpl->assign(array("LIST" => htmlentities($list)));
-
-$tunables = file_get_contents($confdir.'/tunables.pl');
-eval($tunables);
-
-$tpl->parse("MAIN","main");
-$tpl->FastPrint("MAIN");
-
-?>
diff --git a/contrib/web/php-admin/htdocs/subscribers.php b/contrib/web/php-admin/htdocs/subscribers.php
deleted file mode 100644
index 4c5444ac..00000000
--- a/contrib/web/php-admin/htdocs/subscribers.php
+++ /dev/null
@@ -1,114 +0,0 @@
-
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-require(dirname(dirname(__FILE__))."/conf/config.php");
-require(dirname(__FILE__)."/class.rFastTemplate.php");
-
-$tpl = new rFastTemplate($templatedir);
-
-# get the list parameter and check that list exists
-$list = $_GET["list"];
-
-if(!isset($list))
-die("no list specified");
-
-if (dirname(realpath($topdir."/".$list)) != realpath($topdir))
-die("list outside topdir");
-
-if(!is_dir($topdir."/".$list))
-die("non-existent list");
-
-# this will be displayed on the top of the page
-$message = "";
-
-# subscribe some people if tosubscribe is set
-if (isset($_POST["tosubscribe"])) {
-
- foreach (preg_split('/\r\n|\n|\r/', $_POST["tosubscribe"]) as $line) {
- $email = trim($line);
- if ($email != "") {
- if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
- $cmd = "/usr/bin/mlmmj-sub -L ".escapeshellarg("$topdir/$list")." -a ".escapeshellarg($email)." 2>&1";
- unset($out);
- exec($cmd, $out, $ret);
- if ($ret !== 0) {
- $message.= "* Subscribe error for $email\ncommand: $cmd\nreturn code: $ret\noutput: ".implode("\n", $out)."\n";
- }
- } else {
- $message.= "* Email address not valid: $email\n";
- }
- }
-
- }
-
-# delete some people if delete is set
-} else if (isset($_POST["delete"])) {
-
- $email = $_POST["email"];
- if (! filter_var($email, FILTER_VALIDATE_EMAIL)) die("Email address not valid");
-
- $cmd = "/usr/bin/mlmmj-unsub -L ".escapeshellarg("$topdir/$list")." -a ".escapeshellarg($email)." 2>&1";
- unset($out);
- exec($cmd, $out, $ret);
- if ($ret !== 0) {
- $message.= "* Unsubscribe error.\ncommand: $cmd\nreturn code: $ret\noutput: ".implode("\n", $out)."\n";
- }
-}
-
-$subscribers="";
-
-# get subscribers from mlmmj
-$cmd = "/usr/bin/mlmmj-list -L ".escapeshellarg("$topdir/$list")." 2>&1";
-unset($out);
-exec($cmd, $out, $ret);
-if ($ret !== 0) {
- $message.= "* Error: Could not get subscribers list.\n";
-} else {
-
- foreach ($out as $email) {
- $email = trim($email);
-
- $form = "";
-
- $subscribers.= "
-
-
diff --git a/contrib/web/php-moderation/README b/contrib/web/php-moderation/README
deleted file mode 100644
index acc63664..00000000
--- a/contrib/web/php-moderation/README
+++ /dev/null
@@ -1,52 +0,0 @@
-MLMMJ PHP Moderation Web Interface by Thomas Goirand
-
-
-* dependencies *
-
-This app needs:
-- php with gettext() support (for translations). Nearly all (if not all)
-Unix distributions have php with gettext support.
-- The Mail_mime PEAR package (php-mail-mime in Debian)
-
-
-* setup *
-
-- Run "./build-translations.sh" to generate the gettext binaries out of the
-sources
-- Edit the 5 variables on top of mlmmj-moderation.php to set the
-moderation folder, list name, domain, delimiter and the address used to
-send the moderation validation messages. You will need gettext installed
-on your system...
-- Eventually rename mlmmj-moderation.php and edit mlmmj.css to your taste
-- Edit and rename the dot.htaccess files to .htaccess to protect the
-moderation folder from others
-- make it so this app have read/write access to the moderation folder.
-Write access is needed because the app does some unlink() calls to
-delete the messages.
-- If using debian, you might need to dpkg-reconfigure locales and add
-fr_FR.UTF-8, if you want to see my French translation (there might be
-some other distributions needing the same kind of thing, I don't know...).
-
-
-* known issues *
-
-- Because this web app is sending an email to validate messages to be
-moderated, once you have hit "validate", validated messages will still
-(most of the times) show in the interface, as the folder is (most of the
-times) read before MLMMJ has time to send the moderated messages and
-remove them from the moderation folder.
-
-A workaround would be to NOT display messages that are moderated on the
-URL bar, but it's not a good way to go, as if the server is very busy,
-the next refresh of the page (the one after the validation) can still
-show some messages already validated. We see here that the method to
-send emails doesn't seem to be very good... Would it be possible for me
-to rename the moderated messages???
-
-- Because it's the first version, I have not yet used POST, but some GET
-in order to see things on the URL bar. So, of course, we are here
-hitting the limitation of the URL size (if there are really a lot of
-messages to moderate). This can be changed later simply by adding
-method="POST" in the form, as I use $_REQUEST (and not the stupid $_POST
-/ $_GET that everybody uses...). I might do this on the next version,
-but for now, it's more easy for debug purposes to keep it this way.
diff --git a/contrib/web/php-moderation/build-translations.sh b/contrib/web/php-moderation/build-translations.sh
deleted file mode 100755
index 8a4c11a7..00000000
--- a/contrib/web/php-moderation/build-translations.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-#
-# Build script for generating the MLMMJ moderation web interface locales
-#
-
-set -e
-
-LOCALE_TRANS=fr_FR
-WEB_SCRIPT_FILES=mlmmj-moderation.php
-
-if [ ! -d translations ]; then
- echo "Wrong working directory." >&2
- exit 1
-fi
-
-echo "===> Managing internationalizations and localizations"
-
-echo "=> Extracting strings from sources"
-xgettext $WEB_SCRIPT_FILES -o translations/templates.pot
-
-echo "=> Merging in every language .po file:"
-for i in $LOCALE_TRANS; do
- echo -n "$i "
- msgmerge -s -U "translations/$i.po" translations/templates.pot
-done
-
-echo "=> Creating l10n folders"
-for i in $LOCALE_TRANS; do
- mkdir -p "translations/locale/$i/LC_MESSAGES"
-done
-
-echo "=> Creating binary formats of language files:"
-for i in $LOCALE_TRANS; do
- echo -n $i" "
- msgfmt -c -v -o "translations/locale/$i/LC_MESSAGES/messages.mo" \
- "translations/$i.po"
-done
diff --git a/contrib/web/php-moderation/dot.htaccess b/contrib/web/php-moderation/dot.htaccess
deleted file mode 100644
index 6e40ec87..00000000
--- a/contrib/web/php-moderation/dot.htaccess
+++ /dev/null
@@ -1,4 +0,0 @@
-Require valid-user
-AuthType Basic
-AuthName "mlmmj web-interface"
-AuthUserFile /home/mlmmj/htpasswd
diff --git a/contrib/web/php-moderation/mlmmj-moderation.php b/contrib/web/php-moderation/mlmmj-moderation.php
deleted file mode 100644
index 95b7ae21..00000000
--- a/contrib/web/php-moderation/mlmmj-moderation.php
+++ /dev/null
@@ -1,291 +0,0 @@
-
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-// These are the configuration variables for your list
-$mod_dir = "/some/path/to/your/listname/moderation";
-$list_name = "listname";
-$list_domain = "example.com";
-$delimiter = "+";
-$from_addr = "user@example.com";
-
-// Manage accepted language and cookies
-$txt_default_lang = "en";
-session_register("lang");
-if(isset($_SESSION["lang"]) && !is_string($_SESSION["lang"])){
- unset($lang);
-}
-if(isset($_SESSION["lang"])){
- $lang = $_SESSION["lang"];
-}
-
-// TODO: Add some web stuffs to change the language manually on the web interface...
-// ...HERE...
-//
-
-// $lang = "fr_FR";
-
-// The following code keeps the lang in sessions, so it can be changed manually above with lang=XX
-// and if there's nothing in session yet, then it will parse the language set in the browser
-if(isset($lang)){
- $_SESSION["lang"] = $lang;
-}
-if (!isset($lang)){
- if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) && $_SERVER["HTTP_ACCEPT_LANGUAGE"]) {
- $all_languages = strtok($_SERVER["HTTP_ACCEPT_LANGUAGE"],";");
- $langaccept = explode(",", $all_languages);
- for ($i = 0; $i < sizeof($langaccept); $i++) {
- $tmplang = trim($langaccept[$i]);
- $tmplang2 = substr($tmplang,0,2);
- if (!isset($lang) && isset($txt_langname[$tmplang]) && $txt_langname[$tmplang]) {
- $lang = $tmplang;
- }elseif (!isset($lang) && isset($txt_langname[$tmplang2])) {
- $lang = $tmplang2;
- }
- }
- }
- if (!isset($lang)) {
- $lang = $txt_default_lang;
- }
- $_SESSION["lang"] = $lang;
-}
-header("Content-type: text/html; charset=UTF-8");
-switch($lang){
-case "fr_FR":
-case "fr":
- $gettext_lang = "fr_FR.UTF-8";
- break;
-default:
- $gettext_lang = "en_US.UTF-8";
- break;
-}
-if(FALSE === putenv("LC_ALL=$gettext_lang")){
- echo "Failed to putenv LC_ALL=$gettext_lang ";
-}
-if(FALSE === putenv("LANG=$gettext_lang")){
- echo "Failed to putenv LANG=$gettext_lang ";
-}
-if(FALSE === setlocale(LC_ALL, $gettext_lang)){
- echo "Failed to setlocale(LC_ALL,$gettext_lang) ";
-}
-$pathname = bindtextdomain("messages", dirname(__FILE__) ."/translations/locale");
-$message_domain = textdomain("messages");
-
-// This comes from the Mail_Mime PEAR package, under Debian, you need
-// the php-mail-mime package to have this script work.
-require_once 'Mail/mimeDecode.php';
-
-// Email header parsing
-function decodeEmail($input){
- $params['include_bodies'] = true;
- $params['decode_bodies'] = true;
- $params['decode_headers'] = true;
-
- $decoder = new Mail_mimeDecode($input);
- $structure = $decoder->decode($params);
- return $structure;
-}
-
-// Reading of all the messages from the moderation folder
-function getMessageList(){
- global $mod_dir;
- $all_msg = array();
- // Read all files from the directory.
- if (is_dir($mod_dir)) {
- if ($dh = opendir($mod_dir)) {
- while (($file = readdir($dh)) !== false) {
- if( !ereg("^([0-9a-f]+)\$",$file) ) continue;
- $full_path = $mod_dir . "/" . $file;
- if(filetype($full_path) == "file"){
- if(FALSE === ($input = file_get_contents($full_path))){
- echo ""._("Warning: could not read")." $full_path ";
- }else{
- $struct = decodeEmail($input);
- $my_msg = array();
- $my_msg["headers"] = $struct->headers;
- $my_msg["body"] = $struct->body;
- $my_msg["filename"] = $file;
- $all_msg[] = $my_msg;
- }
- }
- }
- closedir($dh);
- }
- }
- return $all_msg;
-}
-
-// Printing of the list of messages to be displayed (the big table)
-function printAllMessages($all_msg){
- $n = sizeof($all_msg);
- $out = "
-
-
-
-
-
diff --git a/contrib/web/php-user/mlmmj.php b/contrib/web/php-user/mlmmj.php
deleted file mode 100644
index 0e625b38..00000000
--- a/contrib/web/php-user/mlmmj.php
+++ /dev/null
@@ -1,138 +0,0 @@
-
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-
-// error_reporting(E_ALL);
-
-class mlmmj
-{
- var $email;
- var $mailinglist;
- var $job;
- var $redirect_success;
- var $redirect_failure;
-
- var $delimiter;
- var $errors;
-
- function is_email($string="")
- {
- if (eregi("^[a-z0-9\._-]+".chr(64)."+[a-z0-9\._-]+\.+[a-z]{2,4}$", $string))
- {
- return TRUE;
- }
- else
- {
- return FALSE;
- }
- }
-
- function error($string="")
- {
- $this->errors = TRUE;
-// die($string);
- }
-
- function mlmmj()
- {
- // set mandatory vars...
- $this->errors = FALSE;
- $this->delimiter = "+";
-
- if (!isset($_POST["email"]) &&
- !isset($_POST["mailinglist"]) &&
- !isset($_POST["job"]) &&
- !isset($_POST["redirect_success"]) &&
- !isset($_POST["redirect_failure"]))
- {
- $this->errors = TRUE;
- if(isset($_POST["redirect_failure"]))
- {
- header("Location: ".$_POST["redirect_failure"]);
- exit;
- }
- else
- die("An error occurred. Please check contrib/web/php-user/README for details.");
- }
- else
- {
- if($this->is_email($_POST["email"]))
- $this->email = $_POST["email"];
- else
- $this->error("ERROR: email is not a valid email address.");
-
- if($this->is_email($_POST["mailinglist"]))
- $this->mailinglist = $_POST["mailinglist"];
- else
- $this->error("ERROR: mailinglist is not a valid email address.");
-
- $this->job = $_POST["job"];
-
- if(!(($this->job == "subscribe") OR ($this->job == "unsubscribe")))
- {
- $this->error("ERROR: job unknown.");
- }
-
- $this->redirect_failure = $_POST["redirect_failure"];
- $this->redirect_success = $_POST["redirect_success"];
-
- }
-
- // now we should try to go ahead and {sub,unsub}scribe... ;)
-
- if(!$this->errors)
- {
- // @ ^= char(64)
-
- $to = str_replace(chr(64),$this->delimiter.$this->job.chr(64),$this->mailinglist);
- $subject = $this->job." to ".$this->mailinglist;
- $body = $this->job;
- $addheader = "";
- $addheader .= "Received: from ". $_SERVER["REMOTE_ADDR"]
- ." by ". $_SERVER["SERVER_NAME"]. " with HTTP;\r\n\t".date("r")."\n";
- $addheader .= "X-Originating-IP: ".$_SERVER["REMOTE_ADDR"]."\n";
- $addheader .= "X-Mailer: mlmmj-webinterface powered by PHP/". phpversion() ."\n";
- $addheader .= "From: ".$this->email."\n";
- $addheader .= "Cc: ".$this->email."\n";
-
- if(!mail($to, $subject, $body, $addheader))
- $this->error($this->job." failed.");
- }
-
- if($this->errors)
- {
- header("Location: ".$this->redirect_failure);
- exit;
- }
- else
- {
- header("Location: ".$this->redirect_success);
- exit;
- }
- }
-}
-
-
-$mailinglist = new mlmmj;
-
-?>