[TYPO3-core] Another patch request for t3lib_htmlmail
Stanislas Rolland
stanislas.rolland at fructifor.ca
Thu Jan 26 17:48:28 CET 2006
Hi Michael,
>>> 2. I don't like the hostname detection:
>>>
>>> - $this->messageid = md5(microtime()).'@domain.tld';
>>> + $localhost = gethostbyaddr('127.0.0.1');
>>> + if (!$localhost || $localhost == '127.0.0.1' ||
>>> $localhost == 'localhost') $localhost = md5($TYPO3_CONF_VARS['SYS'
>>> ['sitename']).'.TYPO3';
>>> + $this->innerMessageid = md5(microtime()) . '@' .
>>> $localhost;
>>>
>>> Please use the output of php_uname('n') instead.
>>>
>> What is wrong with the hostname detection? This has been tested on many
>> installations for many months now, I would be hesitant to change it at
>> this time.
>>
>
> Of course it will work because the value is most likely a unique one.
> However, you are not specifiying the true hostname of the mail server, but
> a custom string which is additionally md5sum()-ed at the end. Thus, the
> output is not self-explaining anymore.
>
> I don't have the RFC right here but think that the hostname part of a
> message-ID must be a valid host.
>
From RFC 2822:
[...]
The message identifier (msg-id) is similar in syntax to an angle-addr
construct without the internal CFWS.
message-id = "Message-ID:" msg-id CRLF
in-reply-to = "In-Reply-To:" 1*msg-id CRLF
references = "References:" 1*msg-id CRLF
msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS]
id-left = dot-atom-text / no-fold-quote / obs-id-left
id-right = dot-atom-text / no-fold-literal / obs-id-right
The "Message-ID:" field provides a unique message identifier that
refers to a particular version of a particular message. The
uniqueness of the message identifier is guaranteed by the host that
generates it (see below). This message identifier is intended to be
machine readable and not necessarily meaningful to humans. A message
identifier pertains to exactly one instantiation of a particular
message; subsequent revisions to the message each receive new message
identifiers.
[...]
4.5.4. Obsolete identification fields
[...]
obs-id-right = domain
Regards,
Sanislas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060126/a3265ee1/attachment.html
More information about the TYPO3-team-core
mailing list