From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id CC4661FF15E for ; Tue, 25 Feb 2025 13:55:41 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5E68B1CBDE; Tue, 25 Feb 2025 13:55:41 +0100 (CET) Date: Tue, 25 Feb 2025 13:55:07 +0100 From: Stoiko Ivanov To: Dominik Csapak Message-ID: <20250225135507.535cd440@rosa.proxmox.com> In-Reply-To: <82a99898-cdb3-4eb0-bebc-7759a1d23290@proxmox.com> References: <20250224232451.399803-1-s.ivanov@proxmox.com> <20250224232451.399803-3-s.ivanov@proxmox.com> <82a99898-cdb3-4eb0-bebc-7759a1d23290@proxmox.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.067 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [pmgreport.pm, backup.pm, smtp.pm] Subject: Re: [pmg-devel] [PATCH pmg-api 2/7] reports: use admin-mail-from as from header 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: , Cc: pmg-devel@lists.proxmox.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pmg-devel-bounces@lists.proxmox.com Sender: "pmg-devel" On Tue, 25 Feb 2025 11:32:49 +0100 Dominik Csapak wrote: > On 2/25/25 00:24, Stoiko Ivanov wrote: > > this sets the admin-mail-from header information for all local emails > > generated through the templateing system, which are not already using > > the 'mailfrom' setting from the 'spamquar' config-section. > > > > Signed-off-by: Stoiko Ivanov > > --- > > src/PMG/Backup.pm | 2 +- > > src/PMG/CLI/pmgreport.pm | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/src/PMG/Backup.pm b/src/PMG/Backup.pm > > index c820d6b..99b9a57 100644 > > --- a/src/PMG/Backup.pm > > +++ b/src/PMG/Backup.pm > > @@ -417,7 +417,7 @@ sub send_backup_notification { > > > > my $tt = PMG::Config::get_template_toolkit(); > > > > - my $mailfrom = "Proxmox Mail Gateway "; > > + my $mailfrom = $cfg->get('admin', 'admin-mail-from', 1) // "Proxmox Mail Gateway "; > > we use 'Proxmox Mail Gateway ' here as default but '' / 'postmaster' > elsewhere. But the user can only configure it one time with the same > value set for all. > > Couldn't we also set 'Proxmox Mail Gateway ' as default and use that everywhere? > Then we could use the default from the config instead of setting the default manually everywhere? Looking through the changes in the series - the places where we use 'postmaster' (w/o "Proxmox Mail Gateway ") in the from-header are: * Notification mails. * generate_ndr in SMTP.pm (before-queue-filtering blocking mails only for part of the receivers and generate_ndr_on_block set) I think this change in behavior is acceptable (Notifications - and would rewrite it that way (should make things a bit shorter too) Thanks for the tip! > > > PMG::Utils::finalize_report($tt, 'backup-notification', $vars, $mailfrom, $email); > > > > } > > diff --git a/src/PMG/CLI/pmgreport.pm b/src/PMG/CLI/pmgreport.pm > > index 0d7fcc8..39a2309 100644 > > --- a/src/PMG/CLI/pmgreport.pm > > +++ b/src/PMG/CLI/pmgreport.pm > > @@ -358,7 +358,7 @@ __PACKAGE__->register_method ({ > > return undef; > > } > > > > - my $mailfrom = "Proxmox Mail Gateway "; > > + my $mailfrom = $cfg->get('admin', 'admin-mail-from', 1) // "Proxmox Mail Gateway "; > > PMG::Utils::finalize_report($tt, 'pmgreport', $vars, $mailfrom, $email, $param->{debug}); > > > > return undef; > > _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel