Postfix 识别真正的发件人

Postfix 识别真正的发件人

最近我的服务器生成了很多垃圾邮件。我查看了示例邮件中的信息,但发件人显然是假的,邮件头中也没有 Postfix 用户 ID。以下是示例邮件的完整标题:

root@server:~# postcat -qv 400CB848E9
postcat: name_mask: all
postcat: inet_addr_local: configured 4 IPv4 addresses
postcat: inet_addr_local: configured 2 IPv6 addresses
*** ENVELOPE RECORDS hold/400CB848E9 ***
message_size:            2333             670               1               0            2333               0
message_arrival_time: Thu Jun 24 06:44:46 2021
create_time: Thu Jun 24 06:44:46 2021
named_attribute: log_ident=400CB848E9
named_attribute: rewrite_context=local
sender: [email protected]
named_attribute: log_client_name=localhost.localdomain
named_attribute: log_client_address=127.0.0.1
named_attribute: log_client_port=40070
named_attribute: log_message_origin=localhost.localdomain[127.0.0.1]
named_attribute: log_helo_name=localhost
named_attribute: log_protocol_name=ESMTP
named_attribute: client_name=localhost.localdomain
named_attribute: reverse_client_name=localhost.localdomain
named_attribute: client_address=127.0.0.1
named_attribute: client_port=40070
named_attribute: helo_name=localhost
named_attribute: protocol_name=ESMTP
named_attribute: client_address_type=2
named_attribute: dsn_orig_rcpt=rfc822;[email protected]
original_recipient: [email protected]
recipient: [email protected]
*** MESSAGE CONTENTS hold/400CB848E9 ***
regular_text: Received: from localhost (localhost.localdomain [127.0.0.1])
regular_text:   by dallas.mylocalhostdomain.com (Postfix) with ESMTP id 400CB848E9
regular_text:   for <[email protected]>; Thu, 24 Jun 2021 06:44:46 -0400 (EDT)
regular_text: From: Google Drive Storage <[email protected]>
regular_text: To: [email protected]
regular_text: MIME-Version: 1.0
regular_text: Message-ID: <[email protected]>
regular_text: Date: Thu, 24 Jun 2021 06:44:46 +0000
regular_text: Content-Type: text/html; charset=UTF-8
regular_text: Content-Transfer-Encoding: 7bit
regular_text: Subject: File is damaged and could not be repaired

从标题中可以看出,邮件的发件人是[email protected],但服务器上不存在此域名/用户。我感到很困惑,因为据我所知,用户必须存在于服务器上,SMTP 才能进行身份验证。此外,mail.log 文件中也没有身份验证信息。

我希望有人能帮忙指出如何识别生成此消息的真实用户?

谢谢你!

答案1

仔细看看这些:

sender: [email protected]
named_attribute: log_client_name=localhost.localdomain
named_attribute: log_client_address=127.0.0.1
named_attribute: log_client_port=40070
named_attribute: log_message_origin=localhost.localdomain[127.0.0.1]
named_attribute: log_helo_name=localhost
named_attribute: log_protocol_name=ESMTP
named_attribute: helo_name=localhost

这意味着,某个进程localhost(即服务器计算机本身)向此服务器发起了 ESMTP 事务。它以 开始,EHLO localhost然后,在没有任何身份验证的情况下,它被接受进行交付。我猜你也有127.0.0.1mynetworks它添加的“已接收”标头具有相同的信息(这并不奇怪)。

这就是 Postfix 所看到并能告诉你的全部信息。在其他地方寻找“谁是真正的发件人”的答案。这可能是网络邮件,因此请阅读网络服务器访问日志;这可能是服务器被入侵(哦!)或者只是 PHP 脚本中存在一些漏洞,允许发送邮件。检查 wtmp(last等等)。查找附近的日志2021 年 6 月 24 日星期四 06:44:46 -0400 (EDT)

我重申这一点,以免您换言之问同样的问题:Postfix 已尽其所能向您透露它从哪里收到这封邮件。它唯一知道的是邮件来自本地主机。这敲响了警钟:“检查您的本地主机”(服务器)。

相关内容