changeset 612:ded3bd1059cd

Added 'nodigestsub' tunable which will disable subscription to the digest version of a list (Henne Vogelsang)
author mortenp
date Mon, 11 Dec 2006 01:06:39 +1100
parents fec8a327ead7
children afe6a816f5d9
files ChangeLog TUNABLES listtexts/cz/sub-deny-digest listtexts/da/sub-deny-digest listtexts/de/sub-deny-digest listtexts/es/sub-deny-digest listtexts/fr/sub-deny-digest listtexts/it/sub-deny-digest listtexts/sub-deny-digest src/listcontrol.c
diffstat 10 files changed, 79 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Dec 07 20:50:54 2006 +1100
+++ b/ChangeLog	Mon Dec 11 01:06:39 2006 +1100
@@ -1,3 +1,5 @@
+ o Added 'nodigestsub' tunable which will disable subscription to the
+   digest version of a list (Henne Vogelsang)
  o Added list FAQ feature (Henne Vogelsang)
  o Added support for default list text directory (Henne Vogelsang)
  o Fixed a Bourne Shell issue in mlmmj-make-ml.sh (Magnus Naeslund)
--- a/TUNABLES	Thu Dec 07 20:50:54 2006 +1100
+++ b/TUNABLES	Mon Dec 11 01:06:39 2006 +1100
@@ -171,3 +171,9 @@
 
    If this file exists, digest mails won't have a text part with a thread
    summary.
+
+ · nodigestsub			(boolean)
+
+   If this file exists, subscription to the digest version of the mailinglist
+   will be denied. (Usefull if you dont want to allow digests and notify users
+   about it).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/cz/sub-deny-digest	Mon Dec 11 01:06:39 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the digest of $listaddr$
+
+Your request to subscribe to the digest of the mailinglist
+
+$listaddr$
+
+has been denied. Digests are turned off for this
+mailinglist.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/da/sub-deny-digest	Mon Dec 11 01:06:39 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the digest of $listaddr$
+
+Your request to subscribe to the digest of the mailinglist
+
+$listaddr$
+
+has been denied. Digests are turned off for this
+mailinglist.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/de/sub-deny-digest	Mon Dec 11 01:06:39 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the digest of $listaddr$
+
+Your request to subscribe to the digest of the mailinglist
+
+$listaddr$
+
+has been denied. Digests are turned off for this
+mailinglist.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/es/sub-deny-digest	Mon Dec 11 01:06:39 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the digest of $listaddr$
+
+Your request to subscribe to the digest of the mailinglist
+
+$listaddr$
+
+has been denied. Digests are turned off for this
+mailinglist.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/fr/sub-deny-digest	Mon Dec 11 01:06:39 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the digest of $listaddr$
+
+Your request to subscribe to the digest of the mailinglist
+
+$listaddr$
+
+has been denied. Digests are turned off for this
+mailinglist.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/it/sub-deny-digest	Mon Dec 11 01:06:39 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the digest of $listaddr$
+
+Your request to subscribe to the digest of the mailinglist
+
+$listaddr$
+
+has been denied. Digests are turned off for this
+mailinglist.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/sub-deny-digest	Mon Dec 11 01:06:39 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the digest of $listaddr$
+
+Your request to subscribe to the digest of the mailinglist
+
+$listaddr$
+
+has been denied. Digests are turned off for this
+mailinglist.
+
--- a/src/listcontrol.c	Thu Dec 07 20:50:54 2006 +1100
+++ b/src/listcontrol.c	Mon Dec 11 01:06:39 2006 +1100
@@ -206,6 +206,14 @@
 				" Ignoring mail");
 			return -1;
 		}
+		if (statctrl(listdir, "nodigestsub")) {
+			errno = 0;
+			log_error(LOG_ARGS, "A subcribe-digest request was"
+				" denied");
+			send_help(listdir, fromemails->emaillist[0],
+				mlmmjsend, "nodigest", "sub-deny-digest");
+			return -1;
+		}
 		log_oper(listdir, OPLOGFNAME, "mlmmj-sub: request for digest"
 					" subscription from %s",
 					fromemails->emaillist[0]);