From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <m.sandoval@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) server-digest SHA256)
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 15F349570D
 for <pmg-devel@lists.proxmox.com>; Tue, 27 Feb 2024 11:33:41 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id F18661B28E
 for <pmg-devel@lists.proxmox.com>; Tue, 27 Feb 2024 11:33:40 +0100 (CET)
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
 for <pmg-devel@lists.proxmox.com>; Tue, 27 Feb 2024 11:33:37 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 586694775B
 for <pmg-devel@lists.proxmox.com>; Tue, 27 Feb 2024 11:33:37 +0100 (CET)
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pmg-devel@lists.proxmox.com
Date: Tue, 27 Feb 2024 11:33:35 +0100
Message-Id: <20240227103335.193474-1-m.sandoval@proxmox.com>
X-Mailer: git-send-email 2.39.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.018 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_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 -
Subject: [pmg-devel] [PATCH pmg-docs v2] dkim: document dkim_use_domain
X-BeenThere: pmg-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Mail Gateway development discussion
 <pmg-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pmg-devel>, 
 <mailto:pmg-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pmg-devel/>
List-Post: <mailto:pmg-devel@lists.proxmox.com>
List-Help: <mailto:pmg-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel>, 
 <mailto:pmg-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Tue, 27 Feb 2024 10:33:41 -0000

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
Differences from v1:
 - Add links to RFCs
 - Use `+` for new lines in the same section

 asciidoc/asciidoc-pmg.conf |  3 +++
 pmgconfig.adoc             | 12 ++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/asciidoc/asciidoc-pmg.conf b/asciidoc/asciidoc-pmg.conf
index 45ea7dd..6c9f0bb 100644
--- a/asciidoc/asciidoc-pmg.conf
+++ b/asciidoc/asciidoc-pmg.conf
@@ -21,7 +21,10 @@ clamav=https://www.clamav.net[ClamAV(R)]
 debian=https://www.debian.org[Debian]
 debian_nonfree_archive_area=https://www.debian.org/doc/debian-policy/ch-archive#the-non-free-archive-area[Debian's non-free archive area]
 tts=http://www.template-toolkit.org[Template Toolkit]
+smtp_rfc=https://tools.ietf.org/html/rfc5321[RFC 5321]
+rfc_5322=https://tools.ietf.org/html/rfc5322[RFC 5322]
 dkim_rfc=https://tools.ietf.org/html/rfc6376[RFC 6376]
+dmarc_rfc=https://tools.ietf.org/html/rfc7489[RFC 7489]
 ifndef::docinfo1[]
 author=Proxmox Server Solutions GmbH
 email=support@proxmox.com
diff --git a/pmgconfig.adoc b/pmgconfig.adoc
index bf3887e..33d35fb 100644
--- a/pmgconfig.adoc
+++ b/pmgconfig.adoc
@@ -585,6 +585,18 @@ Controls whether all outbound mail should get signed or only mails from domains
 listed in `/etc/pmg/dkim/domains`, if it exists and `/etc/pmg/domains`
 otherwise.
 
+Select Signing Domain::
+
+Determines whether to DKIM sign emails using the domain found in the envelope
+from or the from header in the body of the email. The envelope from is also
+known as reverse-path, see {smtp_rfc} section 3.3 and {rfc_5322} section 3.6.2.
++
+The envelop from of certain emails, bounces for example, can be empty. In these
+cases it is desirable to sign them using the domain found in the from header.
++
+Additionally, DMARC (see {dmarc_rfc} section 3.1.1) needs the domain found in
+the from header in certain situations.
+
 These settings are saved to the 'admin' subsection in `/etc/pmg/pmg.conf`,
 using the following configuration keys:
 
-- 
2.39.2