[pmg-devel] [PATCH 1/2] pmgreport: add FQDN into mailfrom postmaster address

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jan 30 14:26:08 CET 2020


as requested in the german forum[0], lets add some information in the mail from
header, to allow easier filtering and mapping reports to hosts.

[0]: https://forum.proxmox.com/threads/status-report-sender-namen-adresse-%C3%A4ndern.64379/

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 src/PMG/CLI/pmgreport.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PMG/CLI/pmgreport.pm b/src/PMG/CLI/pmgreport.pm
index c863fb3..9c05fe0 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 <postmaster>";
+	my $mailfrom = "Proxmox Mail Gateway <postmaster\@$fqdn>";
 	PMG::Utils::finalize_report($tt, 'pmgreport.tt', $vars, $mailfrom, $email, $param->{debug});
 
 	return undef;
-- 
2.20.1




More information about the pmg-devel mailing list