>      People are entering bogus e-mail addresses in my subscription forms.
> Most of them are just words without the @, but more and more seem to be
> bogus addresses.
>
>      Before I start writing ping routines and such, what is the quickest,
> simplest way of determining whether a host exists?


this is only a half-solution, but it's fairly easy to find out whether a
given /machine/ exists.   perl has the built-in routine gethostbyname()
which will do a standard DNS lookup for you.


    @A = gethostbyname('www.yawp.com');

    print "name    = $A[0]\n";
    print "aliases = $A[1]\n";
    print "type    = $A[2]\n";
    print "length  = $A[3]\n";
    print "address = ", join ('.', unpack ('C4', $A[4])), "\n";



assuming you get a legitimate network address, at least you know the
machine exists.

checking the address itself would be harder.. for that, you'd have to open
a socket connection to the mailserver, and ask it to verify the address.
that's certainly possible.. it's part of a standard SMTP transaction, in
fact.. but it's not trivial.






mike stone  <[EMAIL PROTECTED]>   'net geek..
been there, done that,  have network, will travel.



____________________________________________________________________
--------------------------------------------------------------------
 Join The Web Consultants Association :  Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------

Reply via email to