changeset 384:16b4215d0709

PHP updates from Christoph
author mmj
date Fri, 26 Nov 2004 03:03:18 +1100
parents 7de4e23f2e8e
children 7af8e020f294
files contrib/web/php-admin/README contrib/web/php-admin/conf/tunables.php contrib/web/php-admin/htdocs/edit.php contrib/web/php-admin/htdocs/index.php contrib/web/php-admin/htdocs/save.php
diffstat 5 files changed, 105 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/web/php-admin/README	Fri Nov 26 02:59:34 2004 +1100
+++ b/contrib/web/php-admin/README	Fri Nov 26 03:03:18 2004 +1100
@@ -14,6 +14,14 @@
 
      # chown -R wwwrun /var/spool/mlmmj/mlmmj-test/control/
 
+
+3) 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/
+
 To enable access control on Apache you have to:
 
 3) Rename dot.htaccess to .htaccess and edit the path inside the file to point
--- a/contrib/web/php-admin/conf/tunables.php	Fri Nov 26 02:59:34 2004 +1100
+++ b/contrib/web/php-admin/conf/tunables.php	Fri Nov 26 03:03:18 2004 +1100
@@ -2,11 +2,15 @@
 
 mlmmj_boolean("closedlist",
 			  "Closed list",
-			  "If this option is set, subscribtion and unsubscription via mail is disabled.");
+	      "Is the list is open or closed. If it's closed subscribtion ".
+	      "and unsubscription via mail is disabled. Also note that ".
+	      "confirmation is disabled too, so the -C option to mlmmj-sub ".
+	      "and mlmmj-unsub is of no use with a closed list.");
 
 mlmmj_boolean("moderated",
 			  "Moderated",
-			  "If this option is set, the emailaddresses in the file listdir/control/moderators will act as moderators for the list.");
+	      "If this option is set, the emailaddresses in the file listdir".
+	      "/control/moderators will act as moderators for the list.");
 
 mlmmj_list("moderators",
 		   "Moderators",
@@ -14,57 +18,101 @@
 
 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.");
+	      "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("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.");
+	      "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_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.");
+	     "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 ".htmlentities($list)."+owner");
+	   "The emailaddresses in this list will get mails to ".
+	   htmlentities($list)."+owner@listdomain.tld");
+
+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.");
 
 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.");
+	   "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.");
+	   "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.");
 
 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).");
+	     "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_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 above) first.");
 
 mlmmj_string("relayhost",
 			 "Relay host",
-			 "The host specified (IP address og domainname, both works) in this file will be used for relaying the mail sent to the list. ".
+	     "The host specified (IP address og domainname, both works) in ".
+	     "this file will be used for relaying the mail sent to the list. ".
 			 "Defaults to 127.0.0.1.");
 
 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.");
+	      "If this option is set, the owner(s) will get a mail with the ".
+	      "address of someone sub/unsubscribing to a mailinglist.");
+
+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",
-			  "Here is specified for how long time in seconds an address can bounce before it's unsubscribed. Defaults ".
-			  "to 432000 seconds, which is 5 days.");
+	     "Here is specified for how long time 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("nosubconfirm",
+	      "No confirmation on subscription",
+	      "If this option is set, no mail confirmation is needed to ".
+	      "subscribe to the list. This should in principle never ever be ".
+	      "used, but there is times on local lists etc. where this is ".
+	      "useful. HANDLE WITH CARE!");
 
 ?>
--- a/contrib/web/php-admin/htdocs/edit.php	Fri Nov 26 02:59:34 2004 +1100
+++ b/contrib/web/php-admin/htdocs/edit.php	Fri Nov 26 03:03:18 2004 +1100
@@ -97,6 +97,9 @@
 
 $list = $HTTP_GET_VARS["list"];
 
+if(!isset($list))
+die("no list specified");
+
 if(!is_dir($topdir."/".$list))
 die("non-existent list");
 
--- a/contrib/web/php-admin/htdocs/index.php	Fri Nov 26 02:59:34 2004 +1100
+++ b/contrib/web/php-admin/htdocs/index.php	Fri Nov 26 03:03:18 2004 +1100
@@ -39,7 +39,8 @@
 while ($file = readdir($dir)) {
     if (!ereg("^\.",$file))
     {
-	$lists .= "<a href=\"edit.php?list=".urlencode($file)."\">".htmlentities($file)."</a><br />\n";
+	$lists .= "<a href=\"edit.php?list=".urlencode($file)."\">".
+	    htmlentities($file)."</a><br />\n";
     }
 }
 closedir($dir); 
--- a/contrib/web/php-admin/htdocs/save.php	Fri Nov 26 02:59:34 2004 +1100
+++ b/contrib/web/php-admin/htdocs/save.php	Fri Nov 26 03:03:18 2004 +1100
@@ -72,6 +72,9 @@
 
 $list = $HTTP_POST_VARS["list"];
 
+if(!isset($list))
+die("no list specified");
+
 if(!is_dir($topdir."/".$list))
 die("non-existent list");