Solved

Definition of valid e-mail address?

Posted on 1998-03-27
6
472 Views
Last Modified: 2010-04-21
What characters are allowed in an e-mail address to the left of the @ sign?  Are there characters which are not strictly correct, but do work and are used anyway?
0
Comment
Question by:gwilym
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 2009020
Any character is allowed, when properly quoted.
http://ds.internic.net/rfc/rfc822.txt
(And you can even have deliverable addresses which aren't RFC 822 compliant)
0
 

Author Comment

by:gwilym
ID: 2009021
What do you mean when you say that any character can be used if 'properly quoted'?  I know for instance that @ and space cannot be used.  Could you give me list of characters?  I'm writing a routine to just verify that the left bit doesn't contain any disallowed characters.
0
 
LVL 84

Expert Comment

by:ozo
ID: 2009022
Sorry, but
"@ and space"@domain.com
is a perfectly valid e-mail address, and verifying adresses is more complicated than just checking for disallowed characters.
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 84

Expert Comment

by:ozo
ID: 2009023
On the other hand, although valid, it is an unusual address.
And perhaps your routine may want to flag it anyway, to ask someone to confirm it.
I wouldn't know what characters you might want to use for that, since that may depend on what kinds of addresses your routine would typically see (maybe the ones you're interested in happen not to use @ or space, maybe they eschew the use of digits or capitals), on how willing you are to needlessly flag a valid address in order to avoid the risk of allowing a bad address, and on what kinds of invalid adresses your routine would be likely to encounter.
0
 
LVL 3

Accepted Solution

by:
braveheart earned 50 total points
ID: 2009024
Although not foolproof, over 99% of addresses will be validated correctly if you just limit the range of characters to alphanumeric characters, underscore and minus sign. Sure you can have any character if escaped properly but only a lunatic would bother to use anything outside of this range.
0
 
LVL 84

Expert Comment

by:ozo
ID: 2009025
As I said, you can decide what threshold of unusualness works best for you.
if you think your routine is more likely to see addresses like
-_-@experts-exchange.com
than
12345.6789@compuserve.com
then alphanumerics, underscore, and minus might work well for you.
(I'd hate to call anyone else a lunatic though. If spam address collectors are using that rule,
then I might see how having a luny address could be quite sensible:-)
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question