【问题标题】:Plesk/MailEnable SMTP Relay ErrorPlesk/MailEnable SMTP 中继错误
【发布时间】:2013-09-04 22:43:57
【问题描述】:

我在将 SMTP 电子邮件中继到 MailEnable 中的远程域时遇到问题,需要一些帮助来确定我在服务器设置中究竟缺少什么。

直到昨天我将 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

【问题讨论】:

    标签: email authentication dns smtp plesk


    【解决方案1】:

    好的,找到问题了。我用来测试问题的“外部”地址实际上位于我们的网站在移至此专用服务器之前所在的旧服务器上。显然,一旦我们离开它,我们网站的服务器上的站点/邮件设置就永远不会被删除。因此,当从我们的新服务器向仍托管在旧服务器上的地址发送和从该地址发送时,旧服务器将电子邮件解释为来自未经身份验证的内部地址。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-09-24
      • 1970-01-01
      • 2010-09-19
      • 2010-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多