Script Library: 1231 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

Discussion posts for script email-check.r

26-Nov-2005 23:23
This script works as follows.

It takes the email address, and finds the domain part. It then feeds 
it to dig.r ( using 'get-mx-ip), which is able to determine the mail 
server responsible for that domain by looking up the mx records at 
your local dns server.

The smtp scheme uses system/schemes/default/host as the mail server, 
and this is then set to the value obtained above.  The script uses 
'set-net, but you can set it directly instead.

The script then sends what is known as a smtp challenge to that mail 
server.  A smtp challenge uses the null from address of "<>", 
and then sends a "RCPT TO" command to that server.  If the server 
recognises that adress, it answers appropriately.  If not, an error 
is generated by the smtp scheme, and we know that that email address 
does not exist.  If it exists, or not, we then issue a "QUIT" command 
by simply closing the smtp connection.

Note that some email servers will respond okay to every query to 
stop email harvesting.

The smtp scheme is used instead of the esmtp scheme as the latter 
is not necessary for this, and furthermore has smarts in it which 
prevent it being used in this way.