试图摆脱传出电子邮件中的本地主机 – Sendmail

我正在运行sendmail,我已经出现在CBL上。 我已经解决了几个问题,但我无法弄清楚如何摆脱这两个本地主机提到。 我在我的/ etc / hosts文件中注释掉了localhost行,并且确保sendmail.cf中有一行代码:

Djmydomain.com 

我将继续寻找其他的事情,但我真的很喜欢我的邮件不被标记为垃圾邮件,因为我是一个sendmail新手。 提前致谢!

以下是我发送给我的Gmail帐户的邮件标题:

 Delivered-To: [email protected] Received: by 10.90.70.19 with SMTP id s19cs391179aga; Fri, 26 Feb 2010 17:18:08 -0800 (PST) Received: by 10.142.196.20 with SMTP id t20mr692104wff.88.1267233488585; Fri, 26 Feb 2010 17:18:08 -0800 (PST) Return-Path: <[email protected]> Received: from mydomain.com ([999.999.999.999]) by mx.google.com with ESMTP id 36si1793616pxi.21.2010.02.26.17.18.07; Fri, 26 Feb 2010 17:18:08 -0800 (PST) Received-SPF: pass (google.com: domain of [email protected] designates 999.999.999.999 as permitted sender) client-ip=999.999.999.999; Authentication-Results: mx.google.com; spf=pass (google.com: domain of [email protected] designates 999.999.999.999 as permitted sender) [email protected] 

******这个*******

 Received: from mydomain.com (ip6-localhost [127.0.0.1]) 

  by mydomain.com (8.14.2/8.14.2/Debian-2build1) with ESMTP id o1R1ICwB015625 for <[email protected]>; Fri, 26 Feb 2010 17:18:12 -0800 

******和这个:******

 Received: (from me@localhost) 

  by mydomain.com (8.14.2/8.14.2/Submit) id o1R1IC5W015624 for [email protected]; Fri, 26 Feb 2010 17:18:12 -0800 Date: Fri, 26 Feb 2010 17:18:12 -0800 From: me <[email protected]> Message-Id: <[email protected]> To: [email protected] Subject: test again test 

我只是试着在/ etc / hosts中注释掉一些与ipv6有关的代码,我得到了这个:

 Received: from mydomain.com (localhost [127.0.0.1] (may be forged)) 

这些看起来与你如何连接到sendmail有关(例如,从本地机器打开到它的TCP / IP连接)。 当你通过另一台机器上的sendmail实例发送邮件时,他们看起来有什么不同吗? 如果是这样,那么你的解决scheme是从本身发送邮件时以不同的方式连接到本地机器。

J.Ja

我决定卸载sendmail并安装postfix。

出于某种原因,卸载sendmail不会停止MTA,因此请运行

 ps aux | grep mail 

并手动终止进程。 Postfix的工作很好,开箱即用。

编辑:

此外,为了防止本地交付(除非你实际上使用popup等服务器提供电子邮件),在main.cf只是摆脱域名引用。 奇迹般有效。

Postfix:mailq命令的另一个好处是,如果他们拒绝邮件,就会显示来自服务器的反弹和回复。 我永远不能用sendmail来解决这个问题,但是用postfix这个mailq是非常有用的。