The dot at the end of a domain name makes it "absolute" (at least in some situations). Without the final dot, the local domain can be appended to it when trying to resolve it. Compare "nslookup www" vs. "nslookup www." if you are in a domain with a web server, for example ("dig" here appears to just assume a trailing dot if you leave it off). Funnily enough, RFC 2822 doesn't appear to allow a trailing dot (though I didn't read up on the obsolete bits).

I think, rather, that it's better justified on the grounds that the few mistakes aren't worth the extra work to avoid them.

It isn't particularly hard to not ignore case only in front of the @. The reason you should ignore case there (but preserve it) is that if you have two addresses that agree except for the case of some letters to the left of the @, the possibilities and their odds are:

near 0
The two addresses are different and both valid
>> 90%
The two addresses are the same
<< 10%
One address is valid and the other is invalid

So handling the over-90% case correctly is a much better idea than handling the near-0% case correctly. For the under-10% case, the choice doesn't matter much, but even there the "ignore case" choice is likely more convenient for the humans involved (who may well know that they can't successfully send e-mail to ExpertSexchange@example.com, only to ExpertsExchange@example.com, but that is no reason to not recognize which account they want a password reminder for when they enter "expertsexchange@example.com" in the web form).

Or perhaps you meant that it is too much trouble to try to determine if some particular e-mail host ignores case or not. That certainly would be a lot of trouble and I certainly see no point in trying. :) Especially since there is still benefit to ignoring case even in addresses for e-mail hosts that don't. Actually, even if I could conveniently determine if a particular e-mail host ignores case or not, I wouldn't use that information. Just because the person who runs that host puts their users through such pain doesn't mean that I should extend that pain to them when they interact with my system.

Yes, one of my coworkers went to rjbs' talk and the Email::Address comments that I quoted elsewhere are signed "--rjbs". We'll likely review that material again before this is over.

- tye        


In reply to Re^2: Practical e-mail address validation (case) by tye
in thread Practical e-mail address validation by tye

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.