Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lookup Count Inconsistencies
Mark Alley <mark.alley@tekmarc.com> Sun, 15 January 2023 21:56 UTC
Return-Path: <mark.alley@tekmarc.com>
X-Original-To: spfbis@ietfa.amsl.com
Delivered-To: spfbis@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A0451C14F74B for <spfbis@ietfa.amsl.com>; Sun, 15 Jan 2023 13:56:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=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=pass (2048-bit key) header.d=tekmarc.com
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 5MZGFPJ41NUC for <spfbis@ietfa.amsl.com>; Sun, 15 Jan 2023 13:56:06 -0800 (PST)
Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 50952C14F74A for <spfbis@ietf.org>; Sun, 15 Jan 2023 13:56:06 -0800 (PST)
Received: by mail-qv1-xf31.google.com with SMTP id u20so2268554qvq.4 for <spfbis@ietf.org>; Sun, 15 Jan 2023 13:56:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tekmarc.com; s=google; h=in-reply-to:subject:autocrypt:from:references:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=pz93F84GYPrxLxiiTrAA7vE4hTpJ0SgDiKhESdN3X7U=; b=R3jm2OJpwHdfKyKBaH2bT8maw/CXiy0THaA7HvqlKd3VEkByEZDhWWDgzUgy0H+c8C sV83zg0SJXv+evQGxJUjHRYVAjeDIDjTk+6QGYE3E4EBgjHvBG7ZYWherdes6e+pSsHX HMUeeS/4aGQXmZwEx5gsw24817jHHA14N+VjxFVmu05bagQ+lUaRQYwnPVP4MbdS0Kfy lmFxuIVU6ZSoaCw2O/ucde7AfBAV7Gcdy52SwVudiw+sUf0SaB/KICccxnrxHif+MkGc Df3CmhtvkGfdxJs0CXkOtR299sIbM8wH8iQaISGA8hSfpKkjuTEQvG1IxsiMtrwOpQ6M /qGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:subject:autocrypt:from:references:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=pz93F84GYPrxLxiiTrAA7vE4hTpJ0SgDiKhESdN3X7U=; b=qN3DC1E3QqH3lIvPKZ72O3NMe+dOZFz6MpMCPYPZ4ghzZFoRbwVcLXt2aVmyGLqoxF +EcoQG0GNru1S5XVJZt6hOHzzHhULH2AbBuSNYaxmhMmT1taFZGhcM0e5ib+A/wH4ZJR tl1TwhmG/L1XV+baBUQqLJiDafxBDtcX1DkVjXdsMtdT3a0lKwF/VhBP1wD4kHw154HG Al2JshcJ2ybH+BYc6D4TqSsOk4LbsNDNATr8N9q3/nIefMvlTIZWRJJ4wReKmtkKWMCk SWFLy1Ut2o4W9MtyoilQNNPUuYSF2eh8IUPUr2c01Tsk3URvxHdkEq2T3HVOVXPAxjBb PTBw==
X-Gm-Message-State: AFqh2krjhe1IOoE8K9tHFwp0kGsIDxkINmQbMegoNQKZDROHDS7XCBVi 8MXPass9iS0uCVd/ABeKFlClQ/i91QTQ1NbRgjQ=
X-Google-Smtp-Source: AMrXdXtgIaU+r6igyidqfl5oY5xQv0puFghfIqkhwBWl/FcS/R5RnCikUvJvGZPqXqRH1Cdgk0E7Yw==
X-Received: by 2002:a0c:ea8e:0:b0:532:2d0e:7e3b with SMTP id d14-20020a0cea8e000000b005322d0e7e3bmr39876246qvp.37.1673819764836; Sun, 15 Jan 2023 13:56:04 -0800 (PST)
Received: from [192.168.2.20] (162-238-103-217.lightspeed.brhmal.sbcglobal.net. [162.238.103.217]) by smtp.gmail.com with ESMTPSA id s10-20020a05620a16aa00b006cfc9846594sm7742332qkj.93.2023.01.15.13.56.03 for <spfbis@ietf.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 15 Jan 2023 13:56:03 -0800 (PST)
Message-ID: <643ae829-a585-a9b8-b462-6bcc7549f2c7@tekmarc.com>
Date: Sun, 15 Jan 2023 15:56:03 -0600
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1
Content-Language: en-US
To: spfbis@ietf.org
References: <79ac443e-b0ee-6598-cec0-9cf32c3dc1d1@tekmarc.com> <2052933.pCZHq2v93S@localhost>
From: Mark Alley <mark.alley@tekmarc.com>
Autocrypt: addr=mark.alley@tekmarc.com; keydata= xsFNBGOqGVEBEAC4wlUuECSqCjZgjn2sFPxBDm1jN66t7kFm5KyjjHYBey1HTjrjJTmb3XQB /zbTSWZPN96HNA5j3EH/TGfN4SogIgFiLkznOHooMECdCdtr8ARE9EesWQmfB96Q5XGga3FW 4MuXzNOAcQHmN1evG/dMUrGGsa2bUUWfa70FM1eM8xNspkZGmvyPAvsEP39xnaMFoqYkvYBB At2IHadM1mgDd2vWCUF31K8CS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6y0p 1e/0Gtm9m2n3/zGNA4w/tEf9FRWdlL+3GMlY963XWW5RjKxABF0GuKUENNM9MZ0f+wvyhyEW DJ8ep+3eqgaW4/wssbad1Eww26gYIKnBThNnVNvDYZztzAYHk3ayoD3ewPzbDyaosCBTE0fh voMyrcYN74oHdHx6o2irX22TiZ0+D/PQ+33oS9/sirPuw6Li+ED5A/81h7/CuT6gLDHKkuW/ 6mRAoTdOOV6c8c6V95NoNSAioIFFPqKZYIfX03IqqRst+HuOKOavERFmeoXANTDNRNR7/1rt vW8J9tarMH5N9VMewM9ktju2iuAs8nzuDhpctmGNdf7s4CWsoAlHuTleECEMBWHkHyIt5VjI XhtOJUl0BRmzkxKb6vJS5J8w/co61Ovq6ya3RsqsBEqc/szR8kX2m6n2nOPJmqTsHUe+XXMq +M9CZVlOrXkDoVCCbs6P8QuhNDcWqOkGYXIsDGQavclPaHwwsvf8Z3Wu73kQcMWdzmr8W7A4 hlVr9qLSLxJCn9ZLz84Fon4nPlGrfBQpKtB5gvyTCw6Kq5ca7FMtVkeiIn2HI+6Um8ytK1K7 N008Qxh74D6PI7S7gJt1SzBmAcQOL8omJng61C5B1fUncg==
In-Reply-To: <2052933.pCZHq2v93S@localhost>
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="------------MbeZOXRHXnVQpaubM8MNaPDL"
Archived-At: <https://mailarchive.ietf.org/arch/msg/spfbis/QW24wa1VAoE9LMYOHQD7loy3Zds>
Subject: Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lookup Count Inconsistencies
X-BeenThere: spfbis@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: SPFbis discussion list <spfbis.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/spfbis>, <mailto:spfbis-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spfbis/>
List-Post: <mailto:spfbis@ietf.org>
List-Help: <mailto:spfbis-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/spfbis>, <mailto:spfbis-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 15 Jan 2023 21:56:10 -0000
I appreciate the clarification, that is much clearer now, thank you. I was asking for the group's guidance on this as some other vested individuals on this topic had similar questions as myself about this specific section, so I thought to ask to clear it up. - Mark Alley On 1/15/2023 3:18 PM, Scott Kitterman wrote: > Comments inline. > > On Friday, January 13, 2023 3:09:03 PM EST Mark Alley wrote: >> Hi all, I have two questions about section 4.6.4 regarding "mx" >> mechanism DNS lookup counts during SPF evaluation that I would like some >> guidance on. I haven't been able to find anything regarding this topic >> specifically in the ML archive aside from one niche topic relating to >> the MX AAAA ipv6 queries counting as void lookups. >> >> ------------------------------------ >> >> First, checking logic implementations of the "mx" mechanism DNS lookup >> count of various SPF validator tools compared to the logic described in >> section 4.6.4, I discovered implementation inconsistencies that have led >> me to question what the "correct" logic is for counting MX lookups in an >> SPF record. There are 12 SPF validators on the internet that seem to >> skip over this during lookup counting (many from well-established >> vendors), and only 3 that do not. >> >> So, given this, based on the below information, which is the correct >> counting interpretation? >> >> There is a domain - katrinafox.com - which has an SPF record that looks >> like this: >> >> /v=spf1 +a +mx +ip4:35.213.205.66 include:_spf.mailspamprotection.com ~all/ >> >> Breaking down DNS lookups manually, we get this: >> >> 1 - "a" mechanism >> >> 4 - "mx" mechanism (1 initial MX record lookup, +3 A/AAAA MX names >> returned) > >> 4 - "include" mechanism (1 initial include lookup, +3 recursive includes) >> >> Per the first paragraph of section 4.6.4, it reads as such: "/When >> evaluating the "mx" mechanism, the number of "MX" resource//records >> queried is included in the overall limit of 10 mechanisms///modifiers >> that cause DNS lookups as described above."/ >> >> My interpretation is that the language is clear; the MX names (A/AAAA >> RRs) returned by the MX query are counted against the overall 10 lookup >> count of the evaluated SPF record. Leaving this domain's SPF record with >> a total of 9 lookups. However, the overwhelming majority of SPF >> validator tools (and I haven't even started researching receiver-side >> logic implementations of this yet) seem to implement this /skipping/ the >> MX query returned names as part of the lookup count, which leaves the >> lookup count for this domain at 6. > First, some history. In the predecessor document, RFC 4408, the processing > limits were in security considerations, not in the main specification (Section > 10.1). There are some changes between RC 4408 and RFC 7208 in this area that > may account for some differences, but I don't think this is correct for either > version of the limits. > > Moving forward, here's the full text specific to MX from RFC 7208, Section > 4.6.4: > >> When evaluating the "mx" mechanism, the number of "MX" resource >> records queried is included in the overall limit of 10 mechanisms/ >> modifiers that cause DNS lookups as described above. In addition to >> that limit, the evaluation of each "MX" record MUST NOT result in >> querying more than 10 address records -- either "A" or "AAAA" >> resource records. If this limit is exceeded, the "mx" mechanism MUST >> produce a "permerror" result. > In the example you gave, only the +mx lookup counts against the overall limit. > "MX" resource records are exactly that. The address records (A/AAAA) are > counted separately as clearly indicated in the sentence after the one you > quoted. > > The change from RFC 4408 to RFC 7208 is in how the second limit (no more than > 10 address records) is addressed. As you can see, RFC 7208 specifies an error > if that number is exceeded. RFC 4408 specified to truncate lookups at 10 > without error. We changed this for RFC 7208 because the silent truncation > specified by RFC 4408 left a risk of inconsistent results (if there are more > than 10, there's no guarantee of the order they are returned in, so an > identical message might pass one time and not another). > > MX records with more than 10 address records are relatively rare, so it would > not surprise me if some implementers did not consider this a change worth > spending the money to make. > > >> ------------------------------------ >> >> Second, addressing the second sentence of the second paragraph in 4.6.4 >> (which continues the context of the last above question): "/In addition >> to that limit, the evaluation of each "MX" record MUST NOT result in >> querying more than 10 address records -- either "A" or "AAAA" resource >> records./" >> >> There seems to be the same inconsistencies among SPF validator tools for >> this logic as well. Three tools, one being MXtoolbox, say this domain >> has "too many IP addresses returned from the MX query" (of which there >> are well over 10 total), which results in their evaluation returning >> "permerror". >> >> It seems some implementors have interpreted the "10 address records" >> phrase to mean "/the number of IP address records //resulting //from an >> MX name A/AAAA RR query/", rather than "/the total sum of the MX names >> themselves/", as would seem described by the section's language. Of my >> interpretation from this section's language, it would seem this domain >> should exceed neither the SPF lookup count, nor the MX A/AAAA query count. >> >> Which is the most accurate interpretation of this section? > See above. Yes. "address records" and "IP address records" are synonymous. > If a record has multiple "MX" mechanisms, each one can have up to 10 address > records (A/AAAA). The assigned names fo A/AAAA are "a host address"/"IP6 > Address" [1], so I don't see how it could be anything else. > > Also, as mentioned above, if some validators raise an error and some don't, > that's a result of the change going to RFC 7208 from RFC 4408 that I mentioned > above. > > I think you need to go back and revisit you assessment of how these work as I > don't think it's correct. We struggled with this in the SPFbis working group > as it was very difficult to come up with clear and accurate language, so I'm not > surprised to see it's not immediately obvious what we meant. > > Scott K > > [1] https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4 > > > > _______________________________________________ > spfbis mailing list > spfbis@ietf.org > https://www.ietf.org/mailman/listinfo/spfbis
- [spfbis] RFC7208 4.6.4 Interpretation - MX Lookup… Mark Alley
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… Mark Alley
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… Mark Alley
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… Scott Kitterman
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… Mark Alley
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… Jan Schaumann
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… Jan Schaumann
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… Scott Kitterman
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… Jan Schaumann
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… Scott Kitterman
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… Tim Wicinski
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… John Levine
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… Tim Wicinski
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… Jan Schaumann
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… william
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… John R Levine
- Re: [spfbis] RFC7208 4.6.4 Interpretation - MX Lo… Klaus Frank