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

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

问题描述

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

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. 为什么文档中提到的 smtps 都没有被 MX 查找返回?
  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天全站免登陆