We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33372
    • 1,611 Posts
    I’ve used DNS queries to check domains in the past, and I don’t recommend it (it would sometimes time out due to network issues when the domain was in fact valid).
      "Things are not what they appear to be; nor are they otherwise." - Buddha

      "Well, gee, Buddha - that wasn't very helpful..." - ZAP

      Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
      • 6016
      • 55 Posts
      About a 20-second timeout should be sufficient, and people are used to waiting that long after a form submission. If after 20 seconds we get no valid MX records, then we show an error message and invite the user to retry. The user can then click the submit button a second time. By then the local recursive DNS server’s cache should be filled and it will respond immediately. If a second try yields nothing, this is a very rare situation, occurring perhaps on time out of a thousand. The user may have to come back later, or perhaps enter an alternative email address.

      Looking on the bright side, if a spammer uses an invalid RHS, we will cause him to waste some time retrying.
        • 33372
        • 1,611 Posts
        Personally I’m not that worried about email addresses being invalid. I’m much more concerned about rejecting valid emails due to an outdated regex or a reverse DNS timeout. I think that your solution makes sense where it’s important that the email be valid, but I think even then I would prefer to make them reply to a confirmation email (since a valid email doesn’t mean it’s their email).
          "Things are not what they appear to be; nor are they otherwise." - Buddha

          "Well, gee, Buddha - that wasn't very helpful..." - ZAP

          Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
          • 30223
          • 1,010 Posts
          Quote from: BobRay at Jan 28, 2009, 05:29 PM

          I’d be glad to update SPForm if someone would suggest a good alternative test.

          Like BobRay I’m happy to implement an improved alternative, but for as far as I’m concerned a DNS check would not be part of that. In my experience this creates more complaints than the current regex solution. When I have a bit more time I’ll have a look around but for the mean time as has been said you easily implement your own validation function (without having to touch eForm itself)
            • 34017
            • 898 Posts
            I wouldnt want the MX record search to be the default. I wouldnt want to use it. Probably just get complaints from users/site owners. You could use ajax + a custom function easily to do this if it’s a requirement.
              Chuck the Trukk
              ProWebscape.com :: Nashville-WebDesign.com
              - - - - - - - -
              What are TV's? Here's some info below.
              http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
              http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008