From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 819BD62C39 for ; Wed, 28 Oct 2020 11:20:56 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 720AB1DDE6 for ; Wed, 28 Oct 2020 11:20:26 +0100 (CET) Received: from pmg.fws.fr (pmg.fws.fr [51.91.175.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id AB7001DDD4 for ; Wed, 28 Oct 2020 11:20:25 +0100 (CET) Received: from pmg.fws.fr (localhost [127.0.0.1]) by pmg.fws.fr (Proxmox) with ESMTP id 311D2C1177 for ; Wed, 28 Oct 2020 11:20:25 +0100 (CET) Received: from zmproxy.fws.fr (zmproxy.fws.fr [10.29.1.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pmg.fws.fr (Proxmox) with ESMTPS id 4AD6CC025D for ; Wed, 28 Oct 2020 11:20:24 +0100 (CET) Received: from zmproxy.fws.fr (localhost [127.0.0.1]) by zmproxy.fws.fr (Postfix) with ESMTPS id 3DC388B79C0; Wed, 28 Oct 2020 11:20:24 +0100 (CET) Received: from zmproxy.fws.fr (localhost [127.0.0.1]) by zmproxy.fws.fr (Postfix) with ESMTPS id 236FE8B79C1; Wed, 28 Oct 2020 11:20:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 zmproxy.fws.fr 236FE8B79C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=firewall-services.com; s=7DAD15A2-D84A-11E9-8F77-BEC4FAA34EBC; t=1603880424; bh=StVqbnV31UBayDYEou3GOgIJOZHxSmSiGaMbBEnAYAo=; h=From:To:Date:Message-Id:MIME-Version; b=Lz8RycZiZ09g/ImRhkjJL4mL9Tyk6c92mAD0ZhgmfBLP+7Hzyhr+Wddztk+O8M7tY zYozP8ZU604QdVPSLToL2jips47lEiRcjj/MtAfH/QBOGMDarB3wA10151IdbhzyYk aCAsJVzCXgEBIYF9xrrnTGnxa58808IWBzHjge6+nx0lzUW5VRQmBWmD5E6JhsAVfO YhU3IHfHs5/iIBch6gLWJE9XGjDwJ/gsBoNsBmwXUgzkREqA/Yt2Prl0PujMBHHY5E rX4/vGyCdeSH003fC3fTgJjmFPlMnsD6Y5umt5vlbS7nZxGzVfbfUn3VuCoPcXMRNp zUkBoM81j0Kcw== Received: from germaine.lapiole.org (unknown [192.168.7.101]) by zmproxy.fws.fr (Postfix) with ESMTPSA id EE83C8B79C0; Wed, 28 Oct 2020 11:20:23 +0100 (CET) From: Daniel Berteaud To: pmg-devel@lists.proxmox.com Date: Wed, 28 Oct 2020 11:20:14 +0100 Message-Id: <20201028102015.628005-1-daniel@firewall-services.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.011 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [dkimsign.pm, firewall-services.com] Subject: [pmg-devel] [PATCH v2 pmg-api 0/1] Select the correct domain for the DKIM X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 10:20:56 -0000 This v2 implement the logic proposed by Stoiko Ivanov, which is to sort domains by length first. Instead of looping twice in the domain list (once for exact match, a second time for parent/child) Daniel Berteaud (1): [pmg-api] fix #3098 sort domains by length first src/PMG/DKIMSign.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.26.2