Re: [ietf-smtp] MTS-STS validation when MX host points to a CNAME, violating RFC 2181 § 10.3

Kristijonas Lukas Bukauskas <kr@n0.lt> Thu, 01 April 2021 17:23 UTC

Return-Path: <kr@n0.lt>
X-Original-To: ietf-smtp@ietfa.amsl.com
Delivered-To: ietf-smtp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9F58A3A1C70 for <ietf-smtp@ietfa.amsl.com>; Thu, 1 Apr 2021 10:23:20 -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 (1024-bit key) header.d=n0.lt
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 MYl9xU4vSBDc for <ietf-smtp@ietfa.amsl.com>; Thu, 1 Apr 2021 10:23:16 -0700 (PDT)
Received: from ixion.n0.lt (ixion.n0.lt [188.166.32.32]) (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 B22ED3A1C5A for <ietf-smtp@ietf.org>; Thu, 1 Apr 2021 10:23:15 -0700 (PDT)
Received: from webmail.n0.lt (localhost.localdomain [IPv6:::1]) by ixion.n0.lt (Postfix) with ESMTPSA id 43F5FFC48D; Thu, 1 Apr 2021 17:23:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=n0.lt; s=default; t=1617297793; bh=oA6zKOV2GeQntoUUoZrY8/bF0d9TL8hswlsSeAsfv08=; h=From:To:Subject; b=ethgmo9GCFosWWhssT9VbYEOrpUBdv7dixJtfmmdFzWWBPrTODy7Bxu6t7C/ZqB7r cRXx6oqirW45DzAGhf1mv0zwtTAMY5JvlUbIskrZux8FA36md8PqTGf7wcXIE/w222 02QaSGmi6hfb84o1TL6X96cOQg22lJ6oaKbRrPEM=
Authentication-Results: ixion; spf=pass (sender IP is ::1) smtp.mailfrom=kr@n0.lt smtp.helo=webmail.n0.lt
Received-SPF: pass (ixion: connection is authenticated)
MIME-Version: 1.0
Date: Thu, 01 Apr 2021 20:23:13 +0300
From: Kristijonas Lukas Bukauskas <kr@n0.lt>
To: John R Levine <johnl@taugh.com>
Cc: ietf-smtp@ietf.org
In-Reply-To: <87c820e7-e6be-97e6-2589-88e5c57b6ddd@taugh.com>
References: <20210401003023.713A871BE253@ary.qy> <d8768a088e2e9b73682e3d9bdbb372d9@n0.lt> <b2acacaa-5bed-e332-1855-6ef0183cf42@taugh.com> <464756802f3425cb53c3be6392af4390@n0.lt> <87c820e7-e6be-97e6-2589-88e5c57b6ddd@taugh.com>
User-Agent: Roundcube Webmail/1.4.11
Message-ID: <127546c1b90816191cf8e5389c37bb47@n0.lt>
X-Sender: kr@n0.lt
Content-Type: multipart/alternative; boundary="=_3a7ee2518afd9eb2d0c5a3bf8234c134"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-smtp/E5GFLlhegd756LPVw9Dypt8SdHQ>
Subject: Re: [ietf-smtp] MTS-STS validation when MX host points to a CNAME, violating RFC 2181 § 10.3
X-BeenThere: ietf-smtp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of issues related to Simple Mail Transfer Protocol \(SMTP\) \[RFC 821, RFC 2821, RFC 5321\]" <ietf-smtp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf-smtp>, <mailto:ietf-smtp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf-smtp/>
List-Post: <mailto:ietf-smtp@ietf.org>
List-Help: <mailto:ietf-smtp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-smtp>, <mailto:ietf-smtp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Apr 2021 17:23:26 -0000

On 2021-04-01 19:02, John R Levine wrote:

>> {"organization-name":"Microsoft 
>> Corporation","date-range":{"start-datetime":"2021-03-30T00:00:00Z","end-datetime":"2021-03-30T23:59:59Z"},"contact-info":"tlsrpt-noreply@microsoft.com","report-id":"132616914860181612+n0.lt","policies":[{"policy":{"policy-type":"sts","policy-string":["version: 
>> STSv1","mode: enforce","mx: mx.n0.lt","max_age: 
>> 84600"],"policy-domain":"n0.lt"},"summary":{"total-successful-session-count":0,"total-failure-session-count":492},"failure-details":[{"result-type":"certificate-host-mismatch","failed-session-count":492}]}]}
>> Do they complain about the certificate which includes both n0.lt and 
>> *.n0.lt anyways?
>> Even without the CNAME error, why would it do that?  The cert matches
>> the name of the MX.
> 
> So certificate-host-mismatch here should be understood that EITHER §4.1 
> [1] (MX Host Validation) OR §4.2 [2] (Recipient MTA Certificate 
> Validation) failed and not that, according to the report, the 
> certificate hostname mismatched? Or what exactly?
> It's probably just giving you the wrong error message.
> 
> Here's a radical idea: fix your MX entry and see if the errors go away.

The errors do go away. But I'm not trying to fix the individual issue 
here, rather to better understand what exactly they're are complaining 
about, and if their errors and logic are compliant with the policy 
validation and application, set in RFC 8461.

They started off by pointing at their roadmap which still up until now 
says that the feature is in development, rather than rolled out, or 
launched; then seemingly tried to confuse me with:

> From reviewing your issue, we can see that your externally hosted 
> domain n0.lt is set to only accept emails using secure and encrypted 
> connections. When sending emails, by default they are unencrypted. By 
> default Office 365 sends emails unencrypted which is why your n0.lt 
> server is rejecting them.
> 
> To resolve this you need to set up a send connector in Office 365 to 
> send encrypted and TLS secured emails to n0.lt. Depending on the 
> configuration of your n0.lt mail server, you may also need a receive 
> connector to match the receiving SMTP FQDN madin.ga* with a TLS 
> certificate, however, we cannot confirm this as your mail server is not 
> hosted by Microsoft.

* - the domain I have with them for testing purposes.

Viktor Dukhovi and Sam Varshavchik have already provided their detailed 
viewpoints which will help me a lot to continue working with the support 
of this sending MTA.

Thanks!

--

Best wishes,
Kristijonas