Re: [dmarc-ietf] I-D Action: draft-ietf-dmarc-dmarcbis-03.txt

Todd Herr <todd.herr@valimail.com> Thu, 19 August 2021 12:53 UTC

Return-Path: <todd.herr@valimail.com>
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 C073D3A13EE for <dmarc@ietfa.amsl.com>; Thu, 19 Aug 2021 05:53:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 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, HTML_MESSAGE=0.001, 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 (2048-bit key) header.d=valimail.com
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 rfe1oueG0y7T for <dmarc@ietfa.amsl.com>; Thu, 19 Aug 2021 05:53:00 -0700 (PDT)
Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 419D33A13D3 for <dmarc@ietf.org>; Thu, 19 Aug 2021 05:53:00 -0700 (PDT)
Received: by mail-qv1-xf35.google.com with SMTP id jz1so3488962qvb.13 for <dmarc@ietf.org>; Thu, 19 Aug 2021 05:53:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valimail.com; s=google2048; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Kp+HQe124rs2JpuxNo/Yv09N8figUM4AKdIsLkQYnXk=; b=f0PNk9lYaG8BjEokzh8S3VKHJlWfYA8Hox5aEC36UxH6kj7RE9jrqtS8fKcMIu0jdD wymCsaZa/3R1EPcBukCsHV60KUy7slH4beZgm880rUDoECFyt5k4UCavOBVH5yc+godH NASoIuYW19AvFv3/IsAs8gzt6GO481mnsPQE3w7Qd9Z48YU+PFGZQMdhHgbyc/fetbH0 TqiMZzI+CWfwxIgSZdf+vi9rLO/NKYjGke06Uvp+67zGrZEXcfbiD9HR0KOcn7z76L2i 7QbdwLdHI3YxOkFHtN8FMQF6DGPxzw5vmEqx/gVaX+ohmuozKEWvfxgtMw87YtvEOHRD OnTQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Kp+HQe124rs2JpuxNo/Yv09N8figUM4AKdIsLkQYnXk=; b=e3+UUueaEnETSjlvVMIK9JzMlsVXiRXGAA593rwZRheIRaQthtnP6fhpDJ5KhyeW7+ MY/y+SNGZU76yEm03Tsm9c4MAtMkoFpg0K6eBsAi0zi9OXjHpn5quiW64WK84ppZZcOu yJly2M72R5ND6eOCwRyGdzJaXVqX0gqB0FIgncGM5KDFrxLbdx5bAt5Icf2EJWbWzXmT vKSdsGSsD9wuvuUx8ec4xOj+1GGTTgsAx0+RqdYmbDmOhMn2EqBsa9Dqok0kMsDi60rP KuManTCXcEM59cgkFVL2zlB2WdoE0h3Jf2weIUuEB/o2wlmVUGYyELTRq/r+f1XpkPw0 Md9w==
X-Gm-Message-State: AOAM530jrNEp9IxrVsoULbuRcpfV+58xBweV+s+OLd1CzvZNaRk94qDZ 0E5o/npbXRMntIW0wypNW3/MkH8xNA8qKUQTrdF5p2Re0PtVsw==
X-Google-Smtp-Source: ABdhPJz9hPQgUsejFJ0haSElh5gVXx8LE/pfQoHapvyj5414m7F+Wn4BUACLRwtevVFJ0+Jym/hYniqZDKvrwjd2ws0=
X-Received: by 2002:a05:6214:27ea:: with SMTP id jt10mr14503128qvb.39.1629377577911; Thu, 19 Aug 2021 05:52:57 -0700 (PDT)
MIME-Version: 1.0
References: <162931752865.27585.10197515584988072678@ietfa.amsl.com> <CAHej_8mcwKcjwxV09_6ENrOnh5t+seDv_kTZiO0mgyRS2BVgTA@mail.gmail.com> <3e4b2087-a866-6f66-3964-71a3c67eab8b@tana.it>
In-Reply-To: <3e4b2087-a866-6f66-3964-71a3c67eab8b@tana.it>
From: Todd Herr <todd.herr@valimail.com>
Date: Thu, 19 Aug 2021 08:52:41 -0400
Message-ID: <CAHej_8kVW8daPQhghouneRS37WhaCHo4Os6Ggd43FbOpo=ri6A@mail.gmail.com>
To: IETF DMARC WG <dmarc@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000bc9b1605c9e90755"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dmarc/BsC-K3DNaeWBaB0_igEnhG4-fvw>
Subject: Re: [dmarc-ietf] I-D Action: draft-ietf-dmarc-dmarcbis-03.txt
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: Thu, 19 Aug 2021 12:53:06 -0000

On Thu, Aug 19, 2021 at 7:19 AM Alessandro Vesely <vesely@tana.it> wrote:

> On Wed 18/Aug/2021 22:17:57 +0200 Todd Herr wrote:
> >
> > The main update in this draft is removal of the "pct" tag, with an
> > explanation as to why, and an introduction of the "t" tag in an effort
> > to maintain the functionality provided today by "pct=0" and "pct=100".
>
>
> As held earlier, I disagree with such gratuitous breaking of the
> existing installed base and published records.
>

I disagree with your characterization of removal of the "pct" tag as
"gratuitous breaking"; the spec has long contained the following text:

Only tags defined in this document or in later extensions, and thus added
to that registry,
are to be processed; unknown tags MUST be ignored.

and so should a DMARC protocol without the "pct" tag be formally adopted,
there should be no breaking of any existing DMARC implementations.


>
> It goes without saying that domains who are publishing pct=0 will
> slowly adapt by adding t=y and never removing pct.  Those who publish
> pct=50 and are satisfied with it will have to give up, despite their
> own operational experience.
>
> In any case, I object to the use of the Probability Mass Function as
> applied to Binomial Distributions argument.  It presumes that the
> percentage in question refers to the number of messages sent during a
> given day, which was never specified.  The spec said "Percentage of
> messages from the Domain Owner's *mail stream*".  The random function
> applied to such stream is equivalent to computing a Monte Carlo
> integration on a finite set.  Since *all samples* are eventually
> considered, the result tends to the exact value.
>

I will continue to contend that the first sentence of the existing
definition of the "pct" tag was incorrectly worded. It reads:

Percentage of messages from the Domain Owner's mail stream to which
the DMARC policy is to be applied.


and as I've written in other threads, such phrasing makes no sense to me,
because a DMARC policy cannot be applied to a message which passes DMARC
verification checks.

I believe my argument to be supported by the existing definitions of
"quarantine" and "reject", which read in part:

      quarantine:  The Domain Owner wishes to have email that fails
the DMARC mechanism check be treated by Mail Receivers as suspicious.

      reject:  The Domain Owner wishes for Mail Receivers to reject
email that fails the DMARC mechanism check.


There is nothing in the text there that talks of applying a policy of
"quarantine" or "reject" to messages that pass the DMARC mechanism check,
so it follows for me that the "pct" tag was never intended to apply to the
entire mail stream, only to those messages that failed the check. Given my
assertion here, I believe that the Probability Mass Function as applied to
Binomial Distributions is the correct argument to make against the pct tag,
and I was rather pleased with myself in how I described it in an earlier
revision of the spec:

         if (random mod 100) < pct then

            selected = true

         else

            selected = false


   The pseudocode shown above is an example of that approximation,

   relying on a random number generator to effectively produce a whole

   number between 0 and 99, inclusive.  If that number is less than the

   value of the "pct" tag, then a message producing a DMARC "fail"

   result will be subject to the DMARC policy in question; if not, it

   will be subject to the lesser policy.  Over time and given enough

   iterations of the pseudocode, this should produce a roughly uniform

   distribution of all values across the range, which we will refer to

   going forward as "the pool".  However, mathematics teaches us that

   the pool cannot be guaranteed to produce the desired result.


   The sampling done to honor the "pct" tag is known in mathematics as a

   Binomial Distribution, where a number of independent samples of the

   pool are taken, with each one having the same probability of

   producing a number that is less than the value of the "pct" tag.  A

   Binomial Distribution is expressed by the following function, known

   as a probability mass function (PMF):


                 n!         x          n-x

     f(x) = ----------- *  p  * (1 - p)

            (n-x)! * x!


   In English, the PMF is a way to calculate the probability that x

   items from a sample of n items will have the desired result when p is

   the probability that any one item will have the desired result.


   For example, for a DMARC policy record with pct=20, we let p = 0.2,

   and to calculate the probability that 1 out of every 5 messages will

   be assigned the requested policy, we have:


           5!           1            5-1

      ----------- *  0.2  * (1 - 0.2)     =

      (5-1)! * 1!



         120       1     4

        ----- * 0.2 * 0.8  = 5 * 0.2 * 0.4096 = 0.4096

         24


        0.4096 * 100 = 40.96%


   The above demonstrates that for every five messages producing a DMARC

   "fail" result, there is a slightly less than 41% chance that just one

   of the five will have the requested policy applied to it.  The table

   below shows the percent probability for all possible results:


        -----------------------------------

        | X  | Percent chance that X of 5 |

        |    |  will have policy applied  |

        -----------------------------------

        | 0  |        32.768%             |

        -----------------------------------

        | 1  |        40.96%              |

        -----------------------------------

        | 2  |        20.48%              |

        -----------------------------------

        | 3  |         5.12%              |

        -----------------------------------

        | 4  |         0.64%              |

        -----------------------------------

        | 5  |         < 0.1%             |

        -----------------------------------

Your mileage may vary, of course, but the larger point here is that while
you personally have objected to removal of the "pct" tag, there has
seemingly been rough consensus supporting the idea of removing all values
except 0 and 100, and quite a lot of agreement that having a tag named
"pct" that only had valid values of 0 and 100 didn't make sense, so this
rev is a first attempt to find a path to documenting something that does
make sense, given that there is support for keeping the functionality that
pct=0 provides.

-- 

*Todd Herr* | Technical Director, Standards and Ecosystem
*e:* todd.herr@valimail.com
*m:* 703.220.4153

This email and all data transmitted with it contains confidential and/or
proprietary information intended solely for the use of individual(s)
authorized to receive it. If you are not an intended and authorized
recipient you are hereby notified of any use, disclosure, copying or
distribution of the information included in this transmission is prohibited
and may be unlawful. Please immediately notify the sender by replying to
this email and then delete it from your system.