backup.sh 没有向邮件发送任何报告

backup.sh 没有向邮件发送任何报告

我在 Ubuntu Server 16.04 中遇到了备份报告问题。在 Ubuntu Server 16.04 中,/usr/local/bin我有backup.sh一段时间没有收到来自此脚本的报告。在Ubuntu Server 16.04 中/var/mail/nobody,我看到尝试发送电子邮件,但出现一条消息:

<[email protected]>: host mymail.com [XXX.XXX.XX.XX] said: 550 5.7.1 Client host rejected: can not find your hostname (in reply to RCPT TO command).

当我输入 时 hostname -f,Ubuntu 返回“服务器”。在 中/etc/hostname我有“服务器”。我找不到负责发送报告的脚本。在 中backup.sh没有... 也许有人可以指导我...在main.cf(postfix) 中我有:

    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = server
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server.myname.pl, $myhostname, server, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.14.0/24
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
default_transport = smtp
relay_transport = smtp
inet_protocols = all

还有一件事...如果我发出命令

echo "This is the body of the email" | mail -s "This is the subject line" [email protected]

在 /var/mail/nobody 我有

From MAILER-DAEMON  Thu Mar 28 07:06:26 2019
Return-Path: <>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: by server (Postfix)
        id 4CE0E10085C; Thu, 28 Mar 2019 07:06:26 +0100 (CET)
Date: Thu, 28 Mar 2019 07:06:26 +0100 (CET)
From: [email protected] (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: [email protected]
Auto-Submitted: auto-replied
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
        boundary="14AB0100854.1553753186/server"
Message-Id: <20190328060626.4CE0E10085C@server>

This is a MIME-encapsulated message.
--14AB0100854.1553753186/server
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii

This is the mail system at host server.

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

<[email protected]>: host mydomain.pl[XX.XX.XX.X] said: 550 5.7.1 Client
    host rejected: cannot find your hostname (in reply to RCPT TO command)

--14AB0100854.1553753186/server
Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; server
X-Postfix-Queue-ID: 14AB0100854
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Thu, 28 Mar 2019 07:06:25 +0100 (CET)

Final-Recipient: rfc822; [email protected]
Original-Recipient: rfc822;[email protected]
Action: failed
Status: 5.7.1
Remote-MTA: dns; mydomain.pl
Diagnostic-Code: smtp; 550 5.7.1 Client host rejected: cannot find your
    hostname

--14AB0100854.1553753186/server
Content-Description: Undelivered Message
Content-Type: message/rfc822

Return-Path: <[email protected]>
Received: by server (Postfix, from userid 0)
        id 14AB0100854; Thu, 28 Mar 2019 07:06:26 +0100 (CET)
To: [email protected]
Subject: This is the subject line
Message-Id: <20190328060626.14AB0100854@server>
Date: Thu, 28 Mar 2019 07:06:25 +0100 (CET)
From: [email protected] (root)

This is the body of the email

--14AB0100854.1553753186/server--

答案1

由于你发布的信息非常模糊,我只能发布一个模糊的答案:

某个地方有东西正在向您发送邮件,但您不知道是什么。现在您收到了回复:

host mydomain.pl[XX.XX.XX.X] said: 550 5.7.1 Client
host rejected: cannot find your hostname (in reply to RCPT TO command)

上述含义意味着发送您邮件的服务器不再接受您的主机名。

联系所述邮件服务器的邮件管理员并让他们核实原因。(他们可能已经商业化,是一个开放的邮件中继,但现在已经不再是了,...)

相关内容