Plesk / MailEnable SMTP中继错误

时间:2013-09-01 20:49:09

标签: email authentication dns smtp plesk

我在向MailEnable中的远程域发送SMTP电子邮件时遇到问题,需要一些帮助来确定我在服务器设置中缺少的内容。

我的设置实际上工作正常,直到昨天我将SPF记录添加到服务器的DNS设置中。然后从昨晚开始(下次系统尝试发送自动电子邮件时),远程地址的电子邮件开始失败。据我所知,我正在对SMTP呼叫的入站部分进行身份验证,但是当它尝试连接出站以将消息发送到其他服务器时,它就像我没有经过身份验证一样。

背景:这是我自己的服务器,从托管公司租用。我可以访问IIS / Plesk / MailEnable中站点的所有设置。每次我的自定义编写的VB.NET应用程序尝试将电子邮件发送到我自己的域上的另一个地址时,它都可以正常工作。每当我的应用尝试将相同的电子邮件发送到远程域中的地址时,我都会收到来自POSTMASTER@mydomain.com的电子邮件,其中包含以下内容:

MailEnable: Message could not be delivered to some recipients.
The following recipient(s) could not be reached:

    Recipient: [SMTP:user@otherdomain.com]
    Reason: 551 This mail server requires authentication before sending mail from a locally hosted domain. Please reconfigure your mail client to authenticate before sending mail.

我有一个简单的VB.NET测试程序,我已经编写过试图调试它:

    Dim replyTo As New System.Net.Mail.MailAddress("no-reply@mydomain.com", "MyUser")
    Dim subject As String = "Test subject"
    Dim SendTo As String = "user@otherdomain.com"
    Dim body As String = "This is the email."

    Dim message As New System.Net.Mail.MailMessage
    message.From = New System.Net.Mail.MailAddress("no-reply@mydomain.com", "MyUser")
    message.ReplyToList.Add(replyTo)
    message.BodyEncoding = System.Text.Encoding.ASCII
    message.IsBodyHtml = True
    message.Subject = subject
    message.Bcc.Add("mydomainBCC@mydomain.com")
    message.Body = body

    Dim smtp As New System.Net.Mail.SmtpClient("mydomain.com")
    Dim smtpCredential As System.Net.NetworkCredential = New System.Net.NetworkCredential("no-reply@mydomain.com", "password")
    smtp.UseDefaultCredentials = False
    smtp.Credentials = smtpCredential
    smtp.Port = 587
    smtp.Send(message)

在MailEnable中,我有:

  • 激活端口587并选中需要验证的框 在允许通过端口提交之前。再次,以上 当我发送到一个地址时程序工作(通过端口587) @ mydomain.com,但仍然无法发送到@ otherdomain.com的任何内容。
  • 在“中继”选项卡下,在“允许中继特权”中添加条目 IP范围“127.0.0.1中的每一个的选项,内部网络IP
    服务器的地址,以及服务器的外部IP地址。 (已经检查并且仍然检查了经过身份验证的用户的继电器选项)

为完整起见,这是昨天在DNS中设置的SPF记录:

v=spf1 a mx ipv4:75.XX.XX.XX include:_spf.google.com -all

MailEnable还在服务器的根驱动器上创建了一个名为SMTP-IN-TOP.TXT的文件,该文件记录了进入的身份验证的最高数量,我看到我在此文件中尝试了所有的尝试:

Recent Top Users    Authentications During Previous Hour
no-reply@mydomain.com   4

最后,这是来自MailEnable的活动和调试日志,显示了一个事务尝试:

的活动:

09/01/13 15:07:26   SMTP-IN 5300BA9154CC413AAD202DE4FBA6CB71.MAI    596 75.XX.XX.XX         220 mydomain.com ESMTP MailEnable Service, Version: 7.0-- ready at 09/01/13 15:07:26    0   0   
09/01/13 15:07:26   SMTP-IN 5300BA9154CC413AAD202DE4FBA6CB71.MAI    596 75.XX.XX.XX EHLO    EHLO mydomain-web-01    250-mydomain.com [75.XX.XX.XX], this server offers 4 extensions 127 21  
09/01/13 15:07:26   SMTP-IN 5300BA9154CC413AAD202DE4FBA6CB71.MAI    596 75.XX.XX.XX AUTH    {blank} 334 UGFzc3dvcmQ6    18  41  no-reply@mydomain.com
09/01/13 15:07:26   SMTP-IN 5300BA9154CC413AAD202DE4FBA6CB71.MAI    596 75.XX.XX.XX AUTH    d29iVFY=    235 Authenticated   19  10  no-reply@mydomain.com
09/01/13 15:07:26   SMTP-IN 5300BA9154CC413AAD202DE4FBA6CB71.MAI    596 75.XX.XX.XX MAIL    MAIL FROM:<no-reply@mydomain.com>   250 Requested mail action okay, completed   43  34  no-reply@mydomain.com
09/01/13 15:07:26   SMTP-IN 5300BA9154CC413AAD202DE4FBA6CB71.MAI    596 75.XX.XX.XX RCPT    RCPT TO:<adam.taylor@otherdomain.com>   250 Requested mail action okay, completed   43  36  no-reply@mydomain.com
09/01/13 15:07:26   SMTP-IN 5300BA9154CC413AAD202DE4FBA6CB71.MAI    596 75.XX.XX.XX RCPT    RCPT TO:<mydomainBCC@mydomain.com>  250 Requested mail action okay, completed   43  34  no-reply@mydomain.com
09/01/13 15:07:26   SMTP-IN 5300BA9154CC413AAD202DE4FBA6CB71.MAI    596 75.XX.XX.XX DATA    DATA    354 Start mail input; end with <CRLF>.<CRLF>    46  6   no-reply@mydomain.com
09/01/13 15:07:27   SMTP-OU D65C7059FE274FBCBA296953ABA4221F.MAI    780 50.XX.XX.XX CONN        220 recipientserver.com ESMTP MailEnable Service, Version: 6.53-- ready at 09/01/13 15:07:26    0   86  
09/01/13 15:07:27   SMTP-OU D65C7059FE274FBCBA296953ABA4221F.MAI    780 50.XX.XX.XX EHLO    EHLO mydomain.com   250-recipientserver.com [75.XX.XX.XX], this server offers 4 extensions  18  127 
09/01/13 15:07:27   SMTP-OU D65C7059FE274FBCBA296953ABA4221F.MAI    780 50.XX.XX.XX MAIL    MAIL FROM:<no-reply@mydomain.com> SIZE=423  551 This mail server requires authentication before sending mail from a locally hosted domain. Please reconfigure your mail client to authenticate before sending mail. 43  169 
09/01/13 15:07:27   SMTP-OU D65C7059FE274FBCBA296953ABA4221F.MAI    780 50.XX.XX.XX QUIT    QUIT    221 Service closing transmission channel    6   42  
09/01/13 15:07:28   SMTP-IN 8E182A43292745538949A1160E407982.MAI    780 127.0.0.1           220 mydomain.com ESMTP MailEnable Service, Version: 7.0-- ready at 09/01/13 15:07:28    0   0   
09/01/13 15:07:28   SMTP-OU D65C7059FE274FBCBA296953ABA4221F.MAI    576 127.0.0.1   CONN        220 mydomain.com ESMTP MailEnable Service, Version: 7.0-- ready at 09/01/13 15:07:28    0   85  
09/01/13 15:07:28   SMTP-IN 8E182A43292745538949A1160E407982.MAI    780 127.0.0.1   EHLO    EHLO mydomain.com   250-mydomain.com [127.0.0.1], this server offers 4 extensions   123 18  
09/01/13 15:07:28   SMTP-OU D65C7059FE274FBCBA296953ABA4221F.MAI    576 127.0.0.1   EHLO    EHLO mydomain.com   250-mydomain.com [127.0.0.1], this server offers 4 extensions   18  123 
09/01/13 15:07:28   SMTP-IN 8E182A43292745538949A1160E407982.MAI    780 127.0.0.1   MAIL    MAIL FROM:<> SIZE=1052  250 Requested mail action okay, completed   43  24  
09/01/13 15:07:28   SMTP-OU D65C7059FE274FBCBA296953ABA4221F.MAI    576 127.0.0.1   MAIL    MAIL FROM:<> SIZE=1052  250 Requested mail action okay, completed   24  43  
09/01/13 15:07:28   SMTP-IN 8E182A43292745538949A1160E407982.MAI    780 127.0.0.1   RCPT    RCPT TO:<no-reply@mydomain.com> 250 Requested mail action okay, completed   43  32  
09/01/13 15:07:28   SMTP-OU D65C7059FE274FBCBA296953ABA4221F.MAI    576 127.0.0.1   RCPT    RCPT TO:<no-reply@mydomain.com> 250 Requested mail action okay, completed   32  43  
09/01/13 15:07:28   SMTP-IN 8E182A43292745538949A1160E407982.MAI    780 127.0.0.1   DATA    DATA    354 Start mail input; end with <CRLF>.<CRLF>    46  6   
09/01/13 15:07:28   SMTP-OU D65C7059FE274FBCBA296953ABA4221F.MAI    576 127.0.0.1   DATA    DATA    354 Start mail input; end with <CRLF>.<CRLF>    6   46  
09/01/13 15:07:28   SMTP-OU D65C7059FE274FBCBA296953ABA4221F.MAI    576 127.0.0.1   DATE        250 Requested mail action okay, completed   1063    43  
09/01/13 15:07:28   SMTP-IN 05D1026706304C7F941CD6348057CC71.MAI    780 127.0.0.1   QUIT    QUIT    221 Service closing transmission channel    42  6   
09/01/13 15:07:28   SMTP-OU D65C7059FE274FBCBA296953ABA4221F.MAI    576 127.0.0.1   QUIT    QUIT    221 Service closing transmission channel    6   42  

调试:

09/01/13 15:07:26   ME-I0135: Authenticating User:no-reply@mydomain.com using Authentication Provider Credentials
09/01/13 15:07:26   ME-I0107: [596] Relay Granted: Sender IP (75.xx.xx.xx) is within an authorized IP range.
09/01/13 15:07:26   ME-I0101: [596] Local Delivery: Address ([SMTP:mydomainBCC@mydomain.com]) is local.
09/01/13 15:07:26   ME-I0149: [596] 5300BA9154CC413AAD202DE4FBA6CB71.MAI was received successfully and delivery thread was initiated
09/01/13 15:07:26   ME-E0070: (recv) socket [596] error during [DATA] command from host 75.xx.xx.xx. Socket was disconnected - Error: (10054)
09/01/13 15:07:26   ME-I0074: [596] (Debug) End of conversation
09/01/13 15:07:27   ME-I0018: [2B8847ABCC1242EDBF3417D32DA6DB59.MAI] Outbound message from ([SMTP:no-reply@mydomain.com]) requeued as [D65C7059FE274FBCBA296953ABA4221F.MAI] to the target domain [otherdomain.com]
09/01/13 15:07:27   ME-I0123: Domain [otherdomain.com] has MX list [mail.otherdomain.com]
09/01/13 15:07:27   ME-I0026: [D65C7059FE274FBCBA296953ABA4221F.MAI] Sending message
09/01/13 15:07:27   ME-IXXXX: [D65C7059FE274FBCBA296953ABA4221F.MAI] DNS resolved to the following record: IP Address=50.XX.XX.XX, Family=2, Type=1, Protocol=6
09/01/13 15:07:27   ME-IXXXX: [D65C7059FE274FBCBA296953ABA4221F.MAI] Remote server returned a response indicating a permanent error. Server Response: (551 This mail server requires authentication before sending mail from a locally hosted domain. Please reconfigure your mail client to authenticate before sending mail.**)
09/01/13 15:07:27   ME-E0036: [D65C7059FE274FBCBA296953ABA4221F.MAI] MAIL FROM command Failed.
09/01/13 15:07:27   ME-E0008: [D65C7059FE274FBCBA296953ABA4221F.MAI] Outbound, could not send the command to the server (error 10038).
09/01/13 15:07:27   ME-E0060: [D65C7059FE274FBCBA296953ABA4221F.MAI] - Message could not be delivered to target domain (otherdomain.com). Message returned to Sender.
09/01/13 15:07:28   ME-I0119: Domain [mydomain.com] has used local loopback address [127.0.0.1] because it is hosted locally.
09/01/13 15:07:28   ME-I0026: [D65C7059FE274FBCBA296953ABA4221F.MAI] Sending message
09/01/13 15:07:28   ME-IXXXX: [D65C7059FE274FBCBA296953ABA4221F.MAI] DNS resolved to the following record: IP Address=127.0.0.1, Family=2, Type=1, Protocol=0
09/01/13 15:07:28   ME-I0101: [780] Local Delivery: Address ([SMTP:no-reply@mydomain.com]) is local.
09/01/13 15:07:28   ME-I0149: [780] 8E182A43292745538949A1160E407982.MAI was received successfully and delivery thread was initiated
09/01/13 15:07:28   ME-I0049: [D65C7059FE274FBCBA296953ABA4221F.MAI] Send Completed Successfully
09/01/13 15:07:28   ME-I0074: [780] (Debug) End of conversation

1 个答案:

答案 0 :(得分:1)

好的,发现了问题。我用来测试问题的“外部”地址实际上是在移动到这个专用服务器之前我们网站所在的旧服务器上。显然,我们移动它后,我们网站的服务器上的站点/邮件设置从未被删除。因此,当从我们的新服务器发送到仍然托管在旧服务器上的地址时,旧服务器将该电子邮件解释为来自未经过身份验证的内部地址。