diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 55dbf9991..d255c65c4 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -4072,6 +4072,10 @@ if (!$main::get_system_hostname[$m]) { $fromfile = $hn; } } + if ($hn =~ /localhost/) { + # Not likely to be valid + $hn = $fromfile = undef; + } # Append domain name from DNS config if needed if ($fromfile && $fromfile !~ /\./) {