问题原文
原帖链接 · CROSP · CC BY-SA 3.0
I have basic understanding of how everything works. But I want to get better understanding and dive deeper.
I will how do I understand all these stuff.
Consider we are sending letter to [email omitted]
- When we are sending letter firstly DNS resolves
world.comdomain. - It asks
.DNS server than it is redirected to.com.DNS zone server and than to theNSserver/servers that are responsible for storing info aboutworld.comdomain. We can change(redirect to another)NSservers in domain control panel. - After finding proper
NSserver which is responsible for providing information about this domain it retrieves data aboutMXrecord. - Mail is sent to the SMTP server specified in
MXrecord usingSMTPprotocol - Because we are not using
POP3protocol over letter is saved on theSMTPserver responsible for maintenance of our domain (MX record). - So
SMTPserver backups all our mail on the server and we can access our mail from anywhere usingIMAPprotocol.
Am I right ?
Most of time MX record has hoster mail servers specified.
So my main question is
If I change MX record of my domain to another server, than I will lost all mail history ? Or it is possible to transfer mail to new server ? And if I switch back again to old SMTP server will I find all my mail there or it will be removed ?
Maybe I am completely wrong, but I will be grateful for any help.
已采纳解答
原帖链接 · Kondybas · CC BY-SA 3.0
MX (SMTP-server aka
MTA) can be configured as destination or relay for some mail domain(s).If it is configured as relay, message will be sent to another MTA that can be destination or relay too. And so forth. MX here is just an entrance point. Message can be routed to the different destinations, duplicated, terminated etc. That is how complex mail infrastructures look inside. Step by step message will be routed to the host, configured as destination. Otherwise, after some number of steps, message will be rejected as non-deliverable.
If host is configured as destination, messages are stored locally. That process is performed by
Local Delivery Agent- LDA. All SMTP servers have some LDA functionality, so they can store messages at least in themailboxformat.Mailboxis just a plain file with messages appended one by one. Alternatively messages can be stored in themaildiror even in the databases likemysqlorpostgres.From the local storage messages can be fetched by
Mail User Agentor MUA likemuttormailutilities. But if your messages are stored on the remote host, you need some service likePOP3orIMAPto fetch messages over network.
So messages are stored on the host not because there is no POP3 on the MX. That is happens because MX is configured as destination for domain and LDA is configured properly. Otherwise message will be returned to the sender with notification: can't deliver.
If I change MX record of my domain to another server, than I will lost all mail history ? Or it is possible to transfer mail to new server ?
The common approach is to configure your MX as relay that will route all the mail to the server, configured as destination. You can change MXses as you wish as long as they relay to the same destination server. But you also can physically move your mail storage to the other server as far as it's just plain files.
Popular email software like sendmail, postfix, exim, qmail, dovecot etc are powerful enough to build any configuration you want. But that require strong knowledge and skills, as far as you can easily become the victim of spammers who can use poorly configured server as spamgun.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
