× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello,

I just wanted to make a few comments about the following:

  local-part
     The maximum total length of a user name or other local-part is 64
     characters.
  domain
     The maximum total length of a domain name or number is 255
     characters.

While it does say this, it also says the following:

    "Every implementation MUST be able to receive objects of at least
     these sizes."
and
    "To the maximum extent possible, implementation techniques which
     impose no limits on the length of these objects should be used."

In reality, the 255 bytes is a hard-and-fast rule, because DNS packets don't allow domain names longer than that to be looked up. But, for the local part, there's no such restriction.

The problem arises when someone has a longer address than that. If Outlook can handle a 400 character address, and Exchange and Sendmail will relay it, they won't care that that your application follows the technical specs of SMTP -- they'll complain that you're wrong.

(Try writing a Web page that works properly in Firefox but not Internet Explorer, even though it follows the RFCs exactly... you'll find out very quickly what I mean -- in spite of the fact that writing a page that works with IE but not Firefox is perfectly acceptible.)

Also, remember that it's telling you the size of TWO PARTS of the e-mail address. Making your field 319 chars long isn't correct unless you're positive that you'll only be storing those two parts in the database.

For example, the '@' character in the middle isn't part of that length.

Nor is the "ipv6:" prefix.

Nor are the < and > characters that often wrap an e-mail address.

Or the person's name, which often precedes it For example:
"Scott Klement <dude@xxxxxxxxxxx>" contains my name at the start -- which is not part of those two pieces.

However, it does give you a good starting point -- and e-mail names that exceed 320 characters are EXTREMELY rare. Still, I'd play it safe and make the field 500 or something like that. Use VARLEN(100) in your database since the vast majority of e-mail addresses are smaller than 100 so this'll run quick and not waste too much disk space.

Just my 2 cents.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.