【问题标题】:sendmail on Mac OS X cannot send mail to a particular domainMac OS X 上的 sendmail 无法将邮件发送到特定域
【发布时间】:2013-11-27 20:32:47
【问题描述】:

我正在尝试在 Mac OS X 机器上设置 sendmail。它适用于我的 gmail 地址,但不适用于 @umich.edu 下的任何地址,这真的很奇怪。我认为这与我的主机设置有关,因为服务器在主机名 xxxx.umich.edu 上运行。而且我也试过其他域名,比如xxxx@ucsd.edu,也没用。

我认为 sendmail 实际上会尝试将电子邮件发送到 local.server,我不明白。

这里是来自 /var/mail/git 的日志(我不完全确定为什么它实际上在这里,但是成功发送到我的 gmail 帐户的电子邮件也转到这里):

--C3822326DF4F.1385583589/server.local--

From MAILER-DAEMON  Wed Nov 27 15:20:51 2013
Return-Path: <>
X-Original-To: git@server.local
Delivered-To: git@server.local
Received: by server.local (Postfix)
  id 76104326DFE9; Wed, 27 Nov 2013 15:20:51 -0500 (EST)
Date: Wed, 27 Nov 2013 15:20:51 -0500 (EST)
From: MAILER-DAEMON@server.local (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: git@server.local
Auto-Submitted: auto-replied
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
  boundary="3A17D326DFE1.1385583651/server.local"
Message-Id: <20131127202051.76104326DFE9@server.local>

This is a MIME-encapsulated message.

--3A17D326DFE1.1385583651/server.local
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii

This is the mail system at host server.local.

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

<yunqi@umich.edu>: host mx2.umich.edu[141.211.124.87] said: 550 Unknown host:
    server.local (in reply to MAIL FROM command)

--3A17D326DFE1.1385583651/server.local
Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; server.local
X-Postfix-Queue-ID: 3A17D326DFE1
X-Postfix-Sender: rfc822; git@server.local
Arrival-Date: Wed, 27 Nov 2013 15:20:49 -0500 (EST)

Final-Recipient: rfc822; yunqi@umich.edu
Action: failed
Status: 5.0.0
Remote-MTA: dns; mx2.umich.edu
Diagnostic-Code: smtp; 550 Unknown host: server.local

--3A17D326DFE1.1385583651/server.local
Content-Description: Undelivered Message
Content-Type: message/rfc822

Return-Path: <git@server.local>
Received: by server.local (Postfix, from userid 505)
  id 3A17D326DFE1; Wed, 27 Nov 2013 15:20:49 -0500 (EST)
To: yunqi@umich.edu
Subject: Put a subject here
From: to_whoever@example.org
Message-Id: <20131127202050.3A17D326DFE1@server.local>
Date: Wed, 27 Nov 2013 15:20:49 -0500 (EST)

Of cause, here's the place to put the body

--3A17D326DFE1.1385583651/server.local--

From MAILER-DAEMON  Wed Nov 27 15:20:51 2013
Return-Path: <>
X-Original-To: git@server.local
Delivered-To: git@server.local
Received: by server.local (Postfix)
  id 76929326DFEA; Wed, 27 Nov 2013 15:20:51 -0500 (EST)
Date: Wed, 27 Nov 2013 15:20:51 -0500 (EST)
From: MAILER-DAEMON@server.local (Mail Delivery System)
Subject: Mail Delivery Status Report
To: git@server.local
Auto-Submitted: auto-replied
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
  boundary="3A17D326DFE1.1385583651/server.local"
Message-Id: <20131127202051.76929326DFEA@server.local>

This is a MIME-encapsulated message.

--3A17D326DFE1.1385583651/server.local
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii

This is the mail system at host server.local.

Enclosed is the mail delivery report that you requested.

                   The mail system

<yunqi@umich.edu>: delivery via mx2.umich.edu[141.211.124.87]:25: host
    mx2.umich.edu[141.211.124.87] said: 550 Unknown host: server.local (in
    reply to MAIL FROM command)

--3A17D326DFE1.1385583651/server.local
Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; server.local
X-Postfix-Queue-ID: 3A17D326DFE1
X-Postfix-Sender: rfc822; git@server.local
Arrival-Date: Wed, 27 Nov 2013 15:20:49 -0500 (EST)

Final-Recipient: rfc822; yunqi@umich.edu
Action: failed
Status: 5.0.0
Remote-MTA: dns; mx2.umich.edu
Diagnostic-Code: smtp; 550 Unknown host: server.local

--3A17D326DFE1.1385583651/server.local
Content-Description: Message Headers
Content-Type: text/rfc822-headers

Return-Path: <git@server.local>
Received: by server.local (Postfix, from userid 505)
  id 3A17D326DFE1; Wed, 27 Nov 2013 15:20:49 -0500 (EST)
To: yunqi@umich.edu
Subject: Put a subject here
From: to_whoever@example.org
Message-Id: <20131127202050.3A17D326DFE1@server.local>
Date: Wed, 27 Nov 2013 15:20:49 -0500 (EST)

--3A17D326DFE1.1385583651/server.local--

这是来自 /var/log/mail.log 的日志:

Nov 27 15:20:13 server.local postfix/master[64261]: master exit time has arrived
Nov 27 15:20:50 server.local postfix/master[64355]: daemon started -- version 2.9.4, configuration /Library/Server/Mail/Config/postfix
Nov 27 15:20:50 server.local postfix/pickup[64356]: 3A17D326DFE1: uid=505 from=<git>
Nov 27 15:20:50 server.local postfix/cleanup[64358]: 3A17D326DFE1: message-id=<20131127202050.3A17D326DFE1@server.local>
Nov 27 15:20:50 server.local postfix/qmgr[64357]: 3A17D326DFE1: from=<git@server.local>, size=338, nrcpt=1 (queue active)
Nov 27 15:20:51 server.local postfix/smtp[64360]: 3A17D326DFE1: to=<yunqi@umich.edu>, relay=mx2.umich.edu[141.211.124.87]:25, delay=2.1, delays=0.86/0.01/1.2/0.03, dsn=5. 0.0, status=bounced (host mx2.umich.edu[141.211.124.87] said: 550 Unknown host: server.local (in reply to MAIL FROM command))
Nov 27 15:20:51 server.local postfix/cleanup[64358]: 76104326DFE9: message-id=<20131127202051.76104326DFE9@server.local>
Nov 27 15:20:51 server.local postfix/qmgr[64357]: 76104326DFE9: from=<>, size=2142, nrcpt=1 (queue active)
Nov 27 15:20:51 server.local postfix/bounce[64366]: 3A17D326DFE1: sender non-delivery notification: 76104326DFE9
Nov 27 15:20:51 server.local postfix/cleanup[64358]: 76929326DFEA: message-id=<20131127202051.76929326DFEA@server.local>
Nov 27 15:20:51 server.local postfix/qmgr[64357]: 76929326DFEA: from=<>, size=1898, nrcpt=1 (queue active)
Nov 27 15:20:51 server.local postfix/bounce[64367]: 3A17D326DFE1: sender delivery status notification: 76929326DFEA
Nov 27 15:20:51 server.local postfix/qmgr[64357]: 3A17D326DFE1: removed
Nov 27 15:20:51 server.local postfix/local[64368]: 76104326DFE9: to=<git@server.local>, relay=local, delay=0.01, delays=0/0.01/0/0, dsn=2.0.0, status=sent (delivered to   mailbox)
Nov 27 15:20:51 server.local postfix/qmgr[64357]: 76104326DFE9: removed
Nov 27 15:20:51 server.local postfix/local[64368]: 76929326DFEA: to=<git@server.local>, relay=local, delay=0.01, delays=0/0.01/0/0, dsn=2.0.0, status=sent (delivered to   mailbox)
Nov 27 15:20:51 server.local postfix/qmgr[64357]: 76929326DFEA: removed
Nov 27 15:21:50 server.local postfix/master[64355]: master exit time has arrived

【问题讨论】:

    标签: macos git email localhost postfix-mta


    【解决方案1】:

    这是该行最后一部分中解释的所有内容:

    Nov 27 15:20:51 server.local postfix/smtp[64360]: 3A17D326DFE1: to=<yunqi@umich.edu>, relay=mx2.umich.edu[141.211.124.87]:25, delay=2.1, delays=0.86/0.01/1.2/0.03, dsn=5. 0.0, status=bounced (host mx2.umich.edu[141.211.124.87] said: 550 Unknown host: server.local (in reply to MAIL FROM command))
    

    如您所见,您发送到中继 mx2.umich.edu[141.211.124.87] 的消息被退回并出现以下错误:550 Unknown host: server.local (in回复 MAIL FROM 命令)) 这很好地解释了自己。

    this link你可以看到SMTP代码550到底是什么意思,和你的情况下服务器返回的解释类似:
    SMTP Error 550会如果收件人电子邮件地址在远程端根本不存在,则被许多服务器返回。

    因此,您尝试访问的特定服务器似乎已配置为检查远程域是否有效,但不幸的是 server.local 不是有效的域名。

    【讨论】:

    • 感谢您的回复。那么如何才能真正配置远程域,因为我认为 server.local 也不是有效域。
    猜你喜欢
    • 2014-04-23
    • 1970-01-01
    • 2014-12-14
    • 1970-01-01
    • 2014-09-03
    • 1970-01-01
    • 2018-07-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多