Re: [INTERNALS-WIN] mail() sending local hostname instead of fully-qualified hostname as HELO
| From: | Rick Yorgason | Date: | Fri, 26 Jun 2009 16:45:24 +0000 |
| Subject: | Re: [INTERNALS-WIN] mail() sending local hostname instead of fully-qualified hostname as HELO | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals.win |
| Request: | Send a blank email to internals-win+get-522@lists.php.net to get a copy of this message | ||
Hi Kalle,
I've created a new patch which makes the following changes:
* Fixes a small bug in your last patch which would inadvertently set the host name to "]".
* Performs some overflow checks.
* It turns out that host names are technically allowed to start with (or even be entirely composed of) numbers, so I've taken your suggestion and used inet_pton for better IP detection.
Here's the patch:
http://pastie.org/525609
I've tested it by forcing ent->h_name to an IPv4 or IPv6 number, and all three scenarios (including not forcing it) seem to provide valid data.
Cheers,
-Rick-