(*) when someone requests a subscription,
Mailman sends them a notice with a unique
@@ -82,13 +84,15 @@
# choices
(_('Confirm'),
_('Require approval'),
- _('Confirm and approve')),
+ _('Confirm and approve'),
+ _('Forbid')),
1,
_('What steps are required for subscription?
'),
_("""Confirm (*) - email confirmation required
Require approval - require list administrator
approval for subscriptions
- Confirm and approve - both confirm and approve
+ Confirm and approve - both confirm and approve
+ Forbid - reject all new subscription request
(*) when someone requests a subscription,
Mailman sends them a notice with a unique
=== modified file 'Mailman/HTMLFormatter.py'
--- Mailman/HTMLFormatter.py 2018-06-22 00:34:52 +0000
+++ Mailman/HTMLFormatter.py 2020-09-01 00:48:41 +0000
@@ -202,6 +202,10 @@
by the list moderator. You will be notified of the moderator's
decision by email.""")
also = _("also ")
+ elif self.subscribe_policy == 4:
+ msg += _("""This is a closed list which don't accept any new
+ subscription request.""")
+ also = _("also ")
if msg:
msg += ' '
if self.private_roster == 1:
=== modified file 'Mailman/MailList.py'
--- Mailman/MailList.py 2020-05-18 17:01:51 +0000
+++ Mailman/MailList.py 2020-09-01 00:48:41 +0000
@@ -946,6 +946,15 @@
# Trying to subscribe the list to itself!
raise Errors.MMBadEmailError
realname = self.real_name
+ # Does the list allow new subscription?
+ if self.subscribe_policy == 4:
+ if remote:
+ whence = ' from %s' % remote
+ else:
+ whence = ''
+ syslog('vette', '%s reject subscription: %s%s (by policy)',
+ realname, email, whence)
+ raise Errors.MembershipIsRejectedByPolicy
# Is the subscribing address banned from this list?
pattern = self.GetBannedPattern(email)
if pattern:
=== added file 'README-forbid-subscription'
--- README-forbid-subscription 1970-01-01 00:00:00 +0000
+++ README-forbid-subscription 2020-09-01 02:18:03 +0000
@@ -0,0 +1,53 @@
+This extends MailList.subscribe_policy with new value 4 ... 'forbid',
+rejecting all subscribe request via E-mail and via Web UI(except by
+list owners operation).
+
+With 'forbid' subscribe_policy,
+
+ * it hide subscription form on list's listinfo page
+ (by using new template listinfo_nosubscribe.html).
+ * it reject all subscription request from users via Web UI and via email.
+ * following operations are still allowed, inspite of ban_lists rule to
+ prevent any email address to subscribe doesn't allow them.
+ - changing email address of users already subscribing both
+ by users themselves operations and by list owners.
+ - adding new member via operations by list owner or site owner.
+
+On the other hand, the things to be worse,
+
+ * this breaks translations of some conpicious messages by modification.
+ * it also is needed to prepare new translated template for listinfo page
+ without subscription form, for all languages used by lists
+ (otherwise, fall back to English template if 'forbid' policy is choosed)
+ * new value for subscribe_policy 4 as 'forbid' may conflict with future
+ release of mailman 2.1 and already this value is incompatible with current
+ version. (to migrate list config data files from modified version
+ to upstream, make sure their subscribe_policy should be other than
+ 'forbid')
+
+[Technical detail]
+This introduce a new value 4 as 'Forbid' to MailList.subscribe_policy.
+Modification I made is below.
+
+* With MailList.subscribe_policy == 4,
+ + For Web UI
+ - reject all subscribe request
+ (Mailman/Cgi/subscribe.py, Mailman/HTMLFormatter.py)
+ - hide subscription form from listinfo page by switching template file
+ to listinfo_nosubscribe.html
+ (Mailman/Cgi/listinfo.py, templates/en/listinfo_nosubscribe.html(new))
+ + For request via E-mail, reject all subscribe command
+ (Mailman/Command/cmd_subscribe.py)
+ + Foolproof: MailList.AddMember() raise new exception
+ Errors.MembershipIsRejectedByPolicy() (if this happens, it is a bug...)
+ (Mailman/Errors.py, Mailman/MailList.py)
+
+* To set new value to MailList.subscribe_policy,
+ + For Web UI, add new radio button and description (Mailman/Gui/Privacy.py)
+
+* For new template
+ + Add menu new item for new template file (Mailman/Cgi/edithtml.py)
+
+* For description
+ + Add description for new value (Mailman/Defauilts.py.in, misc/sitelist.cfg)
+
=== modified file 'messages/ja/LC_MESSAGES/mailman.po'
--- messages/ja/LC_MESSAGES/mailman.po 2020-06-27 00:12:17 +0000
+++ messages/ja/LC_MESSAGES/mailman.po 2020-09-01 03:55:23 +0000
@@ -3,14 +3,15 @@
# SATOH Fumiyasu (*) when someone requests a subscription,\n"
" Mailman sends them a notice with a unique\n"
@@ -6478,10 +6502,11 @@
" from creating subscriptions for others without\n"
" their consent."
msgstr ""
-"無し - 確認手順無し ( お勧めしません ) (*) 誰かが入会申請を出すとMailman は入会申請番号を付けて返信します。\n"
" 申請者はその番号を使って返信しないと入会できません。 (*) when someone requests a subscription,\n"
" Mailman sends them a notice with a unique\n"
@@ -6503,9 +6530,10 @@
" mischievous (or malicious) people from creating\n"
" subscriptions for others without their consent."
msgstr ""
-"確認 (*) - メールによる本人の確認が必要 (*) 誰かが入会申請を出すと Mailman は入会申請番号を\n"
" 付けて返信します。申請者はその番号を使って返信しないと\n"
@@ -8023,7 +8052,13 @@
"会員による確認後、申請はリスト司会者の承認のため保留されます。\n"
"司会者の決定はメールでお知らせします。"
-#: Mailman/HTMLFormatter.py:208
+#: Mailman/HTMLFormatter.py:206
+msgid ""
+"This is a closed list which don't accept any new\n"
+" subscription request."
+msgstr "このリストは新規入会申請を一切受け付けない閉鎖リストです。"
+
+#: Mailman/HTMLFormatter.py:212
msgid ""
"This is %(also)sa private list, which means that the\n"
" list of members is not available to non-members."
=== modified file 'misc/sitelist.cfg'
--- misc/sitelist.cfg 2018-07-15 03:18:00 +0000
+++ misc/sitelist.cfg 2020-09-01 00:48:41 +0000
@@ -178,6 +178,7 @@
# 1 = "Confirm"
# 2 = "Require approval"
# 3 = "Confirm and approve"
+# 4 = "Forbid"
subscribe_policy = 2
# When members want to leave a list, they will make an unsubscription
=== added file 'templates/en/listinfo_nosubscribe.html'
--- templates/en/listinfo_nosubscribe.html 1970-01-01 00:00:00 +0000
+++ templates/en/listinfo_nosubscribe.html 2018-05-31 06:05:16 +0000
@@ -0,0 +1,76 @@
+
+
+
+
+
+ To see the collection of prior postings to the list,
+ visit the You can change your existing
+ subscription, in the sections below.
+
+
+
+ このメーリングリストに投稿された過去のメールは,
+ メーリングリストの現在の会員オプションの変更は,
+ 以下のフォームをご利用ください.
+
+
"
msgstr "入会にはどのような手順が必要ですか?
"
@@ -6466,7 +6488,9 @@
"
\n"
" Require approval - require list administrator\n"
" Approval for subscriptions
\n"
-" Confirm and approve - both confirm and approve\n"
+" Confirm and approve - both confirm and approve "
+"
\n"
+" Forbid - reject all new subscription request\n"
" \n"
"
\n"
-"確認 (*) - メールによる本人の確認が必要
\n"
-"承認 - リスト管理者の承認が必要
\n"
-"確認+承認 - 確認と承認の両方が必要\n"
+"無し - 確認手順無し ( お勧めしません )
\n"
+"確認 (*) - メールによる本人の確認が必要
\n"
+"承認 - リスト管理者の承認が必要
\n"
+"確認+承認 - 確認と承認の両方が必要
\n"
+"禁止 - 申請を受け付けません\n"
"\n"
"
\n"
@@ -6493,7 +6518,9 @@
"Confirm (*) - email confirmation required
\n"
" Require approval - require list administrator\n"
" approval for subscriptions
\n"
-" Confirm and approve - both confirm and approve\n"
+" Confirm and approve - both confirm and approve "
+"
\n"
+" Forbid - reject all new subscription request\n"
" \n"
"
\n"
-"承認 - リスト管理者の承認が必要
\n"
-"確認+承認 - 確認と承認の両方が必要\n"
+"確認 (*) - メールによる本人の確認が必要
\n"
+"承認 - リスト管理者の承認が必要
\n"
+"確認+承認 - 確認と承認の両方が必要
\n"
+"禁止 - 申請を受け付けません\n"
"\n"
"
+
+
+
+
+
+
+
+
+
+
+
+
+ About
+
+
+
+
+
+
+
+
+
+ Using
+
+
+
+ To post a message to all the list members, send email to
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ メーリングリストの全会員に送るメールは,
+
+
+
+
+
+
+
+
+
+
+