Re: Validate Email Address
Re: Validate Email Address
- Subject: Re: Validate Email Address
- From: John W Baxter <email@hidden>
- Date: Mon, 2 Jul 2001 22:56:24 -0700
At 21:51 -0400 7/2/2001, Rob Jorgensen wrote:
>
Using AppleScript, and whatever scripting additions which might be
>
needed, it possible to validate an email address before sending
>
anything to it, in order to avoid bounced mail? If so, working
>
examples would be welcome. :-)
>
>
Thanks for any info you might provide.
The short answer is "no, not usefully."
You can validate the form of the address...you can verify that a mail
server exists which should accept the message.
But thanks to the spammers, you are unlikely to get a useful answer from
the old VRFY command in the SMTP protocol, whose job was to elicit a yes or
no answer to the question "Is this a valid address".
It's given in this general form (I had previously looked up
lists.apple.com's mail exchanger, and learned that it is lists.apple.com as
I expected):
% telnet
telnet> open lists.apple.com smtp
Trying 17.254.0.151...
Connected to lists.apple.com.
Escape character is '^]'.
220 lists.apple.com ESMTP Sendmail 8.11.1/8.11.1; Mon, 2 Jul 2001 22:41:35
-0700 (PDT)
ehlo fox.scandaroon.com
250-lists.apple.com Hello fox.scandaroon.com [207.149.192.229], pleased to
meet you
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-SIZE
250-DSN
250-ONEX
250-ETRN
250-XUSR
250 HELP
vrfy email@hidden
252 2.5.2 Cannot VRFY user; try RCPT to attempt delivery (or try finger)
quit
221 2.0.0 lists.apple.com closing connection
All went well until the VRFY, which was correctly formed. But, in common
with any SMTP server whose operators care at all about privacy and
security, the VRFY command is shut off. If you do find a server with VRFY
turned on, you get different numbers for good and for bad (I don't remember
what they were...it's in the SMTP RFC document) addresses. Don't bother
looking at the words...they vary.
You could do all of that (including the mail exchanger lookup, not shown)
with AppleScript and some help (OSAX or application). But there's little
point.
And you might not even get as much response as shown above: you may have a
dialup account with an ISP which lists their dialup pool IP addresses with
the dialup list at mail-abuse.org, in which case many servers will reject
your attempt to telnet. Or you may have an account with an ISP which
blocks SMTP to any server but their own designated machine(s), in which
case the other end won't even have anything to reject.
And if you're spotted trying a whole bunch of variations in short order,
your ISP may well cancel your account.
--John
...where seldom is heard
a discouraging word...
Note that it doesn't say "never"
--
John Baxter email@hidden Port Ludlow, WA, USA