[pve-devel] [PATCH ha-manager] fix #1347: let postfix fill in FQDN in fence mails

Philip Abernethy p.abernethy at proxmox.com
Fri Sep 8 14:56:03 CEST 2017


Using the nodename is not correct and can lead to mails not forwarding
in restrictive mail server configurations.
---
 src/PVE/HA/Env/PVE2.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/HA/Env/PVE2.pm b/src/PVE/HA/Env/PVE2.pm
index fdfadd7..722d1b7 100644
--- a/src/PVE/HA/Env/PVE2.pm
+++ b/src/PVE/HA/Env/PVE2.pm
@@ -204,8 +204,8 @@ sub log {
 sub sendmail {
     my ($self, $subject, $text) = @_;
 
-    my $mailfrom = 'root@' . $self->nodename();
-    my $mailto = 'root at localhost';
+    my $mailfrom = 'root';
+    my $mailto = 'root';
 
     PVE::Tools::sendmail($mailto, $subject, $text, undef, $mailfrom);
 }
-- 
2.11.0





More information about the pve-devel mailing list