D
D
DVoropaev2017-10-03 18:49:07
System administration
DVoropaev, 2017-10-03 18:49:07

How does email work?

The general picture looks like this:
There is a mail transfer agent (MTA), it is responsible for exchanging mail between mail servers (between other MTAs?)
There is an MUA - an agent that is responsible for delivering it to the end user.
Here is a detailed diagram from Wikipedia: 650px-MTA-MDA-MUA_relationship.svg.png
Image caption:

(spoiler)
MTA (англ. Mail Transfer Agent — агент пересылки почты) — отвечает за пересылку почты между почтовыми серверами; как правило, первый MTA в цепочке получает сообщение от MUA, последний передаёт сообщение к MDA; возможна реализация с отправкой почты через smart host.
MDA (англ. Mail Delivery Agent — агент доставки почты) — отвечает за доставку почты конечному пользователю.
MUA (англ. Mail user agent — почтовый агент пользователя; в русской нотации закрепился термин почтовый клиент) — программа, обеспечивающая пользовательский интерфейс, отображающая полученные письма и предоставляющая возможность отвечать, создавать, перенаправлять письма.

Explain to me how mail is sent according to this scheme. when I write to gmail from mail.ru?
What will be the MTU, what will be the MUA, where exactly are all received letters stored?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Mikhail Grigoriev, 2017-10-03
@Sleuthhound

Let's take two mail providers: mail.ru and gmail.com.
Two users, respectively, have registered on them: [email protected] and [email protected]
In order for A to successfully send a letter to recipient B, and he accepted it, the following happens.
The scheme is quite simple: The
sender [email protected] sends a letter to the recipient [email protected]
The mail.ru server (MTA), having received the task using the MUA mail intermediary (the client mail program (The Bat, Mozilla Thunderbird)) via the SMTP protocol, looks for mail server gmail.com (MTA) by the domain part of the address (in our case gmail.com) via DNS. The mail.ru SMTP server looks for an MX record (mail exchange) in the DNS for the gmail.com domain, and it points to the MTA server of the recipient [email protected] (in the simple case).
Next, MTA mail.ru contacts MTA gmail.com using the SMTP protocol, a series of checks are made by both servers, if everything is successful, then the letter is transferred to the mail queue of the gmail.com server.
The gmail.com MTA then delivers the email to the incoming mail server (called the MDA, which is the email delivery agent), which stores the email in user [email protected]'s mailbox, waiting for it to be received by the user. Then, using the MUA (client mail program (The Bat, Mozilla Thunderbird)) user [email protected] extracts a letter from the MDA using the POP or IMAP protocol.
The MUA can be a web interface used to interact with the incoming mail server (MDA) and the outgoing mail server (MTA).

V
Vladimir Dubrovin, 2017-10-04
@z3apa3a

This is an incorrect scheme, respectively, the above comments are incorrect.
MTA (mail transfer agent) is used for mail exchange between servers, MDA (mail delivery agent) for local delivery of a letter to a mailbox, and MTA and MDA work on mail servers. The MTA and MDA can be part of the same mailer (most MTAs support local delivery to some degree), or they can be different applications. But neither MTA nor MDA are related to the user's computer, they work on the mail server. MUA is used to receive a letter from a mailbox, create a letter, send a letter to MTA.
The scheme is as follows:
1. MUA generates a letter. The MUA can be a mail program or a web interface.
2. The MUA sends the letter to the sender's MTA (relay), in the case of a mail program, via the SMTP Submission protocol (SMTP with authorization), in the case of a web interface, usually directly.
3. The MTA of the sender (relay) determines the MTA of the recipient (mail exchanger) via MX or A DNS records.
4. The sender's MTA (relay) forwards the message to the recipient's MTA (mail exchanger) using the SMTP protocol (without authentication)
5. The recipient's MTA either forwards the message to the MDA for local delivery to the mailbox (normal delivery path) or forwards the message to another MTA, for example, if the mailbox is redirected.
6. MDA puts the letter in the recipient's mailbox
7. The recipient's MUA receives the letter from the mailbox via POP3, IMAP4 or web interface

M
mafusailmagoga, 2017-10-03
@mafusailmagoga

Something like this
1. You write a letter.
2. It is placed in the queue to MTA mail.ru
3. Leaves, passes through the MTA row, reaches the final one, which is Google
4. Is placed in the database in Google
Mustache.
mail.ru and gmail actually don't have an MTU.
There are quite sophisticated systems for storing letters, for searching - full-fledged databases.

T
t_q_l, 2017-10-04
@t_q_l

c3ff4-tutorial44.jpg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question