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]>
Added the explanation.  Thanks for your time!

-Rick-

Pierre Joye wrote:
> hi Rick,
> 
> Thanks for the detailed explanation :)
> 
> Can you add it to the bug report and re open it please? I have re opened it.
> 
> On Sat, Jun 20, 2009 at 4:06 AM, Rick Yorgason<[email protected]> wrote:
>> I just discovered that the Windows version of mail() sends the local
>> hostname instead of the fully-qualified hostname as the HELO parameter.
>>
>> It turns out this is a really old bug[1], and at the time it was
>> dismissed as being a bug in Windows, rather than a bug in PHP.
>>
>> I just wanted to point out that it's not actually a bug in Windows,
>> since the official documentation for Winsock[2] clearly states that the
>> name that the function returns "can be a simple host name, or it can be
>> a fully qualified domain name."  The error here seems to be that the
>> devs expected the function to act identically to the POSIX function of
>> the same name.  Actually, while the name returned by gethostname() is
>> *usually* a FQDN on a POSIX machine, I don't actually think it's guaranteed
>> there, either.
>>
>> I know this is a long shot, but is there any way the 'bogus' status
>> lifted on this bug?  I know it's frustrating that Winsock is
>> not-quite-compatible with POSIX, but this behaviour *is* fully
>> documented, and there *are* ways to get Winsock to return the FQDN.
>> (One of those ways is even listed in the bug report!  Granted, that's in C.
>>  An easy way to do it in pure PHP is, instead of just calling gethostname(),
>> call gethostbyaddr(gethostbyname(gethostname())).)
>>
>> Thanks,
>>
>> -Rick-
>>
>> [1] http://bugs.php.net/bug.php?id=38091
>> [2] http://msdn.microsoft.com/en-us/library/ms738527(VS.85).aspx
>>
>>
>> --
>> Windows Internals Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.