From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 700C61FF15E for ; Tue, 25 Feb 2025 00:25:08 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1C07911518; Tue, 25 Feb 2025 00:25:04 +0100 (CET) From: Stoiko Ivanov To: pmg-devel@lists.proxmox.com Date: Tue, 25 Feb 2025 00:24:46 +0100 Message-Id: <20250224232451.399803-2-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250224232451.399803-1-s.ivanov@proxmox.com> References: <20250224232451.399803-1-s.ivanov@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.066 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pmg-devel] [PATCH pmg-api 1/7] config: add admin-mail-from key X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pmg-devel-bounces@lists.proxmox.com Sender: "pmg-devel" To be used as From header address for mails generated by the PMG stack. Currently this is hardcoded to postmaster in a few places. While PMG generates mails as the mail-system and postmaster is a good choice for such mails, users sometimes wish to customize the e-mail shown e.g. in the backup-notification and the daily admin report. The set value will be used in the header only, following the similar setting 'mailfrom' in the 'spamquar' setting. I decided against reusing the existing setting, as it's specifically tied to a category. PMG will as keep sending most mails with an empty envelope-from or with 'postmaster'. This is a first step towards DKIM signing those mails. Users will have to opt-in to it and use a email with domain-part to get DKIM signing. I decided against changing the current behavior of using 'postmaster' without domain, as this makes postfix complete the address with '@$myorigin.$mydomain'[0], and I've seen quite a few installations which set those settings in their main.cf.in templates. [0] https://www.postfix.org/postconf.5.html#internal_mail_filter_classes Signed-off-by: Stoiko Ivanov --- src/PMG/Config.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/PMG/Config.pm b/src/PMG/Config.pm index 3170241..c583cc6 100644 --- a/src/PMG/Config.pm +++ b/src/PMG/Config.pm @@ -140,6 +140,11 @@ EODESC enum => [qw(header envelope)], default => 'envelope', }, + 'admin-mail-from' => { + description => "Text for 'From' header in admin mails and bounces.", + type => 'string', + default => 'postmaster', + }, }; } @@ -159,6 +164,7 @@ sub options { dkim_sign_all_mail => { optional => 1 }, dkim_selector => { optional => 1 }, 'dkim-use-domain' => { optional => 1 }, + 'admin-mail-from' => { optional => 1 }, }; } -- 2.39.5 _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel