diff options
author | James Wade <jpswade@gmail.com> | 2015-02-06 12:48:51 +0100 |
---|---|---|
committer | James Wade <jpswade@gmail.com> | 2015-02-06 12:48:51 +0100 |
commit | 3245af4adc8a271e9bb2eeef991dff7e879a427f (patch) | |
tree | 180956762a255f5e48718257d0a01fa3f7c43b55 /system/libraries | |
parent | db00b627b83cdba8564fb7e6fbf619e6182f4aa8 (diff) |
Fix HELO localhost.localdomain violates RFC standards
Diffstat (limited to 'system/libraries')
-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'] . ']'; } // -------------------------------------------------------------------- |