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 82F731FF0C0 for ; Wed, 18 Nov 2026 10:46:48 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id EDC33218CD; Wed, 18 Nov 2026 10:44:53 +0100 (CET) From: Lukas Wagner To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox v2 30/63] notify: don't pass uid when instantiating forwarded mail notifications Date: Wed, 18 Nov 2026 10:43:14 +0100 Message-ID: <20261118094348.273646-31-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: 1794995038669 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.195 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: MSEMMG5AZ5PZVOMPCHFLOBYMSD43AHJ3 X-Message-ID-Hash: MSEMMG5AZ5PZVOMPCHFLOBYMSD43AHJ3 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: In the future, forwarded mails will be sent by the notification worker, not proxmox-mail-forward. Sendmail shows a warning when called from a setuid process (such as proxmox-mail-forward). Previously the fix was to pass the real uid when spawning the sendmail process. With the worker process, this is not needed anymore. Signed-off-by: Lukas Wagner --- proxmox-notify/src/endpoints/sendmail.rs | 4 ++-- proxmox-notify/src/notification.rs | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/proxmox-notify/src/endpoints/sendmail.rs b/proxmox-notify/src/endpoints/sendmail.rs index 0bad792f7..e12fc4a20 100644 --- a/proxmox-notify/src/endpoints/sendmail.rs +++ b/proxmox-notify/src/endpoints/sendmail.rs @@ -63,8 +63,8 @@ impl Endpoint for SendmailEndpoint { Error::other_with_source("could not send mail via sendmail", err) }) } - Content::ForwardedMail { raw, uid, .. } => { - Mail::forward(&recipients_str, &mailfrom, raw, *uid).map_err(|err| { + Content::ForwardedMail { raw, .. } => { + Mail::forward(&recipients_str, &mailfrom, raw, None).map_err(|err| { Error::other_with_source("could not forward mail via sendmail", err) }) } diff --git a/proxmox-notify/src/notification.rs b/proxmox-notify/src/notification.rs index e814ce97f..187163d29 100644 --- a/proxmox-notify/src/notification.rs +++ b/proxmox-notify/src/notification.rs @@ -66,9 +66,6 @@ pub enum Content { ForwardedMail { /// Raw mail contents raw: Vec, - /// UID to use when calling sendmail - #[allow(dead_code)] // Unused in some feature flag permutations - uid: Option, }, } @@ -120,10 +117,9 @@ impl Notification { severity: Severity, raw_mail: Vec, fields: HashMap, - uid: Option, ) -> Result { Ok(Self { - content: Content::ForwardedMail { raw: raw_mail, uid }, + content: Content::ForwardedMail { raw: raw_mail }, metadata: Metadata { severity, additional_fields: fields, -- 2.47.3