Re: [dmarc-ietf] Spirit of RFC8601 section 5 for invalid A-R headers

Damian Lukowski <rfc@arcsin.de> Tue, 07 April 2020 07:09 UTC

Return-Path: <rfc@arcsin.de>
X-Original-To: dmarc@ietfa.amsl.com
Delivered-To: dmarc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 680AB3A17E6 for <dmarc@ietfa.amsl.com>; Tue, 7 Apr 2020 00:09:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=arcsin.de
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t6_bT0mj7wXX for <dmarc@ietfa.amsl.com>; Tue, 7 Apr 2020 00:09:09 -0700 (PDT)
Received: from scalar.arcsin.de (scalar.arcsin.de [185.162.250.16]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3989E3A17E2 for <dmarc@ietf.org>; Tue, 7 Apr 2020 00:09:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=arcsin.de; h= content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:date:date:message-id:from :from:references:subject:subject:x-amavis-category; s=dkim01; t= 1586243342; x=1588057743; bh=9KA/8YL7Mgeb9Uq9rVVhn/LgOITRxddO4fP R6Ou/jhI=; b=I1FzhsYTvB7kUQqdTfBQMG+ikvAd09pOcj8K2dm6PikNhqqCybp Ig+Xru9XCNdo/uNBMDsLseLNb/sCeKpURlPcZOD5lWgSJkGXISCRZaF15mqXnLVU 6Otm5irqDehFVKJrmiydOsFpaR/3YMtfTfpS5PeXMJQk9JidTM3R1g+A=
X-Amavis-Category: scalar.arcsin.de; category=CleanTag
To: dmarc@ietf.org
References: <e2bd3117-2217-1206-0c0c-f06a35d49dca@arcsin.de> <CABa8R6sbHLfkzHD4gaPBxQbgNy57J1eLXt2sPyAfaTYAY3tG-Q@mail.gmail.com> <0fbab9d5-d00e-42ff-3059-8cb269ff1591@arcsin.de> <7084d678-ce11-fa3f-8b59-67e46da841f7@tana.it>
From: Damian Lukowski <rfc@arcsin.de>
Message-ID: <13fd0dec-d02b-b5ca-cee8-a405d891dced@arcsin.de>
Date: Tue, 7 Apr 2020 09:09:01 +0200
MIME-Version: 1.0
In-Reply-To: <7084d678-ce11-fa3f-8b59-67e46da841f7@tana.it>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/dmarc/l0sz_i-LPiyH1wKw_t34jp1juEk>
Subject: Re: [dmarc-ietf] Spirit of RFC8601 section 5 for invalid A-R headers
X-BeenThere: dmarc@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Domain-based Message Authentication, Reporting, and Compliance \(DMARC\)" <dmarc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dmarc>, <mailto:dmarc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dmarc/>
List-Post: <mailto:dmarc@ietf.org>
List-Help: <mailto:dmarc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dmarc>, <mailto:dmarc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Apr 2020 07:09:11 -0000

>>> Authentication-Results: domain.tld, spf=pass smtp.mailfrom=x@y.z
>>
>> Needs to be removed? I say no.
> 
> 
> Yes, and log it.

Please notice the comma instead of the semicolon, it wasn't a typo.
Would you still remove it?

>>> Authentication-Results: domain.tld; {garbage}
>>
>> Needs to be removed? I say no.
> 
> Yes, and log it.

Interesting, you suggest to parse "lazily", i.e. as soon as a token
looks like an authserv-id, treat it as such.

> Both cases are renamed to Old-Authentication-Results anyway.  The part that
> would log it, however, doesn't recognize the quotes (I'm going to fix it now)
> and intermittently removes the header.

I wanted to object that the RFC does not allow to tamper with "innocent"
headers, but it actually does not forbid it. That said, I could even
remove previous A-R headers altogether and be RFC compliant, so a lazy
evaluation parser can be compliant as well.

Thanks.

> Note that some tools, e.g. Thunderbird DKIM-Verifier[*] can be configured to
> either "Read Authentication-Results header" or not.  Hence is makes sense to
> rename all on entry.
> 
> Note2: even if a tool accepted a list of trusted authserv-id's, consider a MUA
> simultaneously accessing two mailboxes, at example.com and example.org, say.
> Of course you would configure the tool to trust both of their authserv-id
> (which is already beyond what an average user is willing to configure).  Then,
> a malicious party can send you a message at your @example.com address, bearing
> a faked Authentication-Results by example.org.  Should the tool trust it?

Wouldn't a trust-list per mailbox solve the issue, instead of a global
trust-list?