FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » testing email deliverability...
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
testing email deliverability... [message #186037] Thu, 05 June 2014 00:48 Go to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
I have web contact pages which are used by anyone to send enquiries.

I want to make sure that anyone using them has a valid reply address set
in a web form BEFORE I forward the message on to the site administrators.


Mailer is exim, and that's currently but not necessarily invoked by the
php mail() function.


what I want is a function like

is_valid_mail("user12345(at)gmail(dot)com")

that will return true or false if gmail accepts the user as known (yes
the spam is always @gmail.com) WITHOUT having to write a dns mx lookup,
then connect to socket 25 and etc etc etc..

exim -bt tells me if the domain is valid, but not the user.

I am not particular how its achieved - anything can be merged into the
existing code.

anyone done this?


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
Re: testing email deliverability... [message #186038 is a reply to message #186037] Thu, 05 June 2014 01:40 Go to previous messageGo to next message
Keith Keller is currently offline  Keith Keller
Messages: 5
Registered: June 2014
Karma: 0
Junior Member
["Followup-To:" header set to comp.os.linux.misc.]

On 2014-06-05, The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:
>
> I want to make sure that anyone using them has a valid reply address set
> in a web form BEFORE I forward the message on to the site administrators.

There is absolutely no way to do this for arbitrary domains. Some
MXs will accept all mail addressed to it, then decide later how to
handle the message (discard, bounce, deliver).

> that will return true or false if gmail accepts the user as known (yes
> the spam is always @gmail.com) WITHOUT having to write a dns mx lookup,
> then connect to socket 25 and etc etc etc..

It's not even possible (for an arbitrary domain) *with* doing an MX
lookup and connecting to port 25. It will be possible for some MXs but
not all, and there's no way of determining ahead of time whether a
domain will do this for you or not. This is why many sites require
separate confirmation by sending email to the target with a link that
verifies that the recipient actually received the mail.

--keith

--
kkeller-usenet(at)wombat(dot)san-francisco(dot)ca(dot)us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
Re: testing email deliverability... [message #186039 is a reply to message #186037] Thu, 05 June 2014 02:47 Go to previous messageGo to next message
Tony Marston is currently offline  Tony Marston
Messages: 57
Registered: November 2010
Karma: 0
Member
"The Natural Philosopher" wrote in message
news:lmoeok$5v6$1(at)news(dot)albasani(dot)net...
>
> I have web contact pages which are used by anyone to send enquiries.
>
> I want to make sure that anyone using them has a valid reply address set in
> a web form BEFORE I forward the message on to the site administrators.
>
>
> Mailer is exim, and that's currently but not necessarily invoked by the php
> mail() function.
>
>
> what I want is a function like
>
> is_valid_mail("user12345(at)gmail(dot)com")
>
> that will return true or false if gmail accepts the user as known (yes the
> spam is always @gmail.com) WITHOUT having to write a dns mx lookup, then
> connect to socket 25 and etc etc etc..
>
> exim -bt tells me if the domain is valid, but not the user.
>
> I am not particular how its achieved - anything can be merged into the
> existing code.
>
> anyone done this?
>
>
"The Natural Philosopher" wrote in message
news:lmoeok$5v6$1(at)news(dot)albasani(dot)net...
>
> I have web contact pages which are used by anyone to send enquiries.
>
> I want to make sure that anyone using them has a valid reply address set in
> a web form BEFORE I forward the message on to the site administrators.
>
>
> Mailer is exim, and that's currently but not necessarily invoked by the php
> mail() function.
>
>
> what I want is a function like
>
> is_valid_mail("user12345(at)gmail(dot)com")
>
> that will return true or false if gmail accepts the user as known (yes the
> spam is always @gmail.com) WITHOUT having to write a dns mx lookup, then
> connect to socket 25 and etc etc etc..
>
> exim -bt tells me if the domain is valid, but not the user.
>
> I am not particular how its achieved - anything can be merged into the
> existing code.
>
> anyone done this?
>
>

You can use the filter_var() function at
http://uk3.php.net/manual/en/function.filter-var.php to check that an email
address is syntactically valid, but you cannot check that an email exists
without sending an email and getting a response back.

--
Tony Marston

http://www.tonymarston.net
http://www.radicore.org
Re: testing email deliverability... [message #186040 is a reply to message #186037] Thu, 05 June 2014 03:04 Go to previous messageGo to next message
Sam[1] is currently offline  Sam[1]
Messages: 1
Registered: June 2014
Karma: 0
Junior Member
The Natural Philosopher writes:

> what I want is a function like
>
> is_valid_mail("user12345(at)gmail(dot)com")
>
> that will return true or false if gmail accepts the user as known (yes the
> spam is always @gmail.com) WITHOUT having to write a dns mx lookup, then
> connect to socket 25 and etc etc etc..

I'm afraid that you will have to wait until someone invents a telepathic
computer, that will be able to accomplishing such an amazinf feat.

Until then, unfortunately, a number of inconvenient laws of physics of this
universe will prevent anyone from determining whether an email address is
deliverable without looking up its MX server, and connecting to the MX
server's port 25.
Re: testing email deliverability... [message #186041 is a reply to message #186037] Thu, 05 June 2014 03:05 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 6/4/2014 8:48 PM, The Natural Philosopher wrote:
> I have web contact pages which are used by anyone to send enquiries.
>
> I want to make sure that anyone using them has a valid reply address set
> in a web form BEFORE I forward the message on to the site administrators.
>
>
> Mailer is exim, and that's currently but not necessarily invoked by the
> php mail() function.
>
>
> what I want is a function like
>
> is_valid_mail("user12345(at)gmail(dot)com")
>
> that will return true or false if gmail accepts the user as known (yes
> the spam is always @gmail.com) WITHOUT having to write a dns mx lookup,
> then connect to socket 25 and etc etc etc..
>
> exim -bt tells me if the domain is valid, but not the user.
>
> I am not particular how its achieved - anything can be merged into the
> existing code.
>
> anyone done this?
>
>

The only way you can do this is to send an email to the address they
specify and require a response. While you can determine if a domain
name is invalid, there is no way to determine whether an email within a
domain is valid without requiring a response from that email address.

I know you won't see this, but others who might have a similar question
will.


--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
Re: testing email deliverability... [message #186042 is a reply to message #186040] Thu, 05 June 2014 03:27 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 6/4/2014 11:04 PM, Sam wrote:
> The Natural Philosopher writes:
>
>> what I want is a function like
>>
>> is_valid_mail("user12345(at)gmail(dot)com")
>>
>> that will return true or false if gmail accepts the user as known (yes
>> the spam is always @gmail.com) WITHOUT having to write a dns mx
>> lookup, then connect to socket 25 and etc etc etc..
>
> I'm afraid that you will have to wait until someone invents a telepathic
> computer, that will be able to accomplishing such an amazinf feat.
>
> Until then, unfortunately, a number of inconvenient laws of physics of
> this universe will prevent anyone from determining whether an email
> address is deliverable without looking up its MX server, and connecting
> to the MX server's port 25.
>

Even then you don't know if the email address is valid. May mail
servers are set to accept and trash invalid email addresses. This is
because spammers would send emails to random accounts at an email
address; if they didn't get a reject they knew the address was OK.


--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
Re: testing email deliverability... [message #186043 is a reply to message #186040] Thu, 05 June 2014 04:37 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 05/06/14 04:04, Sam wrote:
> The Natural Philosopher writes:
>
>> what I want is a function like
>>
>> is_valid_mail("user12345(at)gmail(dot)com")
>>
>> that will return true or false if gmail accepts the user as known (yes
>> the spam is always @gmail.com) WITHOUT having to write a dns mx
>> lookup, then connect to socket 25 and etc etc etc..
>
> I'm afraid that you will have to wait until someone invents a telepathic
> computer, that will be able to accomplishing such an amazinf feat.
>
> Until then, unfortunately, a number of inconvenient laws of physics of
> this universe will prevent anyone from determining whether an email
> address is deliverable without looking up its MX server, and connecting
> to the MX server's port 25.
>
I meant without me having to write such code,, but it seems someone
already hass..

http://www.tienhuis.nl/files/email_verify_source.php


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
Re: testing email deliverability... [message #186044 is a reply to message #186039] Thu, 05 June 2014 04:53 Go to previous messageGo to next message
Eli the Bearded is currently offline  Eli the Bearded
Messages: 22
Registered: April 2011
Karma: 0
Junior Member
In comp.os.linux.misc, Tony Marston <TonyMarston(at)hotmail(dot)com> wrote:
> "The Natural Philosopher" wrote:
>> I want to make sure that anyone using them has a valid reply address set in
>> a web form BEFORE I forward the message on to the site administrators.

I'd like to verify that the lottery number is going to win before I buy the
ticket. Unfortunely I don't think either of us is going to be happy.

>> is_valid_mail("user12345(at)gmail(dot)com")

Did you think that you are the first person to want this? Think how useful
it would be for spammers to find new email addresses before sending email!

> You can use the filter_var() function at
> http://uk3.php.net/manual/en/function.filter-var.php to check that an email
> address is syntactically valid, but you cannot check that an email exists
> without sending an email and getting a response back.

I have NEVER seen a "syntactically valid" check that really works. The
comments on that page list many valid addresses that don't work. (And
many validators wrongly think I post from an invalid address, but it's
syntactically valid and a working mail alias.)

Elijah
------
and some "syntactically invalid" addresses work well in practice
Re: testing email deliverability... [message #186045 is a reply to message #186043] Thu, 05 June 2014 04:55 Go to previous messageGo to next message
Keith Keller is currently offline  Keith Keller
Messages: 5
Registered: June 2014
Karma: 0
Junior Member
["Followup-To:" header set to comp.os.linux.misc.]

On 2014-06-05, The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:
>
> I meant without me having to write such code,, but it seems someone
> already hass..
>
> http://www.tienhuis.nl/files/email_verify_source.php

As I and others have already stated, this method is not reliable in
general, as some MXs will accept all email for its domains whether
the destination address is valid or not, in order to defeat exactly this
sort of query (done by spammers, but what defeats them defeats this
too).

All this script will do is tell you whether the MX accepted the message.
It can never tell you whether the MX delivered it to a valid mailbox,
discarded it, or generated a bounce.

--keith

--
kkeller-usenet(at)wombat(dot)san-francisco(dot)ca(dot)us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
Re: testing email deliverability... [message #186046 is a reply to message #186044] Thu, 05 June 2014 08:13 Go to previous messageGo to next message
Richard Kettlewell is currently offline  Richard Kettlewell
Messages: 7
Registered: September 2010
Karma: 0
Junior Member
Eli the Bearded <*@eli.users.panix.com> writes:
> Tony Marston <TonyMarston(at)hotmail(dot)com> wrote:
>>> is_valid_mail("user12345(at)gmail(dot)com")
>
> Did you think that you are the first person to want this? Think how useful
> it would be for spammers to find new email addresses before sending email!

No use at all. Spammers use stolen resources, so spam sent to
undeliverable addresses doesn’t cost them anything.

--
http://www.greenend.org.uk/rjk/
Re: testing email deliverability... [message #186047 is a reply to message #186037] Thu, 05 June 2014 10:59 Go to previous messageGo to next message
AvdB is currently offline  AvdB
Messages: 2
Registered: July 2013
Karma: 0
Junior Member
"The Natural Philosopher" <tnp(at)invalid(dot)invalid> schreef in bericht
news:lmoeok$5v6$1(at)news(dot)albasani(dot)net...
> what I want is a function like
>
> is_valid_mail("user12345(at)gmail(dot)com")
>
> that will return true or false if gmail accepts the user as known (yes the
> spam is always @gmail.com) WITHOUT having to write a dns mx lookup, then
> connect to socket 25 and etc etc etc..
>
> exim -bt tells me if the domain is valid, but not the user.
>
> I am not particular how its achieved - anything can be merged into the
> existing code.

As an idea to work on:

is_valid_mail() checks your database for known users.
If unknown, display a 'verify first' page.
Present a unique code which the user has to mail back to you.
Still not 100% save, but if a user can send using a certain address, there's
reason to believe he can receive as well. Add the user to your database.

Not enough?
Make it a three way handshake.
The user mails you his code, your autoresponder sends (after verifying the
code, obviously) another unique code.
Your form checks { is_valid_mail() or presents_valid_code() }
You now have proof email traffic is possible in both directions.
Re: testing email deliverability... [message #186048 is a reply to message #186047] Thu, 05 June 2014 12:51 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 05/06/14 11:59, AvdB wrote:
> "The Natural Philosopher" <tnp(at)invalid(dot)invalid> schreef in bericht
> news:lmoeok$5v6$1(at)news(dot)albasani(dot)net...
>> what I want is a function like
>>
>> is_valid_mail("user12345(at)gmail(dot)com")
>>
>> that will return true or false if gmail accepts the user as known (yes
>> the spam is always @gmail.com) WITHOUT having to write a dns mx
>> lookup, then connect to socket 25 and etc etc etc..
>>
>> exim -bt tells me if the domain is valid, but not the user.
>>
>> I am not particular how its achieved - anything can be merged into the
>> existing code.
>
> As an idea to work on:
>
> is_valid_mail() checks your database for known users.

There are no known users.

Or hey wouldn't be using the contact page.

> If unknown, display a 'verify first' page.
> Present a unique code which the user has to mail back to you.
> Still not 100% save, but if a user can send using a certain address,
> there's reason to believe he can receive as well. Add the user to your
> database.

Making it bloody awkward for genuine users defeats the purpose.

>
> Not enough?
> Make it a three way handshake.
> The user mails you his code, your autoresponder sends (after verifying
> the code, obviously) another unique code.
> Your form checks { is_valid_mail() or presents_valid_code() }
> You now have proof email traffic is possible in both directions.
>
>
At this point genuine enquirers have simply buggered off elsewhere.

>


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
Re: testing email deliverability... [message #186050 is a reply to message #186046] Thu, 05 June 2014 15:05 Go to previous messageGo to next message
Keith Keller is currently offline  Keith Keller
Messages: 5
Registered: June 2014
Karma: 0
Junior Member
["Followup-To:" header set to comp.os.linux.misc.]
On 2014-06-05, Richard Kettlewell <rjk(at)greenend(dot)org(dot)uk> wrote:
> Eli the Bearded <*@eli.users.panix.com> writes:
>> Tony Marston <TonyMarston(at)hotmail(dot)com> wrote:
>>>> is_valid_mail("user12345(at)gmail(dot)com")
>>
>> Did you think that you are the first person to want this? Think how useful
>> it would be for spammers to find new email addresses before sending email!
>
> No use at all. Spammers use stolen resources, so spam sent to
> undeliverable addresses doesn???t cost them anything.

If they had a list of valid addresses they'd get their spam sent out
faster. I strongly suspect they'd use such a resource if it existed.

--keith

--
kkeller-usenet(at)wombat(dot)san-francisco(dot)ca(dot)us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
Re: testing email deliverability... [message #186051 is a reply to message #186037] Thu, 05 June 2014 18:39 Go to previous messageGo to next message
Adrienne Boswell is currently offline  Adrienne Boswell
Messages: 25
Registered: October 2010
Karma: 0
Junior Member
The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote

> I have web contact pages which are used by anyone to send enquiries.
>
> I want to make sure that anyone using them has a valid reply address
set
> in a web form BEFORE I forward the message on to the site
administrators.
>
>
> Mailer is exim, and that's currently but not necessarily invoked by the
> php mail() function.
>
>
> what I want is a function like
>
> is_valid_mail("user12345(at)gmail(dot)com")
>
> that will return true or false if gmail accepts the user as known (yes
> the spam is always @gmail.com) WITHOUT having to write a dns mx lookup,
> then connect to socket 25 and etc etc etc..
>
> exim -bt tells me if the domain is valid, but not the user.
>
> I am not particular how its achieved - anything can be merged into the
> existing code.
>
> anyone done this?
>
>

As others have said, there really is no reliable way to do this, other
than actually sending an email and waiting for a response. Groupmail by
Infacta does have the ability to verify addresses in a list. It waits
for a response back and whatever the undeliverable response is, invalid
domain, invalid user, full mailbox, etc. This allows you to keep clean
email lists.

But, that is not going to help you in your application. I have several
email addresses, and if I want a response back to something, then I use
my primary email address. If it's something I think is going to add me
to some mailing list, then I use one of the other ones.

So, you could put something on your form like:

"Please use a valid email address. Your issue will not be addressed if
our email to you is returned."

--
Adrienne Boswell
Arbpen Web Site Design Services - http://www.cavalcade-of-coding.info/
The Good Plate - Fresh Gourmet Recipes - http://the-good-plate.com/
Please respond to the group so others can share
Re: testing email deliverability... [message #186052 is a reply to message #186037] Thu, 05 June 2014 20:14 Go to previous messageGo to next message
James Moe is currently offline  James Moe
Messages: 1
Registered: June 2014
Karma: 0
Junior Member
On 06/04/2014 05:48 PM, The Natural Philosopher wrote:
> I have web contact pages which are used by anyone to send enquiries.
>
There are numerous methods to defeat robo-spammers. The simplest is to
require the sendee to enter a specific text into a field; the text is on
the web page itself, e.g., "Enter 'no-spam-4-me.'" You obviously need to
verify the text when receiving a post. This works quite well for us.

--
James Moe
jmm-list at sohnen-moe dot com
Re: testing email deliverability... [message #186053 is a reply to message #186051] Thu, 05 June 2014 20:46 Go to previous messageGo to next message
Eli the Bearded is currently offline  Eli the Bearded
Messages: 22
Registered: April 2011
Karma: 0
Junior Member
In comp.lang.php, Adrienne Boswell <arbpen(at)yahoo(dot)com> wrote:
> The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote
>> what I want is a function like
>> is_valid_mail("user12345(at)gmail(dot)com")
> So, you could put something on your form like:
>
> "Please use a valid email address. Your issue will not be addressed if
> our email to you is returned."

If anyone believed that, Usenet would have been gone long ago.
How many people post with valid email addresses? Certainly not
Mr Ineptocracy.

Elijah
------
$ dict natural
[snip]
5 definitions found

From The Collaborative International Dictionary of English v.0.48 [gcide]:
[snip]
8. Of or pertaining to the lower or animal nature, as
contrasted with the higher or moral powers, or that which
is spiritual; being in a state of nature; unregenerate.
[1913 Webster]

The natural man receiveth not the things of the
Spirit of God. --1 Cor. ii.
14.
[snip]
Re: testing email deliverability... [message #186054 is a reply to message #186053] Thu, 05 June 2014 21:41 Go to previous messageGo to next message
Keith Keller is currently offline  Keith Keller
Messages: 5
Registered: June 2014
Karma: 0
Junior Member
["Followup-To:" header set to comp.os.linux.misc.]
On 2014-06-05, Eli the Bearded <*@eli.users.panix.com> wrote:
> In comp.lang.php, Adrienne Boswell <arbpen(at)yahoo(dot)com> wrote:
>> The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote
>>> what I want is a function like
>>> is_valid_mail("user12345(at)gmail(dot)com")
>> So, you could put something on your form like:
>>
>> "Please use a valid email address. Your issue will not be addressed if
>> our email to you is returned."
>
> If anyone believed that, Usenet would have been gone long ago.

I disagree. Usenet questions are (or should be) answered on usenet, so
a valid mailbox in the From: header is not necessary. But if I'm
running a Q&A where the normal response route is via email, then
requiring a valid mailbox address is perfectly reasonable.

--keith

--
kkeller-usenet(at)wombat(dot)san-francisco(dot)ca(dot)us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
Re: testing email deliverability... [message #186055 is a reply to message #186053] Thu, 05 June 2014 22:21 Go to previous messageGo to next message
Adrienne Boswell is currently offline  Adrienne Boswell
Messages: 25
Registered: October 2010
Karma: 0
Junior Member
Eli the Bearded <*@eli.users.panix.com> wrote

> In comp.lang.php, Adrienne Boswell <arbpen(at)yahoo(dot)com> wrote:
>> The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote
>>> what I want is a function like
>>> is_valid_mail("user12345(at)gmail(dot)com")
>> So, you could put something on your form like:
>>
>> "Please use a valid email address. Your issue will not be addressed
>> if our email to you is returned."
>
> If anyone believed that, Usenet would have been gone long ago.
> How many people post with valid email addresses? Certainly not
> Mr Ineptocracy.
>

The OP was asking about a form, not Usenet.

--
Adrienne Boswell
Arbpen Web Site Design Services - http://www.cavalcade-of-coding.info/
The Good Plate - Fresh Gourmet Recipes - http://the-good-plate.com/
Please respond to the group so others can share
Re: testing email deliverability... [message #186056 is a reply to message #186043] Fri, 06 June 2014 03:36 Go to previous messageGo to next message
Chuck Anderson is currently offline  Chuck Anderson
Messages: 63
Registered: September 2010
Karma: 0
Member
The Natural Philosopher wrote:
> On 05/06/14 04:04, Sam wrote:
>> The Natural Philosopher writes:
>>
>>> what I want is a function like
>>>
>>> is_valid_mail("user12345(at)gmail(dot)com")
>>>
>>> that will return true or false if gmail accepts the user as known (yes
>>> the spam is always @gmail.com) WITHOUT having to write a dns mx
>>> lookup, then connect to socket 25 and etc etc etc..
>>
>> I'm afraid that you will have to wait until someone invents a telepathic
>> computer, that will be able to accomplishing such an amazinf feat.
>>
>> Until then, unfortunately, a number of inconvenient laws of physics of
>> this universe will prevent anyone from determining whether an email
>> address is deliverable without looking up its MX server, and connecting
>> to the MX server's port 25.
>>
> I meant without me having to write such code,, but it seems someone
> already hass..
>
> http://www.tienhuis.nl/files/email_verify_source.php

I feel I'm about to step into a giant pile of doo, but .... Some years
back I used a Windows program from Analogx called listmaster pro to
verify email addresses manually (it is designed to be used with large
mail lists. I never verified more than several at a time). It always
gave me correct positive and negative results. It seems to me that, in
general, an email address can be verified as a valid mailbox - or not.
There are no guarantees, of course, but this program always gave me the
correct result.

--
*****************************
Chuck Anderson • Boulder, CO
http://cycletourist.com
Turn Off, Tune Out, Drop In
*****************************
Re: testing email deliverability... [message #186060 is a reply to message #186037] Fri, 06 June 2014 12:11 Go to previous messageGo to next message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma: 0
Senior Member
Am 2014-06-05 02:48, schrieb The Natural Philosopher:

> I have web contact pages which are used by anyone to send enquiries.
>
> I want to make sure that anyone using them has a valid reply address set
> in a web form BEFORE I forward the message on to the site administrators.

Without asking the MX you will never know, if the MX is willing to
accept the mail.

And even then - temporary 4xx-failures due to Greylisting are a valid
behaviour as well as failures due to a quota limitation etc. - which all
does *not* mean that the e-mail address is invalid. Unfortunately the
opposite behaviour - accepting a RCPT TO without any error in return -
must not be interpreted as "this is a valid address".

Therefore the usual way to handle this is to send an e-email with a
confirmation request so the user can approve that himself - combined
with a database table to store the pending approvals (which should
timeout after a certain time if no one approves the request - e.g. after
7 days).


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de
Re: testing email deliverability... [message #186061 is a reply to message #186056] Fri, 06 June 2014 13:41 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 6/5/2014 11:36 PM, Chuck Anderson wrote:
> The Natural Philosopher wrote:
>> On 05/06/14 04:04, Sam wrote:
>>> The Natural Philosopher writes:
>>>
>>>> what I want is a function like
>>>>
>>>> is_valid_mail("user12345(at)gmail(dot)com")
>>>>
>>>> that will return true or false if gmail accepts the user as known (yes
>>>> the spam is always @gmail.com) WITHOUT having to write a dns mx
>>>> lookup, then connect to socket 25 and etc etc etc..
>>>
>>> I'm afraid that you will have to wait until someone invents a telepathic
>>> computer, that will be able to accomplishing such an amazinf feat.
>>>
>>> Until then, unfortunately, a number of inconvenient laws of physics of
>>> this universe will prevent anyone from determining whether an email
>>> address is deliverable without looking up its MX server, and connecting
>>> to the MX server's port 25.
>>>
>> I meant without me having to write such code,, but it seems someone
>> already hass..
>>
>> http://www.tienhuis.nl/files/email_verify_source.php
>
> I feel I'm about to step into a giant pile of doo, but .... Some years
> back I used a Windows program from Analogx called listmaster pro to
> verify email addresses manually (it is designed to be used with large
> mail lists. I never verified more than several at a time). It always
> gave me correct positive and negative results. It seems to me that, in
> general, an email address can be verified as a valid mailbox - or not.
> There are no guarantees, of course, but this program always gave me the
> correct result.
>

And how did it know?

For instance - I have three domains. You can send and email to any
address at any of the three. But unless it's a valid address, the email
ends up in /dev/null.


--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
Re: testing email deliverability... [message #186062 is a reply to message #186061] Fri, 06 June 2014 14:37 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
On Fri, 06 Jun 2014 09:41:05 -0400, Jerry Stuckle wrote:

> On 6/5/2014 11:36 PM, Chuck Anderson wrote:

>> I feel I'm about to step into a giant pile of doo, but .... Some years
>> back I used a Windows program from Analogx called listmaster pro to
>> verify email addresses manually

> And how did it know?

> For instance - I have three domains. You can send and email to any
> address at any of the three. But unless it's a valid address, the email
> ends up in /dev/null.

Which brings us back round to:

The only way to guarantee that an email address is actually going to the
entity that entered it on your form is to send a verification code to the
email address.

And even then, I suspect that there are some smart spamming systems out
there that have email addresses and use eg curl to process the email
verification links (which is why I use entity and not person above).

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
Re: testing email deliverability... [message #186063 is a reply to message #186062] Fri, 06 June 2014 15:46 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 06/06/14 15:37, Denis McMahon wrote:
> On Fri, 06 Jun 2014 09:41:05 -0400, Jerry Stuckle wrote:
>
>> On 6/5/2014 11:36 PM, Chuck Anderson wrote:
>
>>> I feel I'm about to step into a giant pile of doo, but .... Some years
>>> back I used a Windows program from Analogx called listmaster pro to
>>> verify email addresses manually
>
>> And how did it know?
>
>> For instance - I have three domains. You can send and email to any
>> address at any of the three. But unless it's a valid address, the email
>> ends up in /dev/null.
>
> Which brings us back round to:
>
> The only way to guarantee that an email address is actually going to the
> entity that entered it on your form is to send a verification code to the
> email address.
>
> And even then, I suspect that there are some smart spamming systems out
> there that have email addresses and use eg curl to process the email
> verification links (which is why I use entity and not person above).
>
I juts love all this 'guarantee' when getting spam don from 99 to 1
would be a satisfactory result.

I don't care if I get false negatives ads long as the 99 true negatives
get rejected.


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
Re: testing email deliverability... [message #186064 is a reply to message #186063] Fri, 06 June 2014 17:39 Go to previous messageGo to next message
Keith Keller is currently offline  Keith Keller
Messages: 5
Registered: June 2014
Karma: 0
Junior Member
["Followup-To:" header set to comp.os.linux.misc.]

On 2014-06-06, The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:
>
> I juts love all this 'guarantee' when getting spam don from 99 to 1
> would be a satisfactory result.

You will almost certainly not get down to 99:1 with any method that
doesn't involve sending mail out with a token, and waiting for the user
to ack the token. My WAG is you might get down to 50:50. Other folks
might have different, better-informed guesses.

--keith



--
kkeller-usenet(at)wombat(dot)san-francisco(dot)ca(dot)us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
Re: testing email deliverability... [message #186065 is a reply to message #186044] Mon, 09 June 2014 09:30 Go to previous messageGo to next message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma: 0
Senior Member
Eli the Bearded, 2014-06-05 06:53:

> In comp.os.linux.misc, Tony Marston <TonyMarston(at)hotmail(dot)com> wrote:
>> "The Natural Philosopher" wrote:
>>> I want to make sure that anyone using them has a valid reply address set in
>>> a web form BEFORE I forward the message on to the site administrators.
>
> I'd like to verify that the lottery number is going to win before I buy the
> ticket. Unfortunely I don't think either of us is going to be happy.
>
>>> is_valid_mail("user12345(at)gmail(dot)com")
>
> Did you think that you are the first person to want this? Think how useful
> it would be for spammers to find new email addresses before sending email!
>
>> You can use the filter_var() function at
>> http://uk3.php.net/manual/en/function.filter-var.php to check that an email
>> address is syntactically valid, but you cannot check that an email exists
>> without sending an email and getting a response back.
>
> I have NEVER seen a "syntactically valid" check that really works. The

This one should:

<http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html>



--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de
Re: testing email deliverability... [message #186066 is a reply to message #186037] Mon, 09 June 2014 12:53 Go to previous messageGo to next message
Chris Davies is currently offline  Chris Davies
Messages: 6
Registered: June 2012
Karma: 0
Junior Member
In comp.os.linux.misc The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:
> I want to make sure that anyone using them has a valid reply address set
> in a web form BEFORE I forward the message on to the site administrators.

Short of emailing the address and waiting for a reply, you can't.

What you can do is determine whether the address is plausible (syntax,
possible delivery, etc.)

Chris
Re: testing email deliverability... [message #186068 is a reply to message #186065] Mon, 09 June 2014 23:08 Go to previous messageGo to next message
Eli the Bearded is currently offline  Eli the Bearded
Messages: 22
Registered: April 2011
Karma: 0
Junior Member
In comp.lang.php, Arno Welzel <usenet(at)arnowelzel(dot)de> wrote:
> Eli the Bearded, 2014-06-05 06:53:
>> I have NEVER seen a "syntactically valid" check that really works. The
> This one should:
> <http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html>

Did you actually read that page? Right there before the regexp is this
clear warning:

The regular expression does not cope with comments in email
addresses. The RFC allows comments to be arbitrarily nested. A
single regular expression cannot cope with this. The Perl module
pre-processes email addresses to remove comments before applying the
mail regular expression.

That particular test claims RFC822 awareness, but allows "å@å.å" which
does not pass the ASCII-ASCII-ASCII! RFC822 muster or RFC2822 muster,
even if it might be valid now depending on encoding (see RFC6532, which
first allowed non-ASCII email header values back in February 2012).

It also fails the too-rigid test: RFC822 does not allow email addresses
with a localpart that ends with a period, but periods are allowed
everywhere else in a localpart. This test enforces that rule, when real
world mailservers don't care all that much about <rfc822.@example.com>
not being RFC822 kosher.

Elijah
------
although a localpart of only periods is likely to fail
Re: testing email deliverability... [message #186069 is a reply to message #186068] Tue, 10 June 2014 09:08 Go to previous message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma: 0
Senior Member
Am 2014-06-10 01:08, schrieb Eli the Bearded:

> In comp.lang.php, Arno Welzel <usenet(at)arnowelzel(dot)de> wrote:
>> Eli the Bearded, 2014-06-05 06:53:
>>> I have NEVER seen a "syntactically valid" check that really works. The
>> This one should:
>> <http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html>
>
> Did you actually read that page? Right there before the regexp is this
> clear warning:
>
> The regular expression does not cope with comments in email
> addresses. The RFC allows comments to be arbitrarily nested. A
> single regular expression cannot cope with this. The Perl module
> pre-processes email addresses to remove comments before applying the
> mail regular expression.

Thanks for the clarification - I did not read that comment completely.



--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Classic Arcade Games for Windows
Next Topic: Re: PHP and Sqlite Encryption extension
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 14:44:17 GMT 2024

Total time taken to generate the page: 0.02419 seconds