Tony Posted November 18, 2002 Posted November 18, 2002 Hi All This is probably discussed somewhere but since I get zero search results, I've had to ask. I've just tried to add my own email address to an new account as a trial and I get an invalid email address message. The email address is valid but perhaps is not a common enough domain. i.e. it ends with .bpa.nu which is a freebie domain system here in Oz. So my question is, what is the email validation routine that rejects this address, or is there an option that I have yet to find, or have I got a misconfiguration in the setup. TIA cheersTony******************************My oscMax Store RecoverToy :: Antique Toy Car PartsTony's Tech BlogWrenMaxwell WebManagement******************************
Jan0815 Posted November 18, 2002 Posted November 18, 2002 In email options you can disable the DNS-lookup. That should solve your problem. HTH You can't have everything. That's why trains have difficulty crossing oceans, and hippos did not adapt to fly. -- from the OpenBSD mailinglist.
Tony Posted November 18, 2002 Author Posted November 18, 2002 Hi jan Thanks, I have checked that and I am not sure why this should work/fail. The domain name is a valid domain and dig/nslookup finds it. However, what interests me even more now is that having left the customer register screen sitting with the error message I returned to the admin area in another browser and within the customer lookup the account exists. Hence I assume that even though the email was rejected the database was actually updated with the new record. I have since closed all browsers and then logged in as the user without any problem. I have not looked at the code as yet but it appears that there is some bug in the way it handles this error. cheersTony******************************My oscMax Store RecoverToy :: Antique Toy Car PartsTony's Tech BlogWrenMaxwell WebManagement******************************
Jan0815 Posted November 18, 2002 Posted November 18, 2002 The validation is being handled by the file catalog/includes/functions/validations.php. You can take a look at how this routine handles your mail address and why the error occures. As I do not have your full mail address you used I cannot replicate the behaviour you experienced. HTH You can't have everything. That's why trains have difficulty crossing oceans, and hippos did not adapt to fly. -- from the OpenBSD mailinglist.
Tony Posted November 19, 2002 Author Posted November 19, 2002 Hi Hmmm... ok I have looked and I am not a php or regex guru, but from what I can read it seems that the email address is split into segments based on the '.' and if there is a two char rightmost segment then it is ignored and treated as a country code. Once this is truncated from the address then the rightmost segment is compared to this list. case 'com': case 'net': case 'org': case 'gov': case 'edu': case 'int': case 'biz': case 'mil': case 'info': case 'name': case 'aero': case 'coop': case 'museum': Naturally, if the top-most domain is a two character domain (i.e 'nu' which is a global top-level domain for 'network-users') then this is scrapped as a country code, leaving the next section to be tested as a top-level domain against the list. But if I add the bpa or nu sections of my domain name to the list it still fails, so I figure I have some way to go to fix this. The full domain is marblebay.bpa.nu and info can be used as a test username. If I do a dig from my linux box to the outside world then I get an A and MX record showing. So I think that the email failure is occuring in the script before it gets to the last test for DNS lookup. However, I am wanting to understand what the piece of code is calling here: !checkdnsrr($domain, "MX") Is this an osc function or a PHP inbuilt function for checking dns entries? cheers Tony cheersTony******************************My oscMax Store RecoverToy :: Antique Toy Car PartsTony's Tech BlogWrenMaxwell WebManagement******************************
burt Posted November 19, 2002 Posted November 19, 2002 Naturally, if the top-most domain is a two character domain (i.e 'nu' which is a global top-level domain for 'network-users') then this is scrapped as a country code, leaving the next section to be tested as a top-level domain against the list. .nu is not a global TLD, it is the code for a small island in the middle of nowhere called Niue - therefore it is a country code and should be validated as such... I have just tested this and with DNS checking ON, the .nu domain does not validate. With DNS checking off, it does..
com2 Posted November 19, 2002 Posted November 19, 2002 !checkdnsrr($domain, "MX") Is this an osc function or a PHP inbuilt function for checking dns entries? checkdnsrr (PHP 3, PHP 4 >= 4.0.0) checkdnsrr -- Check DNS records corresponding to a given Internet host name or IP address Description int checkdnsrr ( string host [, string type]) Searches DNS for records of type type corresponding to host. Returns TRUE if any records are found; returns FALSE if no records were found or if an error occurred. type may be any one of: A, MX, NS, SOA, PTR, CNAME, or ANY. The default is MX. Host may either be the IP address in dotted-quad notation or the host name. Note: This function is not implemented on Windows platforms.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.