From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <l.wagner@proxmox.com>
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 78519880D
 for <pve-devel@lists.proxmox.com>; Thu, 31 Aug 2023 13:07:01 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 4A2109007
 for <pve-devel@lists.proxmox.com>; Thu, 31 Aug 2023 13:06:30 +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 <pve-devel@lists.proxmox.com>; Thu, 31 Aug 2023 13:06:27 +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 A9B2A47B04
 for <pve-devel@lists.proxmox.com>; Thu, 31 Aug 2023 13:06:27 +0200 (CEST)
From: Lukas Wagner <l.wagner@proxmox.com>
To: pve-devel@lists.proxmox.com
Date: Thu, 31 Aug 2023 13:06:21 +0200
Message-Id: <20230831110621.340832-12-l.wagner@proxmox.com>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230831110621.340832-1-l.wagner@proxmox.com>
References: <20230831110621.340832-1-l.wagner@proxmox.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -1.036 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_ASCII_DIVIDERS 0.8 Email that uses ascii formatting dividers and possible
 spam tricks
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 KAM_LINEPADDING           1.2 Spam that tries to get past blank line filters
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: [pve-devel] [PATCH pve-docs 11/11] notification: add docs for
 system mail forwarding
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Thu, 31 Aug 2023 11:07:01 -0000

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 notifications.adoc | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/notifications.adoc b/notifications.adoc
index c4d2931..0b00b1e 100644
--- a/notifications.adoc
+++ b/notifications.adoc
@@ -19,9 +19,10 @@ such as:
 | `fencing`         | The {pve} HA manager has fenced a node  | `error`
 | `replication`     | A storage replication job has failed    | `error`
 | `vzdump`          | vzdump backup finished                  | `info` (`error` on failure)
+| `system-mail`     | An email was sent to the local root user| `error`
 |===========================================================================
 
-In the 'Notification' panel of the datacenter view, the system's behavior can be
+In the 'Notifications' panel of the datacenter view, the system's behavior can be
 configured for all events except backup jobs. For backup jobs,
 the settings can be found in the respective backup job configuration.
 For every notification event there is an option to configure the notification
@@ -151,9 +152,22 @@ included in the group. If a group/endpoint is configured to
 use a filter, the user must have the `Mapping.Use` permission for the filter
 as well.
 
-
-
-
-
-
-
+System Mail Forwarding
+---------------------
+
+Certain local system daemons, such as `smartd`, generate notification emails
+that are initially directed to the local `root` user. {pve} will
+forward these emails to a customizable notification target.
+
+By default, these emails are sent to the email address that is configured for
+the `root@pam` user using the predefined `mail-to-root` notification target.
+However, similar to any other notification event, this behavior can be
+adjusted within the 'Notifications' panel by making changes to the
+'System Mail' setting.
+
+When the forwarding process involves an email-based target
+(like `sendmail` or `smtp`), the email is forwarded exactly as received, with all
+original mail headers remaining intact. For all other targets,
+the system tries to extract both a subject line and the main text body
+from the email content. In instances where emails solely consist of HTML
+content, they will be transformed into plain text format during this process.
-- 
2.39.2