邮箱不可用服务器相应5.7.1,信箱不可用。(Mailbox unavailable. The server response was: 5.7.1 Unable to relay for abc@x...

信箱不可用。(Mailbox unavailable. The server response was: 5.7.1 Unable to relay for abc@xyz.com [closed])

当我尝试使用ASP.NET发送邮件时,我收到“ 邮箱不可用,服务器响应是:5.7.1无法中继abc@xyz.com ”。 该站点部署在IIS7,Windows 2008服务器上。

该网站在IIS6和Windows 2003 Server上工作正常 。 我在2008年的IIS7上部署了它,它已经开始给我这个错误。

有没有人经历过这个?

I am getting "Mailbox unavailable. The server response was: 5.7.1 Unable to relay for abc@xyz.com" when I try to send the mail using ASP.NET. The site is deployed on IIS7, Windows 2008 server.

The website was working fine on IIS6 and Windows 2003 Server. I deployed it on IIS7, 2008 it has started giving me this error.

Has anybody experienced this before?

原文:https://stackoverflow.com/questions/3165721

更新时间:2019-11-21 22:22

最满意答案

Aahh得到它...我得到它工作:)

谢谢克里斯托弗,你的建议是正确的。

但是,找到“默认SMTP虚拟服务器”是棘手的)

即使您使用IIS7部署您的网站,您必须打开IIS6管理器来配置SMTP服务器(为什么?)。

我配置SMTP服务器如下,使事情工作:

使用控制面板 - >管理工具打开IIS6管理器。

打开SMTP虚拟服务器属性。

在“常规”选项卡上,设置Web服务器的IP地址,而不是“全部未分配”。

在“访问”选项卡中,单击“中继”按钮,这将打开“中继限制”对话框。

在中继计算机列表中,添加环回IP地址,即127.0.0.1和Web服务器的IP地址,以便他们可以通过SMTP服务器传递/中继电子邮件。

Aahh got it... I got it working :)

Thanks Christopher, your suggesion is correct.

But, finding "Default SMTP Virtual Server" was tricky ;)

Even if you use IIS7 to deploy your web site, you have to open IIS6 Manager to configure SMTP server (why?).

I configured SMTP server as follows to make things work:

Open IIS6 Manager using Control Panel --> Administrative Tools.

Open SMTP Virtual Server properties.

On General tab, Set IP address of the Web server instead of "All Unassigned".

In Access tab, click on Relay button, this will open Relay Restrictions dialog.

In relay computers list, add the loopback IP address i.e 127.0.0.1 and IP address of the Web server, so that they can pass/relay emails through the SMTP server.

相关问答

我遇到了一个问题,我无法使用特定主机上的smtp.live.com SMTP服务器发送电子邮件 - 特别是Azure主机。 在我的情况中,SMTP尝试来自我以前从未使用过的主机,因此尝试被5.7.3错误阻止: 信箱不可用。 服务器响应是:5.7.3请求的操作中止; 用户未通过身份验证 解决方案是浏览到帐户设置,在最近的活动中找到SMTP请求,然后选择“这就是我”: I ran into an issue where I was unable to send emails using the smt

...

是的,这听起来像您使用的外部服务器不允许中继。 即使您拥有适当的身份验证凭据,您仍将无法发送电子邮件,因为继电器功能仍处于禁用状态。 你是这个外部服务器的管理员吗? 如果你是那么你可以启用它。 此链接介绍如何设置SMTP和中继。 如果你不是这个外部服务器的管理员,那么你将不得不与谁联系,以便他们能够启用SMTP并为你转发。 这听起来像您的网络上的服务器已安装SMTP,并且继电器设置正确,因为您可以发送。 我必须安装SMTP并在此处的所有三台服务器(开发箱,分段箱和生产箱)上配置中继以发送电子邮件。

...

Aahh得到它...我得到它工作:) 谢谢克里斯托弗,你的建议是正确的。 但是,找到“默认SMTP虚拟服务器”是棘手的) 即使您使用IIS7部署您的网站,您必须打开IIS6管理器来配置SMTP服务器(为什么?)。 我配置SMTP服务器如下,使事情工作: 使用控制面板 - >管理工具打开IIS6管理器。 打开SMTP虚拟服务器属性。 在“常规”选项卡上,设置Web服务器的IP地址,而不是“全部未分配”。 在“访问”选项卡中,单击“中继”按钮,这将打开“中继限制”对话框。 在中继计算机列表中,添加环回

...

关于SMTP的好处是很容易欺骗对话。 关于SMTP的可怕之处还在于它很容易欺骗对话。 这很棒的是,如果你想弄清楚SMTP连接中出了什么问题,你可以“telnet mailhost 25”并开始发出SMTP命令,如: HELO example.com

MAIL FROM:

RCPT TO:

DATA

Subject: test message

From: Me

To: Him

test mess

...

可以找到SMTP堆栈收到的完整消息,查看InnerException.Message属性。 就像是 if(smtpEx.InnerException != null)

{

LogMessage(smtpEx.InnerException.Message;

}

InnerException也是一个Exception,因此它带有一个带有消息的InnerException.InnerException属性。 这种情况一直持续到InnerException为空。 The comp

...

原来这是由于Rackspace的负载平衡器。 无论我的服务器设置在它下面,它默认为30秒。 如果有人需要使用该API,请参阅以下文章: https : //community.rackspace.com/products/f/25/t/89 Turns out it was due to Rackspace's load balancer. It was defaulted to 30 seconds no matter what my server was set to beneath it.

...

假设您的SMTP设置正确,这很可能是服务器端限制的情况...... 例如,为了防止垃圾邮件,服务器只接受来自静态发送方IP的smtp和/或正在检查发送方IP与MX记录(DNS)等。 Assuming your SMTP settings are correct this is most probably a case of a server-side restriction... For example to prevent spam the server only accepts smtp fr

...

我很确定如果你有client.UseDefaultCredentials = false; ,您需要设置凭据。 至少这是我做的: client.UseDefaultCredentials = false;

client.Credentials = new System.Net.NetworkCredential(someusername, somepassword);

编辑:我应该澄清client.UseDefaultCredentials = false; , client.UseDef

...

罗恩是正确的,只需使用587端口,它将按你的意愿工作。 检查此代码,看看它是否有效: using System;

using System.Windows.Forms;

using System.Net.Mail;

namespace WindowsApplication1

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent()

...

为防止滥用发送垃圾邮件 ,许多电子邮件服务器要求在中继邮件(将其转发到收件人的电子邮件服务器)之前将客户端验证为合法用户。 您已在IIS中指定凭据; 但是,PHP没有使用它们。 以下是您的选择: 而不是mail()函数,使用支持SMTP身份验证的现有PHP邮件程序库之一(PEAR Mail,phpmailer,Swift Mailer 等 )。 安装和配置msmtp或其中一个备选方案(这里是如何使msmtp与PHP一起工作 )。 如果您相应地设置sendmail_path ,PHP将执行该程序,该

...