|
Posted by David Cary Hart on 11/22/05 22:45
On Tuesday 22 November 2005 15:05, Janwillem Borleffs opined:
> David Cary Hart wrote:
>> I am working on an Apache/MySQL/PHP application that sends email to a
>> third party. I want to ensure that the form originator is providing a
>> valid email address. From the command line, I would:
>> telnet domain.tld 25
>> HELO mail.tqmcube.com
>> MAIL FROM: test@tqmcube.com
>> RCPT TO: user@domain.tld
>> That will either provide OK or an error message.
>>
>> Can someone clue me in if I might be able to do this within php?
>>
>
> You can use fsockopen + fputs & fgets for this, but be aware that most
> SMTP servers reply OK even when the address isn't valid.
>
Thanks *much*. Yes, I am aware of the servers that accept mail for
non-existent accounts. Nevertheless it's due diligence. If the root
host of the IP is consistent with the host of the email address and if
that email address appears to be valid - odds are much better that it's
valid. Furthermore, this application is for US only. Our DNSBL returns
country of origin in one zone and spam clients in another. Obviously I
won't query the dynamic list. All in all, by combining the whole mess,
it should be pretty free of abuse - I hope. The webs we weave to avoid
spamming and spam -;)
--
Displayed Email Address is a SPAM TRAP
Our DNSRBL -
Eliminate Spam: http://www.TQMcube.com/spam_trap.htm
Zombie Graphs: http://www.TQMcube.com/zombies.php
GeoGraphics: http://www.TQMcube.com/origins.php
[Back to original message]
|