Why can't I email myself at: [email protected]?

I opened cmd and typed ping gmail.com. It shows me:

C:\Windows\system32>ping gmail.com

Pinging gmail.com [74.125.235.55] with 32 bytes of data:
Reply from 74.125.235.55: bytes=32 time=6ms TTL=56
Reply from 74.125.235.55: bytes=32 time=6ms TTL=56
Reply from 74.125.235.55: bytes=32 time=6ms TTL=56
Reply from 74.125.235.55: bytes=32 time=215ms TTL=56

Ping statistics for 74.125.235.55:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 6ms, Maximum = 215ms, Average = 58ms

C:\Windows\system32>

I have a Gmail account, so I emailed myself but instead of [email protected] I used [email protected].

Response:

This is an automatically generated Delivery Status Notification

THIS IS A WARNING MESSAGE ONLY.

YOU DO NOT NEED TO RESEND YOUR MESSAGE.

Delivery to the following recipient has been delayed:

[email protected]

Message will be retried for 2 more day(s)

Technical details of temporary failure: The recipient server did not accept our requests to connect. Learn more at http://mail.google.com/support/bin/answer.py?answer=7720 [74.125.235.54 (1): Connection refused]

----- Original message -----

MIME-Version: 1.0 Received: by 10.223.93.196 with SMTP id w4mr3261626fam.44.1309944998035; Wed, 06 Jul 2011 02:36:38 -0700 (PDT) Received: by 10.223.104.194 with HTTP; Wed, 6 Jul 2011 02:36:37 -0700 (PDT) Date: Wed, 6 Jul 2011 17:36:37 +0800 Message-ID: Subject: test From: Joseph To: [email protected] Content-Type: multipart/alternative; boundary=20cf3054a49348815504a763560c

testtest

I did not receive the email. Why?

Why can't I just substitute the gmail.com part with 74.125.235.55?


Because 74.125.235.55 isn't the MX (mail exchange) for gmail.com.

If you ping gmail.com, ping uses the A record to perform its task, but sending emails (often) incorporates other servers.

You can use the tool dig (on Windows: nslookup -q=mx gmail.com as grawity mentioned in the comments) to see those DNS records:

Probe:~ trurl$ dig -t ANY gmail.com

; <<>> DiG 9.6.0-APPLE-P2 <<>> -t ANY gmail.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65087
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 9

;; QUESTION SECTION:
;gmail.com.         IN  ANY

;; ANSWER SECTION:
gmail.com.      3519    IN  MX  30 alt3.gmail-smtp-in.l.google.com.
gmail.com.      3519    IN  MX  5 gmail-smtp-in.l.google.com.
gmail.com.      74086   IN  NS  ns4.google.com.
gmail.com.      3519    IN  MX  10 alt1.gmail-smtp-in.l.google.com.
gmail.com.      74086   IN  NS  ns3.google.com.
gmail.com.      3   IN  A   209.85.148.18
gmail.com.      3519    IN  MX  40 alt4.gmail-smtp-in.l.google.com.
gmail.com.      3   IN  A   209.85.148.83
gmail.com.      3   IN  A   209.85.148.17
gmail.com.      74086   IN  NS  ns1.google.com.
gmail.com.      3   IN  A   209.85.148.19
gmail.com.      3519    IN  MX  20 alt2.gmail-smtp-in.l.google.com.
gmail.com.      74086   IN  NS  ns2.google.com.

As you can see, there are even multiple servers handling email for gmail.com and each of those have different priorities (the number in the last column).

And if you proceed further, you'll see that gmail-smtp-in.l.google.com (the first mx in the list above) points to a different IP address:

;; QUESTION SECTION:
;gmail-smtp-in.l.google.com.    IN  ANY

;; ANSWER SECTION:
gmail-smtp-in.l.google.com. 42  IN  A   74.125.39.27

So you'd have to use recipient@[74.125.39.27] (this is the right syntax as JdeBP mentioned in the comments).


BUT Google won't accept these mails:

Jul  6 13:25:15 lofi postfix/smtp[31213]: C6FXXXXXXX: to=<REMOVED@[74.125.39.27]>,
relay=74.125.39.27[74.125.39.27]:25, delay=3.4, delays=0.16/0.01/0.15/3.1, dsn=5.1.1,
status=bounced(host 74.125.39.27[74.125.39.27] said:
550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1 http://mail.google.com/support/bin/answer.py?answer=6596 REMOVEDg.99
(in reply to RCPT TO command))

Thinking further about this: Google won't or can't accept these mails because they don't know to whom you like to send it. The server behind 74.125.39.27 could handle emails for gmail.com, google.com, picasa.com (etc., etc...), so there's no way to distinguish the user.


When you send email to [email protected], the outgoing mail server uses the DNS MX record of the destination domain to determine which IP address is responsible for handling mail at that domain. This may not be the same IP address returned during a normal ping.

Using the 'dig' tool on Linux I can determine that the MX record for gmail.com resolves to the following set of servers:

gmail-smtp-in.l.google.com.
alt1.gmail-smtp-in.l.google.com.
alt2.gmail-smtp-in.l.google.com.
alt3.gmail-smtp-in.l.google.com.
alt4.gmail-smtp-in.l.google.com.

which produce completely different ping results:

$ ping gmail-smtp-in.l.google.com.
PING gmail-smtp-in.l.google.com (209.85.227.27) 56(84) bytes of data.
64 bytes from wy-in-f27.1e100.net (209.85.227.27): icmp_req=1 ttl=50 time=12.8 ms

Whether you can actually send email directly to that IP address likely depends on your email client and mail server, and you may need to put the address in square brackets as per slotishtype's answer.


Try to use:

email@[74.125.235.55]