Empty Hostname
-
I was looking at our email logs and found that a bunch of messages 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 network name
In the /post-smtp/Postman/PostmanUtils.php file there’s a function called “getServerName” on line 484 that tries to get the server name from: $_SERVER[‘SERVER_NAME’]. The first if statement checks if $_SERVER exists and if it has a SERVER_NAME key, but it doesn’t check if the key actually has a value. In our case our server wasn’t setting the SERVER_NAME variable. This sounds like a pretty common issue. There’s a very similar function called “postmanGetServerName” on line 403 that also looks for the HTTP_HOST key, which did exist on our server. As a quick test fix I added “and $_SERVER[‘SERVER_NAME’]” to line 487. That change was able to get our emails going again. Have you seen a similar issue on other sites?
You must be logged in to reply to this topic.