per-list email at munging?
I just set up some mailman lists for commit archives. I'd like to avoid the "@" -> " at " munging for them (at least in the bodies, though also in the headers is fine/expected), while retaining that minimal munging for the other lists on the server.
Looking at HyperArch.py (and Defaults.py), it seems ARCHIVER_OBSCURES_EMAILADDRS is server-wide. Any viable way to make it per-list? I couldn't find anything in web searches or at http://fog.ccsf.cc.ca.us/~msapiro/scripts/ but always easy to miss stuff.
It's not so much that I myself think the " at " munging is so wonderfully effective at antispam, but I feel sure that if I turn it off now, my users will complain vociferously and constantly. Such is life.
Thanks, Karl
P.S. It seems the original author (Richard Barrett) offered to make it per-list back in 2003 but no one asked for it :). https://sourceforge.net/p/mailman/patches/273/
On 05/24/2016 02:47 PM, Karl Berry wrote:
Looking at HyperArch.py (and Defaults.py), it seems ARCHIVER_OBSCURES_EMAILADDRS is server-wide. Any viable way to make it per-list? I couldn't find anything in web searches or at http://fog.ccsf.cc.ca.us/~msapiro/scripts/ but always easy to miss stuff.
That depends what you mean by viable. There is no existing list configuration that will do it directly.
Of course it can be done. Doing it right is not difficult, but is somewhat involved because there are a lot of pieces involved. The complete job includes:
modifying Mailman/versions.py to add the attribute with a default value for lists whose data_version is < mm_cfg.DATA_FILE_VERSION.
modifying Mailman/Version.py to increase DATA_FILE_VERSION ideally by 0.1 because a new release will always increment when necessary by a whole number.
modifying Mailman/MailList.py to add the attribute with a default value to new lists.
modifying Mailman/Defaults.py.in and maybe Mailman/Defaults.py to provide a setting for the default value.
modifying Mailman/Cgi/admin.py to display and update the attribute in the admin GUI, and of course
modifying Mailman/Archiver/HyperArch.py to test the list attribute rather than mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS.
Pieces of that can be skipped such as hard coding a default instead of making it a Defaults.py/mm_cfg.py setting.
There are other ways that are less involved. For example, one could just modify Mailman/Archiver/HyperArch.py, and everywhere it has
if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS:
replace that with something like
if (mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS and
not hasattr(xxxx, 'skip_obscure')):
where xxxx is self._mlist for the 4 occurrences in the Article class and self.maillist for the 2 occurrences in the HyperArchive class.
Then lists that don't have a skip_obscure attribute will be processed according to ARCHIVER_OBSCURES_EMAILADDRS and those that have it will not have addresses obscured. Then for those lists that you want to skip obfuscation, create a lists/LISTNAME/extend.py file with content
def extend(mlist): mlist.skip_obscure = True
to set the attribute for those lists.
P.S. It seems the original author (Richard Barrett) offered to make it per-list back in 2003 but no one asked for it :). https://sourceforge.net/p/mailman/patches/273/
Actually, that patch, also in the current tracker at <https://bugs.launchpad.net/mailman/+bug/558097>, is not the implementation of ARCHIVER_OBSCURES_EMAILADDRS but rather a modification of same to do a more aggressive obfuscation of email addresses in the archive than the '@' -> ' at ' that is currently done.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Karl Berry
-
Mark Sapiro