From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 7E3C91FF0B7 for ; Fri, 13 Nov 2026 16:13:19 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id D921A21A03; Fri, 13 Nov 2026 16:10:00 +0100 (CET) From: Lukas Wagner To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox-backup 43/55] notifications: don't ignore verification errors in legacy-sendmail mode Date: Fri, 13 Nov 2026 16:08:16 +0100 Message-ID: <20261113150828.756836-44-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261113150828.756836-1-l.wagner@proxmox.com> References: <20261113150828.756836-1-l.wagner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794582528475 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.206 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) 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 Message-ID-Hash: YZW4NFILLQFMKEHTLBALUDMKKYFSHYWV X-Message-ID-Hash: YZW4NFILLQFMKEHTLBALUDMKKYFSHYWV X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: A verification job that fails to verify some snapshots still returns Ok, with the failed snapshots in the returned list. The legacy-sendmail code path only checked result.is_ok(), so with 'notify=error' no mail was sent for such jobs, even though a 'verify-err' notification had been generated. Treat the job as successful only if the list of failed snapshots is empty, consistent with how the notification itself is built. Signed-off-by: Lukas Wagner --- src/server/notifications/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/notifications/mod.rs b/src/server/notifications/mod.rs index cd200a44d..21bec254b 100644 --- a/src/server/notifications/mod.rs +++ b/src/server/notifications/mod.rs @@ -256,7 +256,9 @@ pub fn send_verify_status( NotificationMode::LegacySendmail => { let notify = notify.verify.unwrap_or(Notify::Always); - if notify == Notify::Never || (result.is_ok() && notify == Notify::Error) { + if notify == Notify::Never + || (matches!(result, Ok(errors) if errors.is_empty()) && notify == Notify::Error) + { return Ok(()); } -- 2.47.3