Re: [PHP] Check for existence of mail address

2010-10-26 Thread TR Shaw

On Oct 26, 2010, at 9:28 AM, Bob McConnell wrote:

> From: TR Shaw
> 
>> On Oct 25, 2010, at 6:46 PM, Daniel P. Brown wrote:
>>> On Mon, Oct 25, 2010 at 18:38,   wrote:
 
 Is there any other function which checks whether this
 address really exists?
>>> 
>>>   Of course not!  Can you imagine the implications, insecurities,
>>> and privacy concerns that would be associated with that?  Some
>>> mailservers will confirm or deny if a local address exists, but not
>>> most --- thankfully.
> 
>> Not true or else you would never get mail.
> 
> Of course it's true. Most servers will accept any email sent to a valid
> domain name, then silently discard all messages that don't have valid
> user names, expecting that set to be mostly SPAM. This created a new
> problem where the legitimate senders no longer know when their mail
> didn't get delivered due to a typo in the address.

I don't know about most. If any well respected business did that they wouldn't 
stay in business long. Most servers disable VRFY and users who use spam 
assassin may trash mail that should have been rejected. Its the owner of the 
mailserver's call.  

Except on a spam trap domain, I would never accept mail for invalid users as it 
is a disservice to my clients and their domain's reputation to their 
users/clients. Accepting all and discarding it certainly isn't out of the box 
default behavior nor is it in MAAWG's BCP's nor others either.

Tom


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Check for existence of mail address

2010-10-26 Thread TR Shaw

On Oct 26, 2010, at 8:49 AM, TR Shaw wrote:

> On Oct 25, 2010, at 6:38 PM, web...@blaettner.com wrote:
> 
>> Hi, folks,
>> 
>> I'm wondering how to checking existence of a given
>> mail address like f...@bar.com .
>> 
>> At 1st I tried:
>> 
>> if f (filter_var ($maddr, FILTER_VALIDATE_EMAIL) === false) {
>>   /* some sort of error handling code here */
>> }
>> 
>> where $maddr is the address to be checked.
>> But this checks only syntax.. :-(
>> 
>> Is there any other function which checks whether this
>> address really exists?
>> 
>> And, of course, I want to avoid sending a test mail just
>> for checking :-)
>> 
>> Many THX in advance for suggestions, pointers...
>> 
> 
> Rolf,
> 
> Since most mailservers have disabled VRFY long ago due to spammers and other 
> miscreants.
> 
> Easiest way is to use class.smtp.php form phpmailer using the following:
> 
> $smtp = new SMTP
> if (empty($smtp->Connect())) return false;// Connect failure
> if (empty($smtp->Hello("yourmailerver.com")) return false;//Maybe not a 
> mailserve
> if(empty($smtp->Recipient($to))) return false;//No such user
> $smtp->Close();   // Found user so abort transaction.
> return true;
>   
> Tom
> 
> 


PS I didn't cover greylisting in the above.

PPS But why? If you are running a mailing list you need to generate different 
mail froms and deal with rejections that way . It is spammy if you try to use 
the above to clean a list and will probably cause you to be black listed. I 
know I set my server list blacklist too many of these.

Tom


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Check for existence of mail address

2010-10-26 Thread Daniel P. Brown
On Tue, Oct 26, 2010 at 08:49, TR Shaw  wrote:
>
> On Oct 25, 2010, at 6:46 PM, Daniel P. Brown wrote:
>>
>>    Of course not!  Can you imagine the implications, insecurities,
>> and privacy concerns that would be associated with that?  Some
>> mailservers will confirm or deny if a local address exists, but not
>> most --- thankfully.
> Not true or else you would never get mail. What you mean is that most 
> mailservers have VRFY disabled

Read what I said before saying it's not true: "Some mailservers
will confirm or deny if a local address exists, but not most."
Believe me, I know what I mean.  (No matter how surprising that may
seem.  ;-P)

-- 

Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Check for existence of mail address

2010-10-26 Thread Bob McConnell
From: TR Shaw

> On Oct 25, 2010, at 6:46 PM, Daniel P. Brown wrote:
>> On Mon, Oct 25, 2010 at 18:38,   wrote:
>>> 
>>> Is there any other function which checks whether this
>>> address really exists?
>> 
>>Of course not!  Can you imagine the implications, insecurities,
>> and privacy concerns that would be associated with that?  Some
>> mailservers will confirm or deny if a local address exists, but not
>> most --- thankfully.

> Not true or else you would never get mail.

Of course it's true. Most servers will accept any email sent to a valid
domain name, then silently discard all messages that don't have valid
user names, expecting that set to be mostly SPAM. This created a new
problem where the legitimate senders no longer know when their mail
didn't get delivered due to a typo in the address.

Bob McConnell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Check for existence of mail address

2010-10-26 Thread TR Shaw
On Oct 25, 2010, at 6:38 PM, web...@blaettner.com wrote:

> Hi, folks,
> 
> I'm wondering how to checking existence of a given
> mail address like f...@bar.com .
> 
> At 1st I tried:
> 
>  if f (filter_var ($maddr, FILTER_VALIDATE_EMAIL) === false) {
>/* some sort of error handling code here */
>  }
> 
> where $maddr is the address to be checked.
> But this checks only syntax.. :-(
> 
> Is there any other function which checks whether this
> address really exists?
> 
> And, of course, I want to avoid sending a test mail just
> for checking :-)
> 
> Many THX in advance for suggestions, pointers...
> 

Rolf,

Since most mailservers have disabled VRFY long ago due to spammers and other 
miscreants.

Easiest way is to use class.smtp.php form phpmailer using the following:

$smtp = new SMTP
if (empty($smtp->Connect())) return false;  // Connect failure
if (empty($smtp->Hello("yourmailerver.com")) return false;  //Maybe not a 
mailserve
if(empty($smtp->Recipient($to))) return false;  //No such user
$smtp->Close(); // Found user so abort transaction.
return true;

Tom




Re: [PHP] Check for existence of mail address

2010-10-26 Thread TR Shaw

On Oct 25, 2010, at 6:46 PM, Daniel P. Brown wrote:

> On Mon, Oct 25, 2010 at 18:38,   wrote:
>> 
>> Is there any other function which checks whether this
>> address really exists?
> 
>Of course not!  Can you imagine the implications, insecurities,
> and privacy concerns that would be associated with that?  Some
> mailservers will confirm or deny if a local address exists, but not
> most --- thankfully.
Not true or else you would never get mail. What you mean is that most 
mailservers have VRFY disabled
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Check for existence of mail address

2010-10-25 Thread Jonathan Tapicer
You can use this class:
http://www.webdigi.co.uk/blog/wp-content/uploads/2009/01/smtpvalidateclassphp.txt

It may not work for some SMTPs.

It uses the concepts explained here:
http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email/

On Mon, Oct 25, 2010 at 7:38 PM,   wrote:
> Hi, folks,
>
> I'm wondering how to checking existence of a given
> mail address like f...@bar.com .
>
> At 1st I tried:
>
>  if f (filter_var ($maddr, FILTER_VALIDATE_EMAIL) === false) {
>    /* some sort of error handling code here */
>  }
>
> where $maddr is the address to be checked.
> But this checks only syntax.. :-(
>
> Is there any other function which checks whether this
> address really exists?
>
> And, of course, I want to avoid sending a test mail just
> for checking :-)
>
> Many THX in advance for suggestions, pointers...
>
> Rolf
> --
> Dipl.phys. Rudolf Otto Blättner,
> D 91074 Herzogenaurach, Germany.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Check for existence of mail address

2010-10-25 Thread Daniel P. Brown
On Mon, Oct 25, 2010 at 18:38,   wrote:
>
> Is there any other function which checks whether this
> address really exists?

Of course not!  Can you imagine the implications, insecurities,
and privacy concerns that would be associated with that?  Some
mailservers will confirm or deny if a local address exists, but not
most --- thankfully.

-- 

Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Check for existence of mail address

2010-10-25 Thread webdev
Hi, folks,

I'm wondering how to checking existence of a given
mail address like f...@bar.com .

At 1st I tried:

  if f (filter_var ($maddr, FILTER_VALIDATE_EMAIL) === false) {
/* some sort of error handling code here */
  }

where $maddr is the address to be checked.
But this checks only syntax.. :-(

Is there any other function which checks whether this
address really exists?

And, of course, I want to avoid sending a test mail just
for checking :-)

Many THX in advance for suggestions, pointers...

Rolf
-- 
Dipl.phys. Rudolf Otto Blättner,
D 91074 Herzogenaurach, Germany.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php