[TYPO3-core] RFC: bug #7784: Check for mail configuration is wrong on Windows

Dmitry Dulepov [typo3] dmitry at typo3.org
Wed Mar 26 09:35:53 CET 2008


Martin Kutschker wrote:
> Dmitry Dulepov [typo3] schrieb:
>>>
>>> The localhost check will fail on machine with an IPv6 interface. AT 
>>> least I think so, I have not seen such a machine in real life.
> 
> I'm tlaking about this:
> 
> if ($smtp_addr == '127.0.0.1' && $_SERVER['SERVER_ADDR'] == '127.0.0.1')
> 
> In my second reading I also wonder now why you check the content of 
> $_SERVER['SERVER_ADDR']? The machine may have a) an IP address and b) 
> you may access it via HTTP from anaother machine and still could c) SMPT 
> be set to localhost.

Becase SERVER_ADDR is server IP address, not client address. This check is for developer computers. Developers typically work on localhost and they may want to use mail functions. Default PHP installation sets STMP to 127.0.0.1. But people normally do not install SMTP server on their computers. So I check if server address is localhost and SMTP is set to localhost and warn that they may have a problem: SMTP points locally but SMTP server may not be there. However if server address is real, most likely it is not development computer and SMTP server actually may be there.

> So I think this is sufficient:
> 
> if ($smtp_addr == '127.0.0.1' || $smtp_addr == '::1') ...

I do not think so. This skips important and most typical problem with missing local SMTP server.

> And there seems to be a typo in this message:
> 
> "Mail configuration is not setPHP mail() function requires SMTP and 
> smtp_port to have correct values on Windows."
> 
> I suggest (set->valid plus punctuation):

Well, valid is a strong word, so I wanted to use "set". But fine, I can use "valid" :)

There should be a new line between "set" and "PHP" (special processing in install module for new lines). Missed it showhow... Fixed locally.

-- 
Dmitry Dulepov
TYPO3 core team
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
"Nothing is impossible. There are only limits to our knowledge"


More information about the TYPO3-team-core mailing list