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 9CD48A8CB for ; Mon, 7 Aug 2023 15:07:02 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7D65E35900 for ; Mon, 7 Aug 2023 15:06:32 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 for ; Mon, 7 Aug 2023 15:06:31 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 857214314B for ; Mon, 7 Aug 2023 15:06:31 +0200 (CEST) From: Lukas Wagner To: pve-devel@lists.proxmox.com Date: Mon, 7 Aug 2023 15:06:11 +0200 Message-Id: <20230807130619.428423-1-l.wagner@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.053 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 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. [mail.rs, mod.rs, proxmox.com, lib.rs, sendmail.rs, config.rs, smtp.rs, notifications.pm, notify.rs] Subject: [pve-devel] [PATCH manager/docs/proxmox{, -perl-rs, -widget-toolkit} 0/8] notifications: add SMTP endpoint X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Aug 2023 13:07:02 -0000 This patch series adds support for a new notification endpoint type, smtp. As the name suggests, this new endpoint allows PVE to talk to SMTP server directly, without using the system's MTA (postfix). On the Rust side, these patches add a new dependency to the `lettre` crate for SMTP communication. This crate was chosen as it is: - by far the most popular mailing crate for Rust - well maintained - has reasonable dependencies - has async support, enabling us to asyncify the proxmox-notify crate at some point, if needed The proxmox-widget-toolkit, pve-manager and pve-docs patches require v6 of the original notification patches [1] series to be applied first. The patches for proxmox and proxmox-perl-rs are based of the latest master branch. [1] https://lists.proxmox.com/pipermail/pve-devel/2023-August/058618.html proxmox: Lukas Wagner (4): notify: add 'smtp' endpoint notify: add api for smtp endpoints notify: fix typo in doc comments notify: update d/control Cargo.toml | 1 + proxmox-notify/Cargo.toml | 4 +- proxmox-notify/debian/control | 22 +- proxmox-notify/src/api/mod.rs | 48 +++ proxmox-notify/src/api/smtp.rs | 373 ++++++++++++++++++++ proxmox-notify/src/config.rs | 23 ++ proxmox-notify/src/endpoints/common/mail.rs | 24 ++ proxmox-notify/src/endpoints/common/mod.rs | 2 + proxmox-notify/src/endpoints/mod.rs | 4 + proxmox-notify/src/endpoints/sendmail.rs | 22 +- proxmox-notify/src/endpoints/smtp.rs | 240 +++++++++++++ proxmox-notify/src/lib.rs | 30 +- 12 files changed, 772 insertions(+), 21 deletions(-) create mode 100644 proxmox-notify/src/api/smtp.rs create mode 100644 proxmox-notify/src/endpoints/common/mail.rs create mode 100644 proxmox-notify/src/endpoints/common/mod.rs create mode 100644 proxmox-notify/src/endpoints/smtp.rs proxmox-perl-rs: Lukas Wagner (1): notify: add bindings for smtp API calls common/src/notify.rs | 110 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) pve-manager: Lukas Wagner (1): notify: add API routes for smtp endpoints PVE/API2/Cluster/Notifications.pm | 337 ++++++++++++++++++++++++++++++ 1 file changed, 337 insertions(+) proxmox-widget-toolkit: Lukas Wagner (1): panel: notification: add gui for SMTP endpoints src/Makefile | 2 + src/Schema.js | 5 + src/panel/EmailRecipientPanel.js | 93 +++++++++++++++ src/panel/SendmailEditPanel.js | 69 ++--------- src/panel/SmtpEditPanel.js | 192 +++++++++++++++++++++++++++++++ 5 files changed, 300 insertions(+), 61 deletions(-) create mode 100644 src/panel/EmailRecipientPanel.js create mode 100644 src/panel/SmtpEditPanel.js pve-docs: Lukas Wagner (1): notifications: document SMTP endpoints notifications.adoc | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) Summary over all repositories: 20 files changed, 1547 insertions(+), 89 deletions(-) -- murpp v0.4.0