[Mailman-Users] Senders' email addresses not in archives

Mark Sapiro mark at msapiro.net
Tue Jul 22 07:12:38 CEST 2014


On 07/21/2014 09:14 PM, Stephen J. Turnbull wrote:
> Conrad G T Yoder writes:
> 
>  > [Using 2.1.17]
>  > 
>  > Is there a way to have their email addresses get into the archives
>  > and still have the Mung From option turned on?
> 
> It looks to me (version 2.1.18, though) like the from corruption is
> performed in the CookHeaders Handler.  Perhaps you can move the
> ToArchive Handler ahead of CookHeaders in the global pipeline (or list
> by list if you prefer).  If I were you I'd wait for confirmation from
> Mark that that's safe, though. :-)  It *should* be safe (since
> subscriber delivery takes place after ToArchive, ToArchive must be
> working on copies of the message and metadata or it would mess delivery
> up), but I haven't audited the code.


In 2.1.16 and 2.1.16, the message gets Munged in CookHeaders as Stephen
suggests. Thus it's the Munged message that gets archived and included
in digests and gated to Usenet.

Beginning in 2.1.18, CookHeaders still determines what to do with
headers like From: and Reply-To:, but they aren't actually changed
there. Essentially, CookHeaders tells WrapMessage what to do and
WrapMessage does it.


> To do this, GLOBAL_PIPELINE is a Python list, in Defaults.py.  Copy
> the whole line to mm_cfg.py, and edit it to move the ToArchive (and
> its trailing comma) ahead of CookHeaders.  The usual caveat about
> "don't ever edit Defaults.py" applies here.


That would work and is safe, but instead, I would move CookHeaders to a
place just after ToUsenet.

This can be done as Steve suggests by Copying the whole GLOBAL_PIPELINE
list to mm_cfg.py and editing it there, but this leads to problems if
GLOBAL_PIPELINE is changed in a subsequent release. A better way is to
put something like

GLOBAL_PIPELINE.remove('CookHeaders')
GLOBAL_PIPELINE.insert(GLOBAL_PIPELINE.index('AfterDelivery'),
'CookHeaders')

in mm_cfg.py. The first line removes CookHeaders from GLOBAL_PIPELINE.
The second line[1] inserts CookHeaders in GLOBAL_PIPELINE ahead of
AfterDelivery which is just after ToUsenet.

This way if GLOBAL_PIPELINE is changed in a subsequent release, the
changes in Defaults.py will be effective because mm_cfg.py is not
overriding the whole thing but just moving something.

[1] The second line is probably wrapped here, but it doesn't mater if it
is or not as Python ignores line breaks inside parens. I.e.,

(xxx\nyyy)

is the same as

(xxxyyy)

-- 
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