Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Javascript / Client Side Development

javascript dns look up


hi,
Has anyone come across a "hack" to do a dns look up via JS

I  want to evaluate an email address against a server to see if it is valid ,
I'm 50 % of the way there  but i need a way to look up  the email servers MX
record.

I just wondered if there was a way to trigger a dns spew on port 53

Steve

steve wrote:
> hi,
> Has anyone come across a "hack" to do a dns look up via JS

If you are using IE, you could use activex winsock control. If not, you
would need to submit the page back to the server to do it...

--
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.21.1
  ^ ^   19:18:01 up 4:11 0 users load average: 1.00 1.00 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

On Apr 28, 9:45 am, steve <s@aol.com> wrote:

> hi,
> Has anyone come across a "hack" to do a dns look up via JS

> I  want to evaluate an email address against a server to see if it is valid ,
> I'm 50 % of the way there  but i need a way to look up  the email servers MX
> record.

> I just wondered if there was a way to trigger a dns spew on port 53

> Steve

imagine the best case scenario where you have a javascript which can
talk the right protocols and send and receive data from a DNS server,
will port 53 be open on the client. The best way is therefore to have
your webserver perform the check based on the value of somepost, and
send back the result via XHR or an iframe, however, I'm not sure that
MX records actually /have/ to exist (I read it along time ago)
although the A record does, and so provided there is at least an A
record you are ok. cacert.org uses pretty good email testing suite you
could purloin, by downloading their source code, which is open
(despite some copyright notices still hanging around) their script
tests the server with a connection attempt without actually sending
them mail. (dont forget to ban all those temporary domains - btw if
you have or find a maintained list of temporary email domians, could
you post a link here) :)
On Apr 28, 5:22 pm, shimmyshack <matt.fa@gmail.com> wrote:

i shoudl have said "can the client get to port 53 on an external
server" they might be forced to use a proxy on a LAN, or a socks
etc...

 The best way is therefore to have

On Sun, 29 Apr 2007 00:54:14 +0800, shimmyshack wrote
(in article <1177779254.565348.30@o5g2000hsb.googlegroups.com>):

Hi  Shimmy,

sorry I do not have any pointers to temp email domain list, I imagine it
changes every day

steve
.

On Sat, 28 Apr 2007 19:18:58 +0800, Man-wai Chang wrote
(in article <46332d86$@rain.i-cable.com>):

> steve wrote:
>> hi,
>> Has anyone come across a "hack" to do a dns look up via JS

> If you are using IE, you could use activex winsock control. If not, you
> would need to submit the page back to the server to do it...

it has to be cross platform, if it was as easy as being able to use  activex  
I would be laughing.
Yes i can submit it back to the server, but I wanted the mental challenge.

steve

On Apr 28, 5:45 pm, steve <s@aol.com> wrote:

> Has anyone come across a "hack" to do a dns look up via JS
> I  want to evaluate an email address against a server to see if it is valid ,
> I'm 50 % of the way there  but i need a way to look up  the email servers MX
> record.

You may be wasting your time.

Many ISPs reject all outbound SMTP traffic, except to their own
outgoing mailserver. So you won't be able to establish an SMTP dialog
directly with the target user's mailserver.

Also, most mailservers no longer support the SMTP VRFY command - or
they seem to support it, but actually lie (eg. they say that *all*
addresses are valid). Your only remaining possibility is to check the
response to a dummy RCPT TO command - but I'm not sure that even this
is reliable now.

Try picking a relevant user's mailserver (not your ISP's outgoing
mailserver), and use Telnet to test the process manually. For example:

telnet  mail.blah.com  25
HELO me
VRFY someuser
MAIL FROM me
RCPT TO someuser
(or somesuch)

If you cann't get it to work via Telnet, you won't be able to program
it - in Javascript or anything else.

HTH,
TC (MVP MSAccess)
http://tc2.atspace.com

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc