简体   繁体   English

如果发送SMTP消息需要认证,不同的邮件服务器如何互相发送消息?

[英]If authentication is required to send SMTP messages, how do different mail servers send messages to each other?

To learn about email and SMTP, I wrote a basic SMTP client using sockets to push an email to my outlook account, following an example from a textbook. To learn about email and SMTP, I wrote a basic SMTP client using sockets to push an email to my outlook account, following an example from a textbook.

I ran into a hiccup though, when the outlook mail server required me to authenticate before I could send the email.不过,当 outlook 邮件服务器要求我在发送 email 之前进行身份验证时,我遇到了麻烦。 After researching the issue, I learned this is to prevent mass email spam and sender spoofing, which makes sense.在研究了这个问题后,我了解到这是为了防止大量 email 垃圾邮件和发件人欺骗,这是有道理的。 I resolved this by authenticating using my outlook email and sending the email to myself.我通过使用我的 outlook email 进行身份验证并将 email 发送给我自己解决了这个问题。

My follow up questions that I'm having trouble finding an answer to are:我无法找到答案的后续问题是:

  1. If a different mail server, such as google, needs to push an email to my outlook inbox, how does it authenticate?如果其他邮件服务器(例如 google)需要将 email 推送到我的 outlook 收件箱,它如何进行身份验证? Does the google mail server have an account with outlook?谷歌邮件服务器是否有 outlook 的帐户?

  2. Is it not possible to just send mail between any two mail servers?不能只在任意两个邮件服务器之间发送邮件吗? Do the mail server admins need to white list other email servers first?邮件服务器管理员是否需要先将其他 email 服务器列入白名单?

Found my answer here: How to send a mail directly to SMTP server without authentication?在这里找到我的答案: How to send a mail directly to SMTP server without authentication?

Turns out, I was not connecting to an external SMTP server for outlook, but rather a server for users to perform actions with their outlook account specifically.事实证明,我并没有连接到用于 outlook 的外部 SMTP 服务器,而是用于用户使用其 outlook 帐户执行操作的服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM