[Mailman-Users] Disable any notifications after user subscibes via LISTNAME-join at DOMAIN?

Mark Sapiro mark at msapiro.net
Fri Mar 27 18:47:11 CET 2015

On 03/27/2015 03:22 AM, Danijel Domazet wrote:

(Please keep threads on the list unless there is some privacy reason not
> One more question related to the same issue.
> Here is the code I added to avoid auto reply:
> field = msg.get('to', '')
>         if 'mylist-join' in field:
>             self.respond = False
> I would like to check 'bcc' field instead of 'to', like so:
> field = msg.get('bcc', '')
> But that seems not to work.

Because Bcc: by definition does not appear in the headers of delivered mail.

The problem is you are testing the wrong thing. Instead of looking at
message headers, you should be looking for 'tojoin' in the msgdata which
is set when the mail is initially received be Mailman.

Instead of what you've done, I would do

--- Mailman/Queue/CommandRunner.py	2015-03-01 16:35:02 +0000
+++ Mailman/Queue/CommandRunner.py	2015-03-27 17:42:10 +0000
@@ -276,6 +276,8 @@
                 ret = res.process()
             elif msgdata.get('tojoin'):
                 ret = res.do_command('join')
+                # Don't send response to -join/-subscribe mail
+                res.respond = False.
             elif msgdata.get('toleave'):
                 ret = res.do_command('leave')
             elif msgdata.get('toconfirm'):

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list