c# - 服务器响应为 : 5. 7.1 无法中继/邮件守护程序

标签 c# .net email smtp smtpclient

我已经仔细阅读了以下问题的答案,发现它非常有帮助。但是,关于 smtp 服务器的行为,我有一个不同的问题。 Mailbox unavailableRelay configuration

场景: 我有两个我无权访问的 smtp 服务器,即只有凭据。从 1 个服务器发送电子邮件时,我收到以下错误:

Mailbox unavailable. The server response was: 5.7.1 Unable to relay

Type: System.Net.Mail.SmtpFailedRecipientException:

Source:System

Stack Trace: at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message)

非常清楚,即 smtp 服务器无法中继消息。然而,在其他服务器上,SendEmail 方法没有抛出任何异常,但我收到一封 Mailer Daemon 电子邮件消息,指出:

This is the mail system at host test.relay.host.name.changed.

I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can delete your own text from the attached returned message.

The mail system

test1.test2@hotmail.com: host mx3.hotmail.com[xx.xx.xx.xxx] said: 550 Requested action not taken: mailbox unavailable (in reply to RCPT TO command)

问题:

  1. 为什么会有不同的行为?即在一种情况下我收到邮件 守护进程消息而在其他 SendEmail 方法中出现异常?

此外,

  1. 具体来说,邮件守护程序消息是如何工作的?因为根据 第二条消息似乎是中继发送的。
  2. 如果这是配置差异,那么它们是什么?

最佳答案

5.7.1 无法转发 - 这意味着邮件被发送到不同域中的用户并且邮件服务器无法“转发”它(基本上,它无法将它发送到另一个域

第二个错误“邮箱不可用”——这意味着Server已经确定该域属于Server并且已经确定没有邮箱

所以,在第一种情况下,它看起来是不同的域,而在第二种情况下,它是相同的域。

关于c# - 服务器响应为 : 5. 7.1 无法中继/邮件守护程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43988961/

相关文章:

c# - 从另一个站点重定向流时出现 502 错误

c# - 为多个设备创建相同的访问 token

php - LAMP Web App 中用户可配置的通知频率

c# - 尝试使用 LINQ to SQL 创建节点树会产生 NotSupportedException

c# - 将 DbSet 传递给参数类型为 IEnumerable<> 的方法时出现奇怪的 EF 行为

c# - 在 WCF 服务上使用 LoaderOptimizationAttribute

c# - 面向对象设计/设计模式场景

c# - 发出委托(delegate)函数调用

html - 为什么 HTML 电子邮件的样式在 Outlook 中不断变化?

Node.js(LoopBack 3) - 我可以通过 AWS SES 向多少个收件人发送电子邮件?