Sendmail 不会伪装电子邮件“已收到:”标头

Sendmail 不会伪装电子邮件“已收到:”标头

我按照以下指示进行操作尼克斯克拉夫特网站并尝试使用以下配置伪装我的电子邮件:

MASQUERADE_AS(example.com)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(example.com)dnl

并添加了以下内容:

MASQUERADE_DOMAIN(localhost)dnl
MASQUERADE_DOMAIN(localhost6.localdomain6)dnl
MASQUERADE_DOMAIN(mail.server)dnl

我做了一个测试:

$ echo "Subject: test
From: [email protected]
test" | sendmail -v [email protected] -O NoRecipientAction=add-to [email protected]

这就是我在标题中收到的内容:

Return-Path: <[email protected]>
Received: from mail.server (my.ip.add.ress) by verifier.port25.com id abcd1234 for <[email protected]>; Sun, 29 Jun 2014 01:23:45 -0400 (envelope-from <[email protected]>)
.....
Received: from mail.server (localhost6.localdomain6 [127.0.0.1])
    by mail.server (8.14.8/8.14.8) with ESMTP id s5T5XgSa003053
    (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)
    for <[email protected]>; Sun, 29 Jun 2014 12:34:56 +0800
Received: (from root@localhost)
    by mail.server (8.14.8/8.14.8/Submit) id s5T5XfHR003052
    for [email protected]; Sun, 29 Jun 2014 12:34:56 +0800

可以看出,mail.serverlocalhostlocalhost6.localdomain6仍然显示在“已接收”行中。我还应该做什么才能让 Sendmail 伪装正常工作。

答案1

您可以更改“此主机电子邮件名称”(在“已接收”标头中使用)定义confDOMAIN_NAME
https://www.sendmail.org/~ca/email/doc8.12/cf/m4/whoami.html

默认情况下,sendmail 的伪装仅更改标头发件人(例如From:标头)。它可以配置为更改信封发件人(MAIL FROM:在 SMTP 会话中)和/或标头收件人(例如To:Cc:标头)。 AFAIK 无论如何标题都不会改变Received:
https://www.sendmail.org/~ca/email/doc8.12/cf/m4/masquerading_relaying.html

相关内容