mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Merge branch '3.3.x'
This commit is contained in:
commit
d25e5f6360
1 changed files with 6 additions and 6 deletions
|
@ -1417,22 +1417,22 @@ class smtp_class
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
// Here we try to determine the *real* hostname (reverse DNS entry preferrably)
|
// Here we try to determine the *real* hostname (reverse DNS entry preferrably)
|
||||||
$local_host = $user->host;
|
if (function_exists('php_uname') && !empty($local_host = php_uname('n')))
|
||||||
|
|
||||||
if (function_exists('php_uname'))
|
|
||||||
{
|
{
|
||||||
$local_host = php_uname('n');
|
|
||||||
|
|
||||||
// Able to resolve name to IP
|
// Able to resolve name to IP
|
||||||
if (($addr = @gethostbyname($local_host)) !== $local_host)
|
if (($addr = @gethostbyname($local_host)) !== $local_host)
|
||||||
{
|
{
|
||||||
// Able to resolve IP back to name
|
// Able to resolve IP back to name
|
||||||
if (($name = @gethostbyaddr($addr)) !== $addr)
|
if (!empty($name = @gethostbyaddr($addr)) && $name !== $addr)
|
||||||
{
|
{
|
||||||
$local_host = $name;
|
$local_host = $name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$local_host = $user->host;
|
||||||
|
}
|
||||||
|
|
||||||
// If we are authenticating through pop-before-smtp, we
|
// If we are authenticating through pop-before-smtp, we
|
||||||
// have to login ones before we get authenticated
|
// have to login ones before we get authenticated
|
||||||
|
|
Loading…
Add table
Reference in a new issue