Re: [Ietf-dkim] Tolerating Mailing-List Modifications I-D

Alessandro Vesely <vesely@tana.it> Thu, 13 July 2023 08:29 UTC

Return-Path: <vesely@tana.it>
X-Original-To: ietf-dkim@ietfa.amsl.com
Delivered-To: ietf-dkim@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id ED9F4C151061 for <ietf-dkim@ietfa.amsl.com>; Thu, 13 Jul 2023 01:29:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.398
X-Spam-Level:
X-Spam-Status: No, score=-4.398 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=tana.it header.b="rp9N/bhj"; dkim=pass (1152-bit key) header.d=tana.it header.b="C0B1bWP7"
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GD4s-yJTYSVt for <ietf-dkim@ietfa.amsl.com>; Thu, 13 Jul 2023 01:29:19 -0700 (PDT)
Received: from wmail.tana.it (wmail.tana.it [94.198.96.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 23713C14CE47 for <ietf-dkim@ietf.org>; Thu, 13 Jul 2023 01:29:12 -0700 (PDT)
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=tana.it; s=epsilon; t=1689236951; bh=BJftlgE5DmG/Q8JBvPZBGBv14Iqq314dOw4/MwqH04U=; h=Author:Date:Subject:To:References:From:In-Reply-To; b=rp9N/bhjUGfwi/drax4Ai2M28VcV3oCTWsOShjd36c6X83y81T/ijM4Dct4ZQUDEl wMKLVRK+qwANu/wodMPDA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tana.it; s=delta; t=1689236951; bh=BJftlgE5DmG/Q8JBvPZBGBv14Iqq314dOw4/MwqH04U=; h=Date:Subject:To:References:From:In-Reply-To; b=C0B1bWP7Piv1khGH41+FD/fKUa+b8BH9oS27YKrkblzd+FZ8jVdoT+OQYI1Z+l/1Q T/gTtikyvyMN7edLguNH6WPgT/LqOw2Ifum+3tBqW5JYJ2f3N36Hq2BeoDmnsmCGCk 0h68ztQQOpO1YV3Um/O6rP1In1CoOJ3PQGJdLI+irPjcqUx6Rs9APPK1FqX/5
Original-Subject: Re: [Ietf-dkim] Tolerating Mailing-List Modifications I-D
Author: Alessandro Vesely <vesely@tana.it>
Received: from [172.25.197.111] (pcale.tana [172.25.197.111]) (AUTH: CRAM-MD5 uXDGrn@SYT0/k, TLS: TLS1.3, 128bits, ECDHE_RSA_AES_128_GCM_SHA256) by wmail.tana.it with ESMTPSA id 00000000005DC04A.0000000064AFB5D6.00007316; Thu, 13 Jul 2023 10:29:10 +0200
Message-ID: <e40a7d42-5c2a-6a4d-a070-fa0bd11d3572@tana.it>
Date: Thu, 13 Jul 2023 10:29:10 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0
Content-Language: en-US, it-IT
To: ietf-dkim@ietf.org
References: <CAAFsWK20SojKgKjQB2MEuPh42ac5ta5bOhnHL8xPsidAigSOhQ@mail.gmail.com> <f666878f-9825-bc82-6ec4-2ea491e4f702@tnetconsulting.net>
Authentication-Results: tana.it; auth=pass (details omitted)
From: Alessandro Vesely <vesely@tana.it>
In-Reply-To: <f666878f-9825-bc82-6ec4-2ea491e4f702@tnetconsulting.net>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-dkim/3hZCeKCSJHOEt_WSxLz4ab96WY4>
Subject: Re: [Ietf-dkim] Tolerating Mailing-List Modifications I-D
X-BeenThere: ietf-dkim@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: IETF DKIM List <ietf-dkim.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf-dkim>, <mailto:ietf-dkim-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf-dkim/>
List-Post: <mailto:ietf-dkim@ietf.org>
List-Help: <mailto:ietf-dkim-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-dkim>, <mailto:ietf-dkim-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Jul 2023 08:29:25 -0000

On Thu 13/Jul/2023 05:33:44 +0200 Grant Taylor wrote:
> On 7/12/23 9:26 AM, Wei Chuang wrote:
> 
>> Being able to reverse mailing-list message modifications to repair the 
>> message and enable digital signature verification, would resolve a 
>> significant roadblock for further DMARC deployment.  Potentially it would 
>> allow better attribution of which party contributed which content in the 
>> message.  I propose some ideas around reversible mailing-list message 
>> modifications in: 
>> https://datatracker.ietf.org/doc/html/draft-chuang-mailing-list-modifications-00.  These modifications are: 1) prepending a description string to the Subject header, 2) rewriting the From header, 3) removing the original DKIM-Signature and 4) appending a footer to the message body.  (Apologies that -00 draft is still in a rough form)


(3) removing the original DKIM-Signature should never be done.  If it's removed 
there's no way you can verify it.  MLM often rewrite them, which implies they 
won't verify unless computed with the relaxed algorithm.


> N.B. I've not read draft-chuang-replay-resistant-arc yet.


Me neither.


> [...]
> Old:
> 
>     Subject:  This is a test
> 
> Change:
> 
>     s/^Subject:\s+\(.*\)$/Subject:  [ietf-dkim] \1/


This would change:

Subject: Re: [Ietf-dkim] Tolerating Mailing-List Modifications I-D

to:

Subject: [ietf-dkim] Re: [Ietf-dkim] Tolerating Mailing-List Modifications I-D


> I absolutely agree that regular expressions have problems and may open up a can 
> of worms.  I'm mostly using them as a place holder for something, maybe a 
> dialect of BNF, to describe the change.
> 
> I would think that such descriptions of 1) what was changed and 2) how the 
> change was made would be more flexible than specifying specific things supported.


Wei's way to describe the change is probably better implemented by a 
post-transformation filter which has the original message available for 
comparison and can add all the Prior- headers.  That's because MLM often do 
change unwittingly, for example, from:

Content-Type: text/plain; charset="us-ascii"

to:

Content-Type: text/plain; charset="utf-8"

which is neither necessary nor documented, AFAIK.  It breaks signatures if the 
author domain signs Content-Type:.  I'm not clear where is the culprit. 
Over-signing causes other problems as well.


Grant's post arrived to me base64 encoded.  I think that's not how it was sent. 
  This kind of transformation is easily reversible.  However, reconstructing 
quoted-printable is not feasible.


For MIME parts, I recall Murray's draft provided for plain single part, mimw 
wrapped and mime added.  I never saw adding footers inside multiple parts.


Finally, I think there should be some limitations such as the footer being 
text/plain and not longer than a few lines, and subject tag being no longer 
than a couple of words.  That would likely protect the original intent of the 
message.


jm2c
Ale
--