Re: [INTERNALS-WIN] mail() sending local hostname instead of fully-qualified hostname as HELO
| From: | Pierre Joye | Date: | Sat, 20 Jun 2009 08:53:36 +0000 |
| Subject: | Re: [INTERNALS-WIN] mail() sending local hostname instead of fully-qualified hostname as HELO | ||
| References: | 1 | Groups: | php.internals.win |
| Request: | Send a blank email to internals-win+get-513@lists.php.net to get a copy of this message | ||
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<rick@longbowgames.com> 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
>
>
--
Pierre
http://blog.thepimp.net | http://www.libgd.org