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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id BC38870709 for ; Tue, 14 Jun 2022 09:38:36 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AC6441B4A9 for ; Tue, 14 Jun 2022 09:38:36 +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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 88A171B49E for ; Tue, 14 Jun 2022 09:38:35 +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 6497D43016 for ; Tue, 14 Jun 2022 09:38:35 +0200 (CEST) Date: Tue, 14 Jun 2022 09:38:34 +0200 From: Wolfgang Bumiller To: Stefan Sterz Cc: pbs-devel@lists.proxmox.com Message-ID: <20220614073834.u32mnstha6n2evid@casey.proxmox.com> References: <20220331093655.576942-1-s.sterz@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220331093655.576942-1-s.sterz@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.316 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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 T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [certificates.rs] Subject: Re: [pbs-devel] [PATCH proxmox-backup v2] fix #3867: server/api: send emails on certificate renewal failure X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2022 07:38:36 -0000 needs a rebase also a note inline... On Thu, Mar 31, 2022 at 11:36:55AM +0200, Stefan Sterz wrote: > the superuser's email will be used to notify them that certificate > renewal has failed. > > Signed-off-by: Stefan Sterz > --- > src/api2/node/certificates.rs | 22 +++++++++---- > src/server/email_notifications.rs | 54 ++++++++++++++++++++++++++++++- > 2 files changed, 69 insertions(+), 7 deletions(-) > (...) > diff --git a/src/server/email_notifications.rs b/src/server/email_notifications.rs > index 4d734368..6fffefd3 100644 > --- a/src/server/email_notifications.rs > +++ b/src/server/email_notifications.rs > @@ -543,6 +557,42 @@ pub fn send_updates_available( > Ok(()) > } > > +/// send email on certificate renewal failure. > +/// `notify` currently only accepts `Notify::Error`. > +pub fn send_certificate_renewal_mail( > + notify: Notify, I think it's better to actually just drop the `notify` parameter rather than hardcoding an unchangable value. That way if we add support for it you'll automatically get errors at all the call-sites from the compiler. > + result: &Result<(), Error>, > +) -> Result<(), Error> { (...)