Subject: Re: DKIM, mailing lists, and bounces

From: Barry Leiba <[email-masked]>
Date: Wed, 5 May 2010 00:43:18 -0400

Hi, Adam.

> 1. A mailing list subscriber sends an email to [email-masked]. This message
> contains a DKIM signature.
>
> 2. The mailman instance at ietf.org modifies the subject line (e.g., by
> inserting "[sipcore]" or changing "Re:" to "RE:"), and by appending a
> working-group specific footer. These changes invalidate the DKIM signature.
>
> 3. Upon receipt, several of the mailing list subscribers' MTAs reject the
> message, since the DKIM signature does not match.
>
> 4. After enough of these bounces, mailman unsubscribes the users whose MTAs
> check DKIM signatures.
...
> Some of the recipients might be able to change their handling, but some
> cannot. For example, Rockwell corporate IT has been asked, and refused, to
> deactivate DKIM signature verification for messages originating from
> ietf.org. So, #3 really can't be fixed. This would be a hackish work-around
> anyway.

No, it wouldn't be hackish; it SHOULD be changed.  Rockwell, and any
others that reject a message PURELY BECAUSE THE DKIM SIGNATURE DID NOT
VERIFY are violating the recommendations in the DKIM spec.

RFC 4871 section 1:
  o  signature verification failure does not force rejection of the
     message;

Section 6.1:
  A verifier SHOULD NOT treat a message that has one or more bad
  signatures and no good signatures differently from a message with no
  signature at all;

Section 6.3:
  In general, verifiers SHOULD NOT reject messages solely on the basis
  of a lack of signature or an unverifiable signature; such rejection
  would cause severe interoperability problems.

Rockwell, and others, can clearly do as they please, but THEY are
causing this problem with the choice they have made, just as the DKIM
spec warns.

> So that leaves #2. Of course, it makes perfect sense that the mailman
> software should be changing the Subject line. Perhaps not the "RE:"/"Re:"
> thing, but people pretty much expect insertion of the mailing list name in
> the subject.

Well, I personally think it's unfortunate that that has become
standard procedure.  That happened because of spotty implementation of
the List-* header fields, and because MUAs often allow filtering based
on Subject, but not based on List-ID.  We should be using List-ID, and
not altering the subject, in a proper world.

But that horse is long out of the barn, and mailing lists will not be
changing that behaviour any time soon.

> So what's the right answer here? Should the IETF server be
> stripping the DKIM signature? Is there some allowance in DKIM for mailman to
> do something like say "the original sender said this, but I changed it to
> this"? Can we replace the original signature with one generated by ietf.org?

The DKIM working group is debating exactly this very thing, and is
preparing to develop a mailing-lists BCP with its recommendations.  It
would be premature for us to answer most of these questions now,
though, before the WG has consensus on the answers.

The one we CAN answer, though, is the last one:
The ietf.org servers SHOULD be ADDING their own signatures to
messages.  (Whether or not they should REMOVE the one(s) that they're
breaking is still being debated in the DKIM WG.)  Recipient domains
SHOULD then see a good signature from ietf.org, and not reject the
messages.

Badly behaved recipient domains STILL might see that the new signature
doesn't match the "From:" in the message, and, despite that it's in
violation of the DKIM spec, continue to reject it anyway.  But at
least then there's a reasonable alternative to offer them.

Barry Leiba, DKIM working group chair