Re: [dmarc-ietf] Ticket #1 - SPF alignment

Alessandro Vesely <vesely@tana.it> Mon, 01 February 2021 12:17 UTC

Return-Path: <vesely@tana.it>
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 4E1D43A10B1 for <dmarc@ietfa.amsl.com>; Mon, 1 Feb 2021 04:17:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.121
X-Spam-Level:
X-Spam-Status: No, score=-2.121 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_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1152-bit key) header.d=tana.it
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 QXzj0TlZq2dF for <dmarc@ietfa.amsl.com>; Mon, 1 Feb 2021 04:17:25 -0800 (PST)
Received: from wmail.tana.it (wmail.tana.it [62.94.243.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8BDB13A10C0 for <dmarc@ietf.org>; Mon, 1 Feb 2021 04:17:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tana.it; s=delta; t=1612181842; bh=iSBsFUriFBDcjTh1hxbycyi3vLDpxcDtouFwnBAQiz4=; l=4134; h=To:References:From:Date:In-Reply-To; b=BIItaW7wWO5gc5+sQcqW8YgyQiMegINRnkfoPuC0xyzUMc3f9HHvSdVLV+7K23qRg OEsm3gEi/5IXvc/Ub9yt2uCEpas0NlyYC+vs1GKeubGZJqjUWw1EQj4VAaphR5RlqP vFyf8+LCvzbxvkV1UWvlWLfri9ONQx85HqM6UvfevFMjo8rN9cDKuh/0t5ihG
Authentication-Results: tana.it; auth=pass (details omitted)
Original-From: 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 00000000005DC028.000000006017F151.00001D7A; Mon, 01 Feb 2021 13:17:21 +0100
To: dmarc@ietf.org
References: <20210130212339.447316D04763@ary.qy> <36a1c70-875d-89c8-7e95-a32324654275@taugh.com> <CAH48ZfwBKyA-TwSrr2422zmMO8wr1CKf2MiQZ3KvQu2hOH=_CA@mail.gmail.com> <1654196.ygyh55z74P@zini-1880>
From: Alessandro Vesely <vesely@tana.it>
Message-ID: <babf1538-5172-f101-d5e4-c4fa33dea495@tana.it>
Date: Mon, 1 Feb 2021 13:17:20 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0
MIME-Version: 1.0
In-Reply-To: <1654196.ygyh55z74P@zini-1880>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/dmarc/NBCIF05Wd47EU0-oz4dLW3TZUTk>
Subject: Re: [dmarc-ietf] Ticket #1 - SPF alignment
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: Mon, 01 Feb 2021 12:17:27 -0000

On Mon 01/Feb/2021 01:10:01 +0100 Scott Kitterman wrote:
> I think that we're well past learning anything new in this thread.
> 
> SPF is what it is (RFC 7208).  DMARC doesn't need to re-invent the protocol
> (and shouldn't).  For any properly implemented SPF verifier, DMARC should be
> able to consume the Mail From result.


Perhaps Courier-MTA is not so properly implemented, but when mail from is empty 
it just omits the corresponding Received-SPF: header field.

OTOH, properly implemented SPF verifiers could skip producing a Mail From 
result if the helo identity was verified successfully.

In conclusion, the idiosyncratic requirement can hardly be implemented.


> On Sunday, January 31, 2021 2:03:45 PM EST Douglas Foster wrote:
>> I don't see any justification for using HELO unless the SMTP address is
>> null.  If the SPF RFC says otherwise, this should be corrected.


It makes sense to add a section that modifies RFC 7208.  See below.

On Sun 31/Jan/2021 03:27:41 +0100 Douglas Foster wrote:
> My data, cited previously, indicates that HELO can be useful for both
> blacklisting and whitelisting.   It should not be ignored.


>> On Sun, Jan 31, 2021 at 11:52 AM John R Levine <johnl@taugh.com> wrote:
>>> On Sun, 31 Jan 2021, Alessandro Vesely wrote:
>>>> One way to interpret RFC 7489 is that you can put dmarc=pass based on 
>>>> the helo identity *only if* MAIL FROM is null. >>>
>>> That would be consistent with 7489.
>>> 
>>> Sec 3.1.2 says
>>> 
>>>     Note that the RFC5321.HELO identity is not typically used in the
>>>     context of DMARC (except when required to "fake" an otherwise null
>>>     reverse-path), even though a "pure SPF" implementation according to
>>>     [SPF] would check that identifier.


Does that mean that an implementation that uses the RFC5321.HELO identity 
without taking care of whether RFC5321.MailFrom is empty is *atypical*?

Please note that all the text occurring before that paragraph would suggest 
that any authenticated domain, if aligned, would do.  The quoted paragraph 
comes as a note, by surprise, without bringing any rationale.  That text needs 
to be revised whether or not we remove the idiosyncrasy.

And the only rationale learnt in this thread is that one could type whatever it 
wants in the helo/ehlo command, as if that weren't true for the whole SMTP session.


>>> But then 4.1 says
>>> 
>>>     o  [SPF], which can authenticate both the domain found in an [SMTP]
>>>        HELO/EHLO command (the HELO identity) and the domain found in an
>>>        SMTP MAIL command (the MAIL FROM identity).  DMARC uses the result
>>>        of SPF authentication of the MAIL FROM identity.  Section 2.4 of
>>>        [SPF] describes MAIL FROM processing for cases in which the MAIL
>>>        command has a null path.
>>> 
>>> That section of 7208 says that if there's a null bounce address, SPF
>>> pretends that the MAIL FROM was postmaster@HELO.


"Postmaster" is necessary, because SPF mechanisms can refer to the local part.

The SPF part I'd modify, however, is Section 2.3, where it says:

                                If a conclusive determination about the
    message can be made based on a check of "HELO", then the use of DNS
    resources to process the typically more complex "MAIL FROM" can be
    avoided.

I'd append to that sentence:

           , unless downstream filters need it anyway.

Since we're at it, that paragraph continues with the following sentence:

             Additionally, since SPF records published for "HELO"
    identities refer to a single host, when available, they are a very
    reliable source of host authorization status.

Isn't that the exact opposite of what many of us are claiming?  And is it legit 
for a proposed standard to quietly counter an existing proposed standard 
without some kind of rationale?


>>> If we want, we can say not to use the SPF HELO identity, but that would be
>>> an incompatible change to 7489 and I suspect would not match what most
>>> DMARC checking code does.


OTOH, relaxing the requirement that the SPF HELO identity be used only when 
MAIL FROM is empty brings no incompatibility.  It's just a cleanup.


Best
Ale
--