[Mailman-Users] mailing list address

Mark Sapiro mark at msapiro.net
Thu Sep 5 06:59:39 CEST 2013

On 09/03/2013 07:33 AM, Drew Tenenholz wrote:
> For example, they kind of really want the same FROM: for a group of
> four lists.  At the same time, they want the digest subscribers for
> those four lists to see the FROM as "common_name-digest at domain.tld".

So for 'message' subscribers the From: should be rewritten from the
poster to the common name?

> I've looked into the CookHeaders.py file, and that is certainly the
> place to make any changes BUT there I'm pretty certain that making
> the changes we're talking about will have downstream effects on:

I would use a custom handler rather than CookHeaders, but neither will
take care of the digests. Digests would require mods to
Mailman.Handlers.ToDigest.send_i18n_digests(). The mods could be simple
where mlist.GetRequestEmail() in

    mimemsg['From'] = mlist.GetRequestEmail()
    rfc1153msg['From'] = mlist.GetRequestEmail()

is replaced by get_munged_from(mlist) where get_munged_from is something
imported from your custom handler, both in the interest of making the
change to ToDigest.py as small as possible and DRY.

> 1) automated processing of subscription requests sent via email

They wouldn't be affected as they aren't processed through the handler

> 2) automated processing of bounces

The handler could set the 'envsender' attribute in the message metadata
to the original LISTNAME-bounces address, but this isn't necessary
because the default comes from a list method and isn't affected by headers.

> 3) processing of posts  (my lists are announce-only, so less
imperative to me)

I don't see this as an issue as long as the From: munging Handler comes
after Moderate (and maybe Hold for admindb From: display) in the pipeline.

> 4) the upgrade process, which would wipe out the changes and would need
to be
> re-implemented after upgrades (which means reading the new file and
> the changes, not a simple re-insertion of the modified code).

A custom Handler doesn't have this issue.

> Also, CookHeaders.py is a file used by ALL lists in a given
> installation and I don't think there is any list-by-list way to make
> changes.

Custom handlers can be enabled on a list by list basis.

See the FAQ at <http://wiki.list.org/x/l4A9> on custom handlers.

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