[ 
https://issues.apache.org/jira/browse/VALIDATOR-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14936448#comment-14936448
 ] 

Jochen Wiedmann commented on VALIDATOR-376:
-------------------------------------------

Gut reaction (and without validating feasability):

Optionally perform a DNS lookup for MX records. Below you find an example, how 
a DNS lookup from the command line reveals a meaningful reply in the case of 
"gmail.com", but not in the case of "gmail".

Important part: Make this optional. There are a multitude of scenarios, where 
DNS lookups will not be possible.

-bash-3.2$ nslookup -type=mx gmail
Server:         85.214.7.22
Address:        85.214.7.22#53

Non-authoritative answer:
gmail   mail exchanger = 10 your-dns-needs-immediate-attention.gmail.

Authoritative answers can be found from:
your-dns-needs-immediate-attention.gmail        internet address = 127.0.53.53

-bash-3.2$ nslookup -type=mx gmail.com
Server:         85.214.7.22
Address:        85.214.7.22#53

Non-authoritative answer:
gmail.com       mail exchanger = 40 alt4.gmail-smtp-in.l.google.com.
gmail.com       mail exchanger = 10 alt1.gmail-smtp-in.l.google.com.
gmail.com       mail exchanger = 20 alt2.gmail-smtp-in.l.google.com.
gmail.com       mail exchanger = 30 alt3.gmail-smtp-in.l.google.com.
gmail.com       mail exchanger = 5 gmail-smtp-in.l.google.com.

Authoritative answers can be found from:
alt3.gmail-smtp-in.l.google.com internet address = 173.194.72.27
alt1.gmail-smtp-in.l.google.com internet address = 74.125.68.26
alt2.gmail-smtp-in.l.google.com internet address = 74.125.23.26
alt4.gmail-smtp-in.l.google.com internet address = 74.125.25.26
gmail-smtp-in.l.google.com      internet address = 74.125.136.26



> EmailValidator says addresses such as x.y@gmail are valid although most mail 
> apps will fail to send it
> ------------------------------------------------------------------------------------------------------
>
>                 Key: VALIDATOR-376
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-376
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Routines
>    Affects Versions: 1.4.1 Release
>            Reporter: Ralph Goers
>
> The VALIDATOR-273 patch causes EmailValidator to allow addresses such as 
> x.y@gmail. Unfortunately, this is causing us problems as none of the email 
> apps we have tried will actually allow that email address to be sent. 
> Although the RFCs may state it is valid, in practice it apparently isn't. 
> Some sort of option is needed to allow providing just the domain to fail. As 
> a consequence we have had to revert to a prior release of commons-validator.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to