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 7897864987 for ; Wed, 30 Dec 2020 18:16:25 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6FDEB24788 for ; Wed, 30 Dec 2020 18:15:55 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 firstgate.proxmox.com (Proxmox) with ESMTPS id 26A6E2476F for ; Wed, 30 Dec 2020 18:15:53 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E5CDD456E2 for ; Wed, 30 Dec 2020 18:15:52 +0100 (CET) From: Stoiko Ivanov To: pmg-devel@lists.proxmox.com Date: Wed, 30 Dec 2020 18:15:35 +0100 Message-Id: <20201230171539.7644-1-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.073 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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 Subject: [pmg-devel] [PATCH pmg-api v2 0/4] add support for locally configured SA channels 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, 30 Dec 2020 17:16:25 -0000 v1->v2: * addressed Fabian's feedback (where appropriate more details are added to the individual patches) original cover-letter: With the recent announcement by KAM about the availability of a signed update channel for the KAM.cf (and other) ruleset [0], I thought that this might be a better suited way to provide regular updates to KAM.cf compared to the initial patch I sent some time ago [1]. The upside of using sa-update is that it does lint the ruleset before trying to pull the updates, and afterwards as well. GPG signed updates by KAM can also be considered production worthy. I tried to align the implementation to the channel.d mechanism mentioned in [0] since it seems: * somewhat sensible (these days my first choice would not be shell-code snippets) * one mechanism of potentially having a distributable way of providing the necessary configuration for an external SA ruleset - and the only one I'm aware of, which is not a self-tailored script The patchset was tested with the file provided at [0] on my test installation Should this be accepted we could ship /etc/mail/spamassassin/channel.d/KAM_channel.conf in proxmox-spamassassin [0] https://mcgrail.com/template/kam.cf_channel [1] https://lists.proxmox.com/pipermail/pmg-devel/2020-November/001397.html Stoiko Ivanov (4): add helper for parsing SA channel.d files api: spamassassin: read local channels api: spamassassin: update local channels pmg-daily: run sa-update for local channels src/PMG/API2/SpamAssassin.pm | 89 +++++++++++++++++++++--------------- src/PMG/Utils.pm | 58 +++++++++++++++++++++++ src/bin/pmg-daily | 9 +++- 3 files changed, 118 insertions(+), 38 deletions(-) -- 2.20.1