Postfix 认为系统邮件是本地的
Postfix thinks the system email is local
我在 Ubuntu 14.04 服务器 运行 Nginx 上安装了 Postfix。当我安装它时,我把系统电子邮件设置为 'info@mydomain.com' 没有意识到它现在会认为这是一个本地邮箱。此电子邮件地址是一个 gmail 帐户,因此服务器需要查看 MX 记录。
我猜发生的事情是它看到它是一个本地地址并只是在本地发送它。我发送了一个测试:
echo "This is the body of the email" | mail -s "This is the subject line" info@mydomain.com
果然在 /var/mail/root 中有一条消息:
From MAILER-DAEMON Wed Sep 30 19:05:59 2015
Return-Path: <>
X-Original-To: root@mydomain.com
Delivered-To: root@mydomain.com
Received: by mydomain.com (Postfix)
id 5D29F1249E9; Wed, 30 Sep 2015 19:05:59 -0400 (EDT)
Date: Wed, 30 Sep 2015 19:05:59 -0400 (EDT)
From: MAILER-DAEMON@mydomain.com (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: root@mydomain.com
Auto-Submitted: auto-replied
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="52BC21249E1.1443654359/mydomain.com"
Message-Id: <20150930230559.5D29F1249E9@mydomain.com>
This is a MIME-encapsulated message.
--52BC21249E1.1443654359/mydomain.com
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii
This is the mail system at host mydomain.com.
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
<info@mydomain.com>: unknown user: "info"
--52BC21249E1.1443654359/mydomain.com
Content-Description: Delivery report
Content-Type: message/delivery-status
Reporting-MTA: dns; mydomain.com
X-Postfix-Queue-ID: 52BC21249E1
X-Postfix-Sender: rfc822; root@mydomain.com
Arrival-Date: Wed, 30 Sep 2015 19:05:59 -0400 (EDT)
Final-Recipient: rfc822; info@mydomain.com
Action: failed
Status: 5.1.1
Diagnostic-Code: X-Postfix; unknown user: "info"
--52BC21249E1.1443654359/mydomain.com
Content-Description: Undelivered Message
Content-Type: message/rfc822
Return-Path: <root@mydomain.com>
Received: by mydomain.com (Postfix, from userid 0)
id 52BC21249E1; Wed, 30 Sep 2015 19:05:59 -0400 (EDT)
Subject: This is the subject line
To: <info@mydomain.com>
X-Mailer: mail (GNU Mailutils 2.99.98)
Message-Id: <20150930230559.52BC21249E1@mydomain.com>
Date: Wed, 30 Sep 2015 19:05:59 -0400 (EDT)
From: root@mydomain.com (root)
This is the body of the email
--52BC21249E1.1443654359/mydomain.com--
我不确定如何让服务器将电子邮件发送到正确的位置?我应该将系统电子邮件更改为随机的吗?
我猜你可能已经安装了主机名 mydomain.com 的机器,因此 Postfix 配置为认为它正在回复 mydomain.com 的电子邮件。您可能想要编辑 /etc/postfix/main.cf
并从那里的 mydestination
行中删除您的域。 (然后重启 Postfix。)
我在 Ubuntu 14.04 服务器 运行 Nginx 上安装了 Postfix。当我安装它时,我把系统电子邮件设置为 'info@mydomain.com' 没有意识到它现在会认为这是一个本地邮箱。此电子邮件地址是一个 gmail 帐户,因此服务器需要查看 MX 记录。
我猜发生的事情是它看到它是一个本地地址并只是在本地发送它。我发送了一个测试:
echo "This is the body of the email" | mail -s "This is the subject line" info@mydomain.com
果然在 /var/mail/root 中有一条消息:
From MAILER-DAEMON Wed Sep 30 19:05:59 2015
Return-Path: <>
X-Original-To: root@mydomain.com
Delivered-To: root@mydomain.com
Received: by mydomain.com (Postfix)
id 5D29F1249E9; Wed, 30 Sep 2015 19:05:59 -0400 (EDT)
Date: Wed, 30 Sep 2015 19:05:59 -0400 (EDT)
From: MAILER-DAEMON@mydomain.com (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: root@mydomain.com
Auto-Submitted: auto-replied
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="52BC21249E1.1443654359/mydomain.com"
Message-Id: <20150930230559.5D29F1249E9@mydomain.com>
This is a MIME-encapsulated message.
--52BC21249E1.1443654359/mydomain.com
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii
This is the mail system at host mydomain.com.
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
<info@mydomain.com>: unknown user: "info"
--52BC21249E1.1443654359/mydomain.com
Content-Description: Delivery report
Content-Type: message/delivery-status
Reporting-MTA: dns; mydomain.com
X-Postfix-Queue-ID: 52BC21249E1
X-Postfix-Sender: rfc822; root@mydomain.com
Arrival-Date: Wed, 30 Sep 2015 19:05:59 -0400 (EDT)
Final-Recipient: rfc822; info@mydomain.com
Action: failed
Status: 5.1.1
Diagnostic-Code: X-Postfix; unknown user: "info"
--52BC21249E1.1443654359/mydomain.com
Content-Description: Undelivered Message
Content-Type: message/rfc822
Return-Path: <root@mydomain.com>
Received: by mydomain.com (Postfix, from userid 0)
id 52BC21249E1; Wed, 30 Sep 2015 19:05:59 -0400 (EDT)
Subject: This is the subject line
To: <info@mydomain.com>
X-Mailer: mail (GNU Mailutils 2.99.98)
Message-Id: <20150930230559.52BC21249E1@mydomain.com>
Date: Wed, 30 Sep 2015 19:05:59 -0400 (EDT)
From: root@mydomain.com (root)
This is the body of the email
--52BC21249E1.1443654359/mydomain.com--
我不确定如何让服务器将电子邮件发送到正确的位置?我应该将系统电子邮件更改为随机的吗?
我猜你可能已经安装了主机名 mydomain.com 的机器,因此 Postfix 配置为认为它正在回复 mydomain.com 的电子邮件。您可能想要编辑 /etc/postfix/main.cf
并从那里的 mydestination
行中删除您的域。 (然后重启 Postfix。)