diff options
author | Andrey Andreev <narf@devilix.net> | 2015-02-06 13:44:37 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-02-06 13:44:37 +0100 |
commit | acfc10868d417c49370ce0bfab977445d2590e1c (patch) | |
tree | 180956762a255f5e48718257d0a01fa3f7c43b55 /system/libraries/Email.php | |
parent | db00b627b83cdba8564fb7e6fbf619e6182f4aa8 (diff) | |
parent | 3245af4adc8a271e9bb2eeef991dff7e879a427f (diff) |
Merge pull request #3573 from jpswade/develop
Fix HELO localhost.localdomain violates RFC standards
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r-- | system/libraries/Email.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 4e0e0cd9f..43dbe28b4 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -2171,12 +2171,16 @@ class CI_Email { /** * Get Hostname - * + * + * There are only two legal types of hostname either a fully qualified domain + * name (eg: "mail.example.com") or an "IP literal" (eg: "[1.2.3.4]"). + * + * @link http://cbl.abuseat.org/namingproblems.html * @return string */ protected function _get_hostname() { - return isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost.localdomain'; + return isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '[' . $_SERVER['SERVER_ADDR'] . ']'; } // -------------------------------------------------------------------- |