0
I'm trying to understand in detail how does email work. I've found a pretty good site (MX Record in DNS Explained with Example Configurations) describing the topic. Unfortunately there is some confusion i have. Here is what the site tells about sending an email:
Once your SMTP server finds the target receivers SMTP server, using an MX record lookup, it will forward the message to that server (through the internet ). Then the SMTP server will forward the message to POP or IMAP server responsible for the domain...
Say I'd like to send an email from john@yahoo.com
to marry@gmail.com
. According to the above statement my MUA
(mutt
in my case) sends the message to my SMTP server (which is smtp.mail.yahoo.com)
. Then smtp.mail.yahoo.com
use DNS lookup to get MX record for gmail.com
domain. As i checked the MX record for gmail.com
is gmail-smtp-in.l.google.com
with IP: 173.194.77.26
. From other side the address of gmail SMTP serer (smtp.gmail.com
) is: 173.194.77.108
. And here is the confusion.
- Shouldn't the above two addresses be the same (as i understand from the cited excerpt)? Why does the MX lookup returns reference to different machine then the
smtp.gmail.com
is? - Does it mean that the
smtp.mail.yahoo.com
forwards the message togmail-smtp-in.l.google.com
and if so whatsmtp.gmail.com
have to do in the process? - Where is the
marry
mailbox account hosted? Atgmail-smtp-in.l.google.com
,smtp.gmail.com
or maybeimap.gmail.com
serer?
Am i right that taking what You said reciver smtp (gmail-smtp-in.l.google.com) forwards the message to the mailbox hosting serwer in cloud and this is the last step in the email sending procesów. Now when the reciver wants to get a new message it just asks its imap serwer (imap.gmail.com) which then asks mentioned mailbox hosting serwer for the message in question? – Mulligan – 2017-02-02T23:17:31.847
Indeed, you're right. The last part of the process is not part of email standards, and can be done with SMTP, LMTP or some propietary protocol (like MS Exchange does). Probably Google would have built something propietary for this. – mtak – 2017-02-03T07:27:52.063