[kdewebdev-site] Proposed KdeWebDev site structure <- Final?

jacob coby jcobync at yahoo.com
Wed Mar 3 07:37:11 EST 2004


--- Eric Laffoon <sequitur at easystreet.com> wrote:

> I don't think it's finger, I don't recall, but you
> can actually query an email 
> address to ask the host if it's valid. That would be
> step two. As I said this 
> eliminates all but willfull fraud. You can also
> record their IP address 
> too. ;-)

It isn't finger, but to validate an email address (in
PHP pseudocode):

- regexp to see if it looks like an email
- getmxrr() to get all of the MX records  (you can use
`dig MX example.com` to see them via the command line)
- sort the MX records by weight.  small -> large
- foreach mail exchange:
  . connect to port 25
  . issue HELO kdewebdev.org\r\n (you are advertising
where you are, not who you are talking to)
  . issue MAIL FROM: <mailservice at kdewebdev.org>\r\n
  . issue RCPT TO: <foo at example.com>\r\n
  . if the next response code is in (501, 550, 553),
error out and try the next mail exhange
  . else email is valid, return success

You can also do the whole thing via the command line
by:

dig MX example.com
(make note of the records)
(>> commands you type in, followed by enter)
telnet mail.example.com 25
220 mail server ident (1.33) Linux
>>HELO kdewebdev.org
250 HELO mail.example.com
>>MAIL FROM:<test at kdewebdev.org>
250 OK
>>RCPT TO:<foo at example.com>
250 OK FOR <foo at example.com>
^]
telnet>



=====
--
-Jacob

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com


More information about the kdewebdev-site mailing list