[Mailman-Users] How to get the senders email address in the custom footer?

Mark Sapiro mark at msapiro.net
Mon Sep 21 04:43:06 CEST 2015

On 09/20/2015 06:15 PM, Jayson Smith wrote:
> I admin a mailing list where I had to set it up to munge the From:
> header because of DMARC, and some Email clients--even though they should
> know better--were replying to the list even though replies were supposed
> to go to the sender. I've since taken advantage of the DMARC moderation
> feature, but we've been encouraging people to give their Email address
> somewhere in their message. If there were a footer variable with the
> sender's Email address, this wouldn't be necessary. Just my $0.02 worth.

With Mailman's DMARC mitigations, if the sender's address is removed
from the From: header, it is always in either Reply-To: or Cc:. Even if
a user's MUA doesn't correctly address a Reply, it seems to me that it's
just as easy to copy/paste the address from the Reply-To: or Cc: header
of the original post as it is to copy/paste it from somewhere else in
the message. What am I missing?

Also, in my experience, users tend not to look at how their reply is
addressed in the first place and don't even notice that it is addressed
say to the list rather than the poster.

I think the appropriate solution is for users to use compliant MUAs that
will honor Reply-To:, although I understand that that's a lot easier for
me to say than it is to get users to actually do it.

All that said, if you really want it, it's a one line patch to add a
'sender' replacement to msg_header and/or msg_footer (watch out for
wrapped lines).

=== modified file 'Mailman/Handlers/Decorate.py'
--- Mailman/Handlers/Decorate.py	2010-06-05 17:27:39 +0000
+++ Mailman/Handlers/Decorate.py	2015-09-21 02:34:19 +0000
@@ -42,7 +42,7 @@
     # Digests and Mailman-craft messages should not get additional headers
     if msgdata.get('isdigest') or msgdata.get('nodecorate'):
-    d = {}
+    d = {'sender': msg.get_sender()}
     if msgdata.get('personalize'):
         # Calculate the extra personalization dictionary.  Note that the
         # length of the recips list better be exactly 1.

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