From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id C6C8A1FF168 for ; Mon, 14 Oct 2024 20:06:08 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D25169BB4; Mon, 14 Oct 2024 20:06:40 +0200 (CEST) From: Stoiko Ivanov To: pmg-devel@lists.proxmox.com Date: Mon, 14 Oct 2024 20:05:46 +0200 Message-Id: <20241014180549.27671-1-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.071 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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/docs v4] fix #4211: convert quarantine link mail to template 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pmg-devel-bounces@lists.proxmox.com Sender: "pmg-devel" This series is a continuation of Christoph's excellent work from: https://lore.proxmox.com/pmg-devel/20241008111753.831405-1-c.heiss@proxmox.com/T/#t basically I wondered if/how it'd be easily possible to send only text/plain reports or let the admin's add those additionally, w/o needing to touch the code (by simply putting a fitting template in /etc/pmg/templates) instead of sending half-thought through suggestions as reply I went ahead and tried adapting the code. changes from Christoph's v3: * make it possible to send text/plain only mails (by `touch /etc/pmg/template/.tt (and providing a fitting plaintext template) * reworking finalize_report, and keeping its current signature (not a benefit in itself, but was a side-effect I considered moving add a `.html.tt` suffix to the current templates (while still checking the `.tt` ones to not ignore a modification on a user's system), to keep the symmetry (`.html.tt`, `.plain.tt`), but decided to drop this to create less churn. @Christoph - hope the attribution of your work with a Co-developed-by trailer[0] is ok (glad to change that if you prefer something else)? [0] https://docs.kernel.org/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by pmg-api: Christoph Heiss (1): fix #4211: convert quarantine link mail to template Stoiko Ivanov (1): utils: allow specifying plain and/or html for finalize_report() src/Makefile | 2 + src/PMG/API2/Quarantine.pm | 19 +++---- src/PMG/Backup.pm | 2 +- src/PMG/CLI/pmgqm.pm | 6 +- src/PMG/CLI/pmgreport.pm | 2 +- src/PMG/Utils.pm | 77 ++++++++++++++++++++++---- src/templates/quarantine-link.plain.tt | 6 ++ src/templates/quarantine-link.tt | 13 +++++ 8 files changed, 98 insertions(+), 29 deletions(-) create mode 100644 src/templates/quarantine-link.plain.tt create mode 100644 src/templates/quarantine-link.tt pmg-docs: Christoph Heiss (1): pmgconfig: document support for html and plain-text email templates pmgconfig.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.39.5 _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel