× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



We have a need to verify that an email address we are sending to via an
rpg program is valid in our own domain (@xyz.com) .

would there be a SMTP lookup or some other technique that would work
reliably just for our own domain?

Jim Horn

This email is intended only for the person or entity
to which it is addressed and may contain information
that is privileged, confidential or otherwise protected
from disclosure. If you are not the named addressee
or an employee or agent responsible for delivering
this message to the named addressee, you are not
authorized to read, print, retain copy, and disseminate
this message or any part of it. If you have received this
message in error please notify us immediately by email,
discard any paper copies and delete all electronic files
of this message.
------------------------------

message: 3
date: Fri, 11 Jan 2008 12:47:32 -0600
from: Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
subject: Re: email/SMTP validation

To validate an e-mail address by checking it's syntax, and looking up
the host name in DNS:

http://www.systeminetwork.com/article.cfm?id=17632

To validate an e-mail address by checking it's syntax with a regular
expression:

http://www.systeminetwork.com/article.cfm?id=52826

Both links require a membership for System iNetwork (but a free
"associate" membership should work.)

I strongly discourage anyone from trying to use SMTP to verify an e-mail
address because of the fact that there are SMTP servers out there that
just queue mail and forward it to a different server:

a) Sometimes this is done for virus scanning. The anti-virus appliance
receives all e-mail for a domain. It scans it. If it's safe, it
forwards it to the "real" e-mail server. The virus server doesn't know
all of the users who receive e-mail... it accepts any mail for the given
domain (the part after the @ in the address) whether the address is
correct or not. After it scans it, it fowards it to the real server. If
the address was wrong, the real server replies in e-mail.

b) The same as A, but spam checking instead of virus scanning.

c) The same as A, but just as a backup server in case the main server
goes down for some reason.

d) The same as A, but instead of a secondary/forwarding server, the main
server just sends e-mails for errors because the administrator prefers
it that way.

Thereofre, the SMTP verification (including the link provided by Josh
Diggs) will work sometimes for some sites, but not consistently for
everyone. Do not use it.

DNS verification is also tricky. It should work very well, but it only
checks the host name, not the userid. If, for some reason, the DNS
servers are down, or your connection to the internet is down or flaky,
the DNS lookup might fail for a valid host, and therefore it might say a
valid address is invalid. (The same is true of the SMTP method, but
that method has the much bigger problem that it's unreliable as
described above.)

There's really no way to reliably determine (programatically) if an
e-mail address is valid.

A syntax check -- such as the regular expression method -- is really
about the best you can do without running the risk of dumping valid
addresses and keeping invalid ones.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.