Re: [INTERNALS-WIN] mail() sending local hostname instead of fully-qualified hostname as HELO
[email protected] (Rick Yorgason)
| Newsgroups | php.internals.win |
|---|---|
| Message-ID | <[email protected]> |
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-