阻止本地主机出现在电子邮件标题中



我正在尝试在Linux服务器上配置sendmail,以便在电子邮件头中不提及localhost。

我已经在/etc/sysconfig/network中设置了服务器主机名,并编辑了这一行我的sendmail里有Djmydomain.com。

但是邮件头仍然有这个:

Received: by x.x.x.x with SMTP id xxx;
        Sat, 5 Nov 2011 13:48:43 -0700 (PDT)
Received: by x.x.x.x with SMTP id xxx;
        Sat, 05 Nov 2011 13:48:41 -0700 (PDT)
Return-Path: <root@mydomain.com>
Received: from mydomain.com ([x.x.x.x])
        by mx.google.com with ESMTPS id xxx
        (version=TLSv1/SSLv3 cipher=OTHER);
        Sat, 05 Nov 2011 13:48:41 -0700 (PDT)
Received-SPF: neutral (google.com: x.x.x.x is neither permitted 
nor denied by best guess record for domain of root@mydomain.com) client-ip=x.x.x.x;
Authentication-Results: mx.google.com; spf=neutral (google.com: x.x.x.x is neither permitted nor denied by best guess record for domain of root@mydomain.com) smtp.mail=root@mydomain.com
Received: from mydomain.com (localhost.localdomain [127.0.0.1])
    by mydomain.com (...) with ESMTP id xxx
    for <me@myemailaddress.com>; Sat, 5 Nov 2011 20:48:44 GMT
Received: (from root@localhost)
    by mydomain.com (...) id xxx
    for me@myemailaddress.com; Sat, 5 Nov 2011 20:48:44 GMT
Date: Sat, 5 Nov 2011 20:48:44 GMT
From: root <root@mydomain.com>
Message-Id: <XXX>

我不认为引用到localhost。Localdomain和localhost应该在那里-我担心域名被列入黑名单等。

谁能告诉我怎么去掉它们?

谢谢!

修复下面命令报告的完全限定主机名

hostname --fqdn

它是OS/Distribution特有的。

强制sendmail使用cf/README文件中描述的另一个"此主机"名称

https://www.sendmail.com/sm/open_source/docs/m4/whoami.html

最新更新