MX 查找返回的具体地址是什么? [英] What addresses are exactly, returned by MX lookup?

查看:15
本文介绍了MX 查找返回的具体地址是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

寻找从 Python 代码发送电子邮件的方法时,我偶然发现了以下内容:
当我使用 host -t mx gmail.com 命令进行 MX 查找时(我从 这个答案),我得到以下信息:

While searching for a way to send an email from Python code, I have stumbled upon the following:
when I am doing an MX lookup with host -t mx gmail.com command (which I've "borrowed" from this answer), I am getting the following:

gmail.com mail is handled by 5 gmail-smtp-in.l.google.com.
gmail.com mail is handled by 30 alt3.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 20 alt2.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 10 alt1.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 40 alt4.gmail-smtp-in.l.google.com.

官方 gmail 文档中未提及这些服务器(那里有:smtp-relay.gmail.comsmtp.gmail.comaspmx.l.google.com).我的理解是 MX 查找应该返回负责处理域邮件的服务器地址(或它们的列表).

Non of this servers are mentioned in the official gmail docs (the ones that are there: smtp-relay.gmail.com, smtp.gmail.com, aspmx.l.google.com). My understanding was that MX lookup should return address of the server (or list of them), which is responsible for handling mails for the domain.

我的问题是:

  1. 为什么 MX 查找没有返回文档中提到的 smtps?
  2. MX 查找究竟返回了哪些服务器?
  3. 可以使用 MX 查找返回的服务器向域电子邮件(在本例中为 gmail)发送电子邮件吗?
  4. MX 查找返回的服务器能否用于向任意域电子邮件发送电子邮件?
  5. 如果答案为是",请回答前面两个问题中的任何一个 - 使用这些服务器需要什么身份验证?

推荐答案

通俗地说:

1.邮件交换记录(MX 记录)指定负责代表域名接受电子邮件的邮件服务器.提到的文档页面是关于使用 G Suite 发送电子邮件.

1. A mail exchanger record (MX record) specifies the mail server responsible for accepting email messages on behalf of a domain name. The mentioned doc page is about using G Suite to send email.

2.请参阅 1,这些是接收发往 gmail 的电子邮件的 Google 服务器.

2. See 1, Those are Google servers which receive email destined to gmail.

3.和 4. 有时(甚至可能非常频繁),相同的服务器既负责向外发送电子邮件,又负责接收域的电子邮件.电子邮件提供商越大,我猜这些角色分离的机会就越大.因此,其他域的电子邮件服务器将使用 MX 查找返回的服务器向 gmail 发送电子邮件,但一个(作为 gmail 用户)不能使用它们向其他域发送电子邮件.

3. and 4. Sometimes (or maybe even very often), the same server(s) are responsible both for both sending emails out, and receiving emails for the domain. The bigger the email provider, I guess the bigger the chance that those roles are separated. So, other domain's email servers will use servers returned by MX lookup to send emails to gmail, but one (as gmail user) can't use them to send emails to other domains.

5.对于是"部分,不需要身份验证(您不需要任何 gmail 凭据即可向@gmail 用户发送电子邮件)

5. For the "yes" part, no authentication is needed (you don't need any gmail credentials in order to send email to @gmail user)

这篇关于MX 查找返回的具体地址是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆