changeset 616:62743c7b96c0

Added 'nonomailsub' tunable which will disable nomail subscriptions to a list (Henne Vogelsang)
author mortenp
date Mon, 11 Dec 2006 02:00:48 +1100
parents 5afd6d03faf1
children e64cb0b45bae
files ChangeLog TUNABLES listtexts/cz/sub-deny-nomail listtexts/da/sub-deny-nomail listtexts/de/sub-deny-nomail listtexts/es/sub-deny-nomail listtexts/fr/sub-deny-nomail listtexts/it/sub-deny-nomail listtexts/sub-deny-nomail src/listcontrol.c
diffstat 10 files changed, 79 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Dec 11 01:55:46 2006 +1100
+++ b/ChangeLog	Mon Dec 11 02:00:48 2006 +1100
@@ -1,3 +1,5 @@
+ o Added 'nonomailsub' tunable which will disable nomail subscriptions
+   to a list (Henne Vogelsang)
  o Added 'nodigestsub' tunable which will disable subscription to the
    digest version of a list (Henne Vogelsang)
  o Added list FAQ feature (Henne Vogelsang)
--- a/TUNABLES	Mon Dec 11 01:55:46 2006 +1100
+++ b/TUNABLES	Mon Dec 11 02:00:48 2006 +1100
@@ -177,3 +177,9 @@
    If this file exists, 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).
+
+ · nonomailsub			(boolean)
+
+   If this file exists, 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).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/cz/sub-deny-nomail	Mon Dec 11 02:00:48 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the nomail version of $listaddr$
+
+Your request to subscribe to the nomail version of the mailinglist
+
+$listaddr$
+
+has been denied. The nomail version is turned off for this
+mailinglist.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/da/sub-deny-nomail	Mon Dec 11 02:00:48 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the nomail version of $listaddr$
+
+Your request to subscribe to the nomail version of the mailinglist
+
+$listaddr$
+
+has been denied. The nomail version is turned off for this
+mailinglist.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/de/sub-deny-nomail	Mon Dec 11 02:00:48 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the nomail version of $listaddr$
+
+Your request to subscribe to the nomail version of the mailinglist
+
+$listaddr$
+
+has been denied. The nomail version is turned off for this
+mailinglist.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/es/sub-deny-nomail	Mon Dec 11 02:00:48 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the nomail version of $listaddr$
+
+Your request to subscribe to the nomail version of the mailinglist
+
+$listaddr$
+
+has been denied. The nomail version is turned off for this
+mailinglist.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/fr/sub-deny-nomail	Mon Dec 11 02:00:48 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the nomail version of $listaddr$
+
+Your request to subscribe to the nomail version of the mailinglist
+
+$listaddr$
+
+has been denied. The nomail version is turned off for this
+mailinglist.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/it/sub-deny-nomail	Mon Dec 11 02:00:48 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the nomail version of $listaddr$
+
+Your request to subscribe to the nomail version of the mailinglist
+
+$listaddr$
+
+has been denied. The nomail version is turned off for this
+mailinglist.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listtexts/sub-deny-nomail	Mon Dec 11 02:00:48 2006 +1100
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the nomail version of $listaddr$
+
+Your request to subscribe to the nomail version of the mailinglist
+
+$listaddr$
+
+has been denied. The nomail version is turned off for this
+mailinglist.
+
--- a/src/listcontrol.c	Mon Dec 11 01:55:46 2006 +1100
+++ b/src/listcontrol.c	Mon Dec 11 02:00:48 2006 +1100
@@ -243,6 +243,14 @@
 				" Ignoring mail");
 			return -1;
 		}
+		if (statctrl(listdir, "nonomailsub")) {
+			errno = 0;
+			log_error(LOG_ARGS, "A subcribe-nomail request was"
+				" denied");
+			send_help(listdir, fromemails->emaillist[0],
+				mlmmjsend, "nonomail", "sub-deny-nomail");
+			return -1;
+		}
 		log_oper(listdir, OPLOGFNAME, "mlmmj-sub: request for nomail"
 					" subscription from %s",
 					fromemails->emaillist[0]);