How to disable subscribe by mail in mailman3?
Hello,
I've setup a mailman3 for an organization. Organization members are authenticated by an LDAP backend and can thus use the web UI to subscribe.
To avoid unnecessary moderation, I'd like to disable subscription by mail but still allow subscription through the web interface.
(I've already hacked some code to dissallow subscribe by mail through posteros.)
Regards, Thomas
On 2/28/21 1:43 PM, Thomas Koch wrote:
To avoid unnecessary moderation, I'd like to disable subscription by mail but still allow subscription through the web interface.
(I've already hacked some code to dissallow subscribe by mail through posteros.)
You could just remove mailman/commands/eml-membership.py, This would also disable unsubscribe by email. If you didn't want to do that, you could remove the Join and Subscribe classes and leave the Leave and Unsubscribe classes.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thank you Mark!
The file on my Debian system is /usr/lib/python3/dist-packages/mailman/commands/eml_membership.py
(You made a typo with a dash instead of an underline, in case anybody else wonders.)
I used dpkg-divert to move the file away and changed class Join as follows:
@public @implementer(IEmailCommand) class Join: """The email 'join' command."""
name = 'join'
# XXX 2012-02-29 BAW: DeliveryMode.summary is not yet supported.
argument_description = '[digest=<no|mime|plain>]'
description = _("""\
Subscribe by email is disabled in this instance of mailman. """) short_description = _('Join this mailing list. (disabled)')
def process(self, mlist, msg, msgdata, arguments, results):
"""See `IEmailCommand`."""
print('Subscribe by email is disabled.')
return ContinueProcessing.no
participants (2)
-
Mark Sapiro
-
Thomas Koch