Results 1 to 4 of 4

Thread: What makes an email valid

  1. #1
    Senior Member
    Join Date
    Feb 2003
    Posts
    282

    What makes an email valid

    Google searching gives me a bunch of premade email validators, and a few rules. If i examine the regular expressions in most email validators, I can extract a set of rules, but somewhere along the line someone must have had a document with the set of rules.

    I did look through RFC's 821 and 2822, did find section 3.4 Address specification but that did not seem to give me the rules for valid email.

    Email validators are all over the net, in javascript, php, vbScript, so they are no problem to find and understand. But im just curious of the actual rules that govern weather a email is valid or not.

    I discovered, that username@ip-address is valid but not acepted by many sites. I came across a usenet post, and it was stated whatever sendmail acepts is valid, but we know sendmail is not the only mail deamon.

    In my Google searches I did come across some rules.

    Valid characters are a-z 0-9 hiphen, underscore and dot. Must be at least 7 characters, can contain only one @. Extension (.com, .net...) can be 2 to 4 characters, . and @ cannot apear together. sub domain must have at least 2 letters. No spaces are alowed.

    Can someone please direct me.

  2. #2
    Senior Member
    Join Date
    Feb 2003
    Posts
    282
    I noticed that too, I went to sign up with http://myip.us/ and they told me i was useing an anonymous email and I cannot use hotmail, yahoo..other emails that are anonymous, and that my isp email would work,

    Id come across a email validator the other day that after validating the format, did a rDNS check on the domain to verify it exists. My idea is to extend this by also doing a finger, so if it is a registered isp email acount I should be able to get the finger information if the user realy exists.

    Thanks for your responce

  3. #3
    Leftie Linux Lover the_JinX's Avatar
    Join Date
    Nov 2001
    Location
    Beverwijk Netherlands
    Posts
    2,534
    Most (smart) isp's won't allow you to finger them !!

    but there are other sollutions, including googleing the email adress, that gives and indication of the validity too. .

    So a blacklist of email hosts (hotmail msn yahoo etc.) in combination with a rDNS and some other stuff might do the trick..
    ASCII stupid question, get a stupid ANSI.
    When in Russia, pet a PETSCII.

    Get your ass over to SLAYRadio the best station for C64 Remixes !

  4. #4
    Senior Member
    Join Date
    Feb 2003
    Posts
    282
    Thank you the_JinX for that tip. I did notice hotmail does not respond to a finger, but didnt realize some isps dont either. I can see why though, as a security feature.

    Just learned that php has a rdns, checkdnsrr that can check to see there is a MX record for the host in question. And that it is not suported in the windows version of php, so now im looking into a command line utility nslookup and to make my own checkdnsrr function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •