2

For the first one it returns:

Non-authoritative answer:
YAHOO.COMYAHOO.COMOO.COM        MX preference = 5, mail exchanger = mail.h-email.net

Also if you just duplicate the tld like

C:\Users\dmorri>nslookup -type=mx gmail.com.com.com.com.

You get an odd mail exchanger:

Non-authoritative answer:
gmail.com.com.com.com   MX preference = 10, mail exchanger = mx203.inbound-mx.net
gmail.com.com.com.com   MX preference = 10, mail exchanger = mx203.inbound-mx.org

How are you going to know when its really an invalid domain?

We don't want the domain look valid when it really is not!

3
  • com.com/legal "Com.com allows users to conduct searches by visiting sub-domains of Com.com. For example, if you visited "example.com.com" you might reach a page with information about "example." "
    – eis
    Jan 6, 2021 at 13:50
  • 2
    @eis: LOL I get a malware warning on com.com
    – joshudson
    Jan 6, 2021 at 17:26
  • 3
    Define "invalid" in "How are you going to know when its really an invalid domain?". Jan 6, 2021 at 19:57

3 Answers 3

31

I don't know if there is really that much of a "why" to talk about, probably more a change of perspective to see this for what it is.

Someone has registered comoo.com, someone has registered com.com.

These domains exist in the real world and while you clearly don't like them, that doesn't make them invalid in any technical sense.

As with any domain, the owner can add whatever records they like (in your example for subdomains of these).

5
  • Yeah..I am good with comoo.com and com.com etc. What I don't like is gmail.com.com.com.com (add as many com as you want) or YAHOO.COMYAHOO.COMOO.COM can match those. But I guess that is what wildcarding does? Jan 5, 2021 at 23:01
  • 16
    @DarrellMorris Well... if someone owns comoo.com then they can add whatever records they want, whether those are wildcards or not doesn't really make mucch difference from where we stand. What is the overall goal, in what context is YAHOO.COMYAHOO.COMOO.COM an actual concern? Jan 5, 2021 at 23:07
  • 10
    @DarrellMorris it's not so much about "wildcarding", it's about "if you control foo.bar then you control everything that ends with .foo.bar"
    – hobbs
    Jan 6, 2021 at 21:10
  • 1
    @HåkanLindqvist Clearly the actual concern with those mail aliases is that they'd get mail addressed to someone else because of typos. Jan 7, 2021 at 7:33
  • 3
    @FedericoPoloni I assume that you mean that they would get mail intended for someone else but addressed to them? That is indeed one possible interpretation, which would be tricky to "fix" in software as it's about intent rather than validity/correctness. For one thing, if you start overriding the stated delivery address based on some heuristics(?) that can cause the exact same type of problem but in a worse way; the user entered the correct address but the system changed it to something else and delivered the message to the wrong person. Jan 7, 2021 at 8:28
22

The answer is pretty simple.

The domain name yahoo.comyahoo.comoo.com belongs to the owners of comoo.com, and so those people can do whatever they want with it. The reason that yahoo.comyahoo.comoo.com returns an MX record is that the owners of comoo.com decided to make it do that.

Likewise, the domain name gmail.com.com.com.com belongs to the owners of com.com, and so those people can do whatever they want with it. They have decided to make gmail.com.com.com.com return an MX record.

I'm not sure why you think these domain names are invalid, or that there's some kind of problem here. These domain names are completely valid and there's no problem. Everything is working exactly as it's supposed to.

Perhaps you're thinking that the first part of a domain name is the most significant part and the last parts are not so significant. Actually, the opposite is true: the last parts are the most significant and the first part is the least significant.

It's just like how if you send a letter to Michigan City, Indiana, then it will go to the state of Indiana, not the state of Michigan. The fact that the address starts with the word "Michigan" doesn't matter, because the most significant part of the address is the end, not the beginning.

7

You are asking about a different domain:

# dig YAHOO.COMYAHOO.COMOO.COM MX @9.9.9.9
; <<>> DiG 9.16.8 <<>> YAHOO.COMYAHOO.COMOO.COM MX @9.9.9.9
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5554
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;YAHOO.COMYAHOO.COMOO.COM.  IN  MX

;; ANSWER SECTION:
YAHOO.COMYAHOO.COMOO.COM. 3595  IN  MX  5 mail.h-email.net.

;; Query time: 16 msec
;; SERVER: 9.9.9.9#53(9.9.9.9)
;; WHEN: (...) 2021
;; MSG SIZE  rcvd: 85

You are receiving a mail exchange DNS answer for COMOO.COM, the last bit (and valid domain name) for your misspelled query:

# dig COMOO.COM MX @9.9.9.9

; <<>> DiG 9.16.8 <<>> COMOO.COM MX @9.9.9.9
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3094
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;COMOO.COM.         IN  MX

;; ANSWER SECTION:
COMOO.COM.      3600    IN  MX  5 mail.h-email.net.

;; Query time: 24 msec
;; SERVER: 9.9.9.9#53(9.9.9.9)
;; WHEN: (...) 2021
;; MSG SIZE  rcvd: 70

Same for gmail.com.com.com.com - the domain com.com exists and has an MX entry which you can query. gmail.com.com.com.com looks like a machine on a subdomain of that main domain.

19
  • 5
    @DarrellMorris Pretty sure nslookup already used what you gave it. It just so happens that the owner of COMOO.COM has added records (wildcard?) such that YAHOO.COMYAHOO.COMOO.COM does have an MX (same idea for your other example). Jan 5, 2021 at 22:33
  • 7
    @DarrellMorris The point is that from a technical perspective both YAHOO.COMYAHOO.COMOO.COM and gmail.com.com.com.com are valid. There is no technical problem shown in the question. If you have a specific problem, can you clarify what it is? Jan 5, 2021 at 22:49
  • 9
    @DarrellMorris It is valid, though (from a DNS perspective, as for whether such an email address exists, I suppose is a different question) Jan 5, 2021 at 22:54
  • 4
    @DarrellMorris Apologies but why are you saying "it really isn't"? It is. The rules you are applying for "validity" come from you, others may have other rules! What are your rules?
    – Ned64
    Jan 5, 2021 at 22:55
  • 8
    @DarrellMorris I'd like to add that "auto-correcting" addresses is dangerous too. As an example, I often receive mails at my address <name>@gmail.com meant for somebody else <same-name>@mail.com (note the missing "g"). Both are actual valid email providers but some services seem to 'correct' mail.com to gmail.com, leading to the mails being delivered to me instead of their mailbox. Some services even allow me to login or reset the password! With a proper Double Opt-In this shouldn't happen. Jan 6, 2021 at 8:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .