[Mailman-Users] DMARC handler

Mark Sapiro mark at msapiro.net
Sun Jun 22 02:24:39 CEST 2014

On 06/21/2014 04:04 PM, Ron Guerin wrote:
> I'm struggling to find a palatable solution to the configuration of a
> list, and the new Yahoo-style DMARC problem.
> The list has mung on, as well as Reply-To: set to the list.  The end
> result is nowhere does the original sender's address appear in the
> messages, when having them readily visible is the desired behavior.

In Mailman 2.1.18-1, the posters address will also be in Reply-To: with
Reply-To: set to the list. In Mailman 2.1.16 and 2.1.17, this wasn't the
case (I think only if first_strip_reply_to was Yes).

> I was wondering about asking someone to make a Mailman handler that
> would re-write the From: address after munging to:
> 	Jane Doe (jane at example.com) via listname <list at example.net>
> My question now is, is there any reason why re-writing it this way would
> be a bad idea?

Yes. According to

The inclusion of more than one domain in the RFC5322.From field is
dangerous.  Recent studies by two major senders show that ~95% of all
cases in which there is one domain in the RFC5322.From "display name"
and different domain in the RFC5322.From "address-spec" are fraudulent.
 This practice should be discouraged as there are efforts underway to
increase "spam scores" within inbound filtering when this is detected.

But, on the other hand, that's exactly what Yahoo Groups is doing, so
take your pick.

If having the poster's address in Reply-To: would be satisfactory, try
setting first_strip_reply_to to No.

Changing CookHeaders to munge the from as you suggest is a very simple
patch. I have attached a 2.1.16/17 version. Note that even with this
patch, the bug at <https://bugs.launchpad.net/mailman/+bug/1304511> is
not completely fixed. Also note John's objection won't apply as this
will be formatted as

  "Jane Doe <jane at example.com> via listname" <list at example.net>

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan
-------------- next part --------------
--- 2.1.16CookHeaders.py	2014-06-21 17:09:21.713302870 -0700
+++ newCookHeaders.py	2014-06-21 17:13:04.553299051 -0700
@@ -129,7 +129,9 @@
             rt = msg['from']
         change_header('Reply-To', rt, mlist, msg, msgdata)
-                      formataddr(('%s via %s' % (realname, mlist.real_name),
+                      formataddr(('%s <%s> via %s' % (realname,
+                                                      email,
+                                                      mlist.real_name),
                       mlist, msg, msgdata)
         if mlist.from_is_list != 2:

More information about the Mailman-Users mailing list