[Mailman-Users] Small issue (hopefully) with upgrading/migrating from v2.1.9 to v2.1.18-1

Chris Nulk cnulk at scu.edu
Thu Jan 15 01:11:23 CET 2015


In a previous message, I mentioned my plans on upgrading/migrating a 
customized v2.1.9 installation to a customized v2.1.18-1 installation.  
I have analyzed the changes needed and made to the v2.1.18-1 installation.

I have run into a small problem.  One of the customizations I did was to 
added an additional attribute to the sender filters similar to the 
*_these_nonmembers fields.  On the v2.1.9 installation, my customization 
will accept individual email addresses, regex's, and lists.  On the 
v2.1.18-1 installation, it only accepts the individual email addresses.  
I took a closer look at the code (GUIBase.py in the Gui directory) and I 
believe the solution lies there.

The code on the v2.1.18-1 installation has some additional checks. 
Specifically, the following:
                     # See if this is a context that accepts regular
                     # expressions, and that the re is legal
                     if wtype == mm_cfg.EmailListEx and 
                         except re.error:
                     elif (wtype == mm_cfg.EmailListEx and 
                             and property.endswith('_these_nonmembers')):
                         # XXX Needs to be reviewed for list at domain names.
                         # don't reference your own list
                         if addr[1:] == mlist.internal_name():
                         # check for existence of list?  For now allow
                         # reference to list before creating it.

On v2.1.9, the code did not check for the 'and 

I think that addtional check is preventing my additional 
attribute/property from accepting lists in the field.

Before I go off and possibly muck my installation up, can I simply 
duplicate the 'elif' section with the property.endswith code and replace 
the '_these_nonmembers' with my attribute/property?

Or is a better solution to do something list:
                          elif (wtype == mm_cfg.EmailListEx and 
                             and (property.endswith('_these_nonmembers') 
or (property.endswith('my_attribute'))):
Would that work?

Or even more optimially, I am open to the correct solution to my issue.

Thanks for any assistance,

More information about the Mailman-Users mailing list