From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 9B4F01FF0C0 for ; Wed, 18 Nov 2026 10:48:04 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id D5AE121A3C; Wed, 18 Nov 2026 10:44:57 +0100 (CET) From: Lukas Wagner To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox-backup v2 45/63] notifications: don't ignore verification errors in legacy-sendmail mode Date: Wed, 18 Nov 2026 10:43:29 +0100 Message-ID: <20261118094348.273646-46-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261118094348.273646-1-l.wagner@proxmox.com> References: <20261118094348.273646-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: 1794995040718 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.192 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: BMWFH74Y4AACXFWHAWEBRUBIBTUTLPAD X-Message-ID-Hash: BMWFH74Y4AACXFWHAWEBRUBIBTUTLPAD 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