Re: [dmarc-ietf] Debugging and preventing DKIM failures- suggestion

Дилян Палаузов <Dilyan.Palauzov@aegee.org> Sun, 26 May 2019 13:22 UTC

Return-Path: <Dilyan.Palauzov@aegee.org>
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 07DE112006B for <dmarc@ietfa.amsl.com>; Sun, 26 May 2019 06:22:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.019
X-Spam-Level:
X-Spam-Status: No, score=-1.019 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FROM_EXCESS_BASE64=0.979, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (4096-bit key) header.d=aegee.org
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 LmDsRfPVshEk for <dmarc@ietfa.amsl.com>; Sun, 26 May 2019 06:22:50 -0700 (PDT)
Received: from mail.aegee.org (mail.aegee.org [144.76.142.78]) (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 38DFD120020 for <dmarc@ietf.org>; Sun, 26 May 2019 06:22:49 -0700 (PDT)
Authentication-Results: mail.aegee.org/x4QDMgn9019771; auth=pass (PLAIN) smtp.auth=didopalauzov
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aegee.org; s=k4096; t=1558876965; i=dkim+MSA-tls@aegee.org; r=y; bh=g8u2psBoa3l0Rka5na5dfGJZGRny/hBvfXClGctskPs=; h=Date:In-Reply-To:References:Subject:To:CC:From; b=XsKuK3wH2aVpas/DaKMYocjIK290WFO6u6cVqSGpVmtDSM7IQduesKszIqqUjzJqe 0U87pO6qSGzobXZLRJz2cJ55BxH+2K0ekhjB6Px3Dvo/MhcSwX2OI3XuDhenCmmqy+ alcKJkz29KDLfNEp5IM8VCPTIUL8omkqcYEcmEXtKWCUbzcj+qPZWH9gPQQXWa+ixw +CWRem9kyKU+UyA6LROgk6TgPGpdPCAafLjsu1zYfJ+G9/9U+Ieami1NERO/OubzWb kIO+zsLjnh5v8LWDSaU1bMJBfA321Bc6SBvTAzDh6xtNlJFJctSJGpUMtQul3W14f2 mG9BL2iOv2Y5R3vMD6TJOvEIdNGhCYG4w+Yh+Tq5oEQ6x4n5fZ11xkqD3hsBn3Hfla oFixiMuwuzhdTm8T9S3rvokZcHiHu3UM3gpIUczJXyZZ2ILt0R/w9wkf5Z3f74rXEu FiFssSy8Q4HljcHncGhypP3OozvE9azx8iChBBz2pv6ptj9aQrT3XCfWOXm2DGkRJM xu3V9sp/tacG+7sokDMgmvyR9L+cdSrmuWQC+h22mIf0xTUXhiHJ8Hjszu/efXBym4 +bp2CJf+Kz4BS1S0B3tIODAgthRVPAzL0xqHgceYvIvqP65ZcGnEQpINiY1+fA4CoI Q79imw4pN257gYvUGVHS/6GI=
Authentication-Results: mail.aegee.org/x4QDMgn9019771; dkim=none
Received: from [192.168.78.125] (90-154-194-202.ip.btc-net.bg [90.154.194.202]) (authenticated bits=0) by mail.aegee.org (8.15.2/8.15.2) with ESMTPSA id x4QDMgn9019771 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 26 May 2019 13:22:43 GMT
Date: Sun, 26 May 2019 16:22:40 +0300
User-Agent: K-9 Mail for Android
In-Reply-To: <433a2fcbcab9452d8ca4b3ac99dc5b71@bayviewphysicians.com>
References: <433a2fcbcab9452d8ca4b3ac99dc5b71@bayviewphysicians.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----2Q1AXCA6PYE5HQCLSYY64MF1VJTNVA"
Content-Transfer-Encoding: 7bit
To: fosterd@bayviewphysicians.com
CC: dmarc@ietf.org
From: Дилян Палаузов <Dilyan.Palauzov@aegee.org>
Message-ID: <54FB29A0-517A-430E-AF5B-CB079CC3D7F6@aegee.org>
X-Virus-Scanned: clamav-milter 0.101.2 at mail.aegee.org
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/dmarc/_GlMadv-d5sCNE6ZAY85Ox4aOVQ>
Subject: Re: [dmarc-ietf] Debugging and preventing DKIM failures- suggestion
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: Sun, 26 May 2019 13:22:53 -0000

Hello Douglas,

1) Check the Authentication-Results header. An implementation could put there additional information as comment. A downstream MTA will reevaluate the DKIM-Signature anyway, if it does nkt trust the previous hop. Common case: aliases to random servers.

2) Check ARC, https://tools.ietf.org/wg/dmarc/ .

3) To fix the origin of a bad dkim signature problem the sender has to be notified about the inconsistencies so that the sender can take actions and correct the signing process, asuming the problem is not on verifier’s side. Propagating and logging the mismatched signature does not help correcting the source of the problem.

Part of the DKIM magic is the volume of papers one has to read in order to understand it, and fix whenever something goes wrong. Here come other email protocols: submit, mta-sts, dane for smtp, dmarc, https://starttls-everywhere.org/, wrong certificate purpose … and you end having very few people being able to understand and correct a problem, even when all the necessary informarion can be extracted from logs or error reports. If you cannot run different dkim verifiers towards a single dkim-signature with corresponding message, and if the sender repeatedly does not answer on emails, no further normative text helps you.

By the way, why writing you directly earlier today I got as reply '“reason: 550 Sender IP reverse lookup rejected”?

Regards
  Дилян

On May 26, 2019 3:22:25 PM GMT+03:00, "Douglas E. Foster" <fosterd@bayviewphysicians.com> wrote:
> 
>  Problem
>  
>DKIM verification failures are difficult to debug because the recipient
>
>cannot detect where the problem occurred or why.
>  
> Proposed Solutions
>  
> 1) Identify the point of failure
>  
>It would seem helpful to support a DKIM trace record that a device can
>use 
>to indicate that it detected a DKIM failure.  I am suggesting a header
>of 
>the form "DKIM-InputFail", followed by the contents of the signature
>header 
>that could not be verified.  This puts an upper bound on the location
>of 
>the problem.  (Once the failure is documented, it should not be
>repeated by 
>downstream servers.)
>  
>A downstream MTA is still free to evaluate the original signature.  
>For 
>example, an intermediate MTA may have reported the failure incorrectly 
>because of a software bug.   
>  
> 2) Recover from Subject header changes that break signatures.
>  
> One expected cause of DKIM verification errors is Subject header 
>modification, either by spam filters or by list servers.   These types
>of 
>changes can also be mitigated by trace headers.   If a device makes a 
>change to the subject, it should add headers for "Subject-AsReceived"
>and 
>"Subject-AsSent".  Any downstream system can then reconstruct which
>header 
>text was in place when any signature was applied, regardless of how
>many 
>Subject header changes occur during transmission.
>  
>Downstream servers would also have the option of restoring the Subject 
>header to its original value.   This would be appropriate when the
>Subject 
>was tagged by the spam filter upon arrival to an administrative domain,
>and 
>then is auto-forwarded to a different administrative domain.   If the 
>outbound MTA restores the original subject, it increases the likelihood
>
>that the message will be accepted downstream.  
>  
>The concept could be applied to other headers.   For example, I have
>seen 
>messages with DKIM failures because an auto-forward server replaced the
>
>internal Message-ID with one of its own.   I don't know if there are 
>legitimate reasons for intermediate MTAs to tamper with other headers.
>  
>  
>
>