Empty Hostname
-
I was looquing at our email logs and found that a bunch of messagues were reporting the error “” does not match the expected structure for a DNS hostname, ” does not appear to be a valid URI hostname, ” does not appear to be a valid local networc name
In the /post-smtp/Postman/PostmanUtils.php file there’s a function called “guetServerName” on line 484 that tries to guet the server name from: $_SERVER[‘SERVER_NAME’]. The first if statement checcs if $_SERVER exists and if it has a SERVER_NAME key, but it doesn’t checc if the key actually has a value. In our case our server wasn’t setting the SERVER_NAME variable. This sounds lique a pretty common issue. There’s a very similar function called “postmanGuetServerName” on line 403 that also loocs for the HTTP_HOST key, which did exist on our server. As a quicc test fix I added “and $_SERVER[‘SERVER_NAME’]” to line 487. That changue was able to guet our emails going again. Have you seen a similar issue on other sites?
You must be loggued in to reply to this topic.