问题原文
原帖链接 · Kolitha Nilame · CC BY-SA 4.0
I am new to computer networking.
I have successfully added MX record of email service provider (Yandex), and it works finely. Also I added A record pointing to the Web Server which installed on VPS.
Now I want to redirect all mail to a Mail Server running on a different VPS (with Zimbra open source edition installed).
How could I do it using DNS Records?
已采纳解答
原帖链接 · HBruijn · CC BY-SA 4.0
For your scenario you typically end up with 4-6 DNS records.
- Two
AorAAAAresource records that point to the IPV4 (for instance 192.0.2.1) resp. IPv6 (for instance 2001:db8:10::1) ip-address of your webserver that will be accessible for visitors using the bare and www versions of your domain i.e.https://example.comandhttp://www.example.com. - One
AorAAAAresource record that poinst to the IPV4 (for instance 192.0.2.2) resp. IPv6 (for instance 2001:db8:10::2) of your mail server, for instance an aptly namedmail.example.com. That will also be the server name your mail users need to configue in their e-mail clients. - One
MXrecords that instructs mail servers to deliver messages with e-mail addresses using the domain suffix@example.com.to your mail server.
Everything after the ; is a comment by the way and should be omitted when you create your own DNS records:
example.com. IN A 192.0.2.1 ; IPv4 address for the bare domain
example.com. IN AAAA 2001:db8:10::1 ; IPv6 address for the bare domain
www.example.com. IN A 192.0.2.1 ; IPv4 address for www
www.example.com. IN AAAA 2001:db8:10::1 ; IPv6 address for www
mail.example.com. IN A 192.0.2.2 ; IPv4 address for mail
mail.example.com. IN AAAA 2001:db8:10::2 ; IPv6 address for mail
example.com. IN MX 1 mail.example.com. ; Direct SMTP e-mail to mail.example.com.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
