Re: Trailing dot in email (Was: Re: Possible bug according to Rasmus Leerdorf)

On Sun, Apr 4, 2010 at 10:24 PM, Lars Gunther wrote:
> 2010-04-04 18:07, Lars Gunther skrev:
>>
>> http://www.w3.org/Bugs/Public/show_bug.cgi?id=9404
>
> My bug was marked a duplicate to this one:
>
> http://www.w3.org/Bugs/Public/show_bug.cgi?id=9392
>
> Which in turn was marked invalid. It seems this behaviour is intentional:
>
> http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-August/022486.html
>
> I will probably raise this to an issue, since the "hard data" in this case
> is ambiguous and thus hardly something we can use to break an RFC.

RFC2822 doesn't place any rule on what a local-part can be, it's just
that it must be quoted if it doesn't match the dot-atom syntax.
I had an address whose local-part was ".tom." and it worked very well,
except for those badly-authored web forms that chose to rule it out.
In mails, it had to be written, according to the RFC,
".tom."@blahblahblah but it's just a matter of syntax and escaping.
See:
http://tools.ietf.org/html/rfc2822#section-3.4
http://tools.ietf.org/html/rfc1123#page-56
http://tools.ietf.org/html/rfc822#section-6 (note that 'word' can be a
'quoted-string')

Note that I also used that email address with NNTP without any problem
either. Clients and servers hadn't any problem (that I know of) with
this address, only some web forms.

> Rasmus Leerdorf has just submitted fixes to FILTER_VALIDATE_EMAIL for
> PHP.
> This will make the use of trailing dots invalid according to the recommended
> test for the most widely deployed server-side scripting language.

Than point him to this message in the archives and ask him to revert
the change: local-part are "opaque" and should only be interpreted by
the server(s) at the domain-part:
"""
5.2.16  RFC-822  Local-part: RFC-822 Section 6.2

         The basic mailbox address specification has the form: "local-
         part@domain".  Here "local-part", sometimes called the "left-
         hand side" of the address, is domain-dependent.

         A host that is forwarding the message but is not the
         destination host implied by the right-hand side "domain" MUST
         NOT interpret or modify the "local-part" of the address.
"""
-- http://tools.ietf.org/html/rfc1123#page-56

I can't see any reason that this would be different for web forms used
to collect email addresses (I'd just expect them to quote the
local-part if it doesn't match the 'atom' production)

-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/

Received on Monday, 5 April 2010 08:58:30 UTC