从电子邮件标题中摆脱本地主机



我在server1.fvdevelopment.com上运行ispconfig web/mail服务器,问题是我的邮件最终在Google的垃圾邮件中。我已经设置了所有设置RDN,DKIM,SPF,DMARC,在mail.tester.com上对其进行了测试,并获得了10/10,因此我认为记录部分不会是问题。但是,我的邮件标头包含在Localhost的一个地方。根据Google,这是一种不好的做法。

标题将如下:

Delivered-To: hatrix05slk@gmail.com
Received: by 10.46.83.71 with SMTP id t7csp321551ljd;
        Thu, 5 Oct 2017 01:44:12 -0700 (PDT)
X-Google-Smtp-Source: AOwi7QDMToIk1MWaxUfmgNnk5OxLTcntcctaq1yCwSzOdCTObVb5C54D/RJ3P4u4hAh4aaMJIJqf
X-Received: by 10.223.184.246 with SMTP id c51mr12273556wrg.250.1507193052462;
        Thu, 05 Oct 2017 01:44:12 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1507193052; cv=none;
        d=google.com; s=arc-20160816;
        b=fStO+P6zBspVbKy7h/F6IdpvGd0ED+o9ci/3Sopz2cRJfBkESefBHjtO24hKzTNYIx
         w5djV02Cj71F4diVmYutOpoeP02plccscyLfhWs2HwxTQ9pjYpFxdmBLtEy1j+HEhVmT
         FVb+StuxHBSMYWjNtqren7MSkJBmMIpVCkzebETAdotjDS9g96JU/gFaXqccJIF5NEz5
         GVmtnL+S5dtH6Dv+fm9xZfRvTuTLyDvI+RidZ1ZHGW9ZHh2fkGV0EyZvTkboEe0okhQ7
         n9PbyX+20xGmwKCfWD7sb3ey1CHlqPUZokXC/uIRAlJ4rldEWtlTPxEX/6PeD+34Ucq7
         zfpw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=user-agent:message-id:from:date:content-transfer-encoding
         :mime-version:subject:to:dkim-signature:arc-authentication-results;
        bh=1Z7p1Z5uGEIf+6AZhZ9l3wWsFBizphzS8t8qmhwcSfY=;
        b=vGnssxKjYXLBobxlSLeMbWr7+1tXStKmXXCOpvVVhHQ+JAkrjr+4/ArjltNLGMybZT
         7XwX3zKmnh2ZP8U39BXDDccVYIqvCE9EK7Zfkkd+M70nr0EWMpRzgdoFGZsJjg5DCQRD
         6NymwJDulAKDhBYJocgjfZ06lok6vshrZqwMXcDJTzDwWjD+IUJTgBQy8py7vDlO4mPG
         Es2AsVUFNEJGikHs3gj7wFBJRR27bskeYYyJ0Z3tnVswDGn6k0+U/Kj3XV9acQE29936
         KgMcLX1eTE3/QiFiTRP7oW6gIrLoEynI5UU3b/Bgq3KppclHl9m4q3v1ASa6JyjmZL9n
         u8AA==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@magnorbertfotografus.hu header.s=default header.b=a0SJ1z55;
       spf=pass (google.com: domain of info@magnorbertfotografus.hu designates 207.154.236.132 as permitted sender) smtp.mailfrom=info@magnorbertfotografus.hu;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=magnorbertfotografus.hu
Return-Path: <info@magnorbertfotografus.hu>
Received: from server1.fvdevelopment.com (server1.fvdevelopment.com. [207.154.236.132])
        by mx.google.com with ESMTPS id a53si2257050wra.424.2017.10.05.01.44.11
        for <hatrix05slk@gmail.com>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 05 Oct 2017 01:44:12 -0700 (PDT)
Received-SPF: pass (google.com: domain of info@magnorbertfotografus.hu designates 207.154.236.132 as permitted sender) client-ip=207.154.236.132;
Authentication-Results: mx.google.com;
       dkim=pass header.i=@magnorbertfotografus.hu header.s=default header.b=a0SJ1z55;
       spf=pass (google.com: domain of info@magnorbertfotografus.hu designates 207.154.236.132 as permitted sender) smtp.mailfrom=info@magnorbertfotografus.hu;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=magnorbertfotografus.hu
Received: from localhost (server1.fvdevelopment.com [127.0.0.1]) by server1.fvdevelopment.com (Postfix) with ESMTP id C9E5285A71 for <hatrix05slk@gmail.com>; Thu,
  5 Oct 2017 10:44:11 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= magnorbertfotografus.hu; h=user-agent:message-id:from:from:date :date:content-transfer-encoding:content-type:content-type :mime-version:subject:subject; s=default; t=1507193051; x= 1509007452; bh=L/xoTp7H4vQf9Krt99Qa65fJYkTcTAh3O6MbrxKyYR8=; b=a 0SJ1z55WFSLwHWYpsIZvEBVijKT05TW0LRozWmVp/xtV0W78vd6t5uzoEUgoESWd RHQCNz781PsXPaqqQVO5N7SK4IjceWXBd8mpubx/VxAk2hur81vEvIgTBy2oawUG d1M8rxc93Uir+3otzamGkBcV/UDCJURYbUNpLF4kCl7aYrpqkQ0lm1TPukfYkGvK dOjB+ERahcFini3S1v50yEAXeWIarEa3UN4vdA8gh3SG4FBJ9Zi/4C306xh/nml9 /00ynI53loJSatmH7I63oPmyJs5c2+iaW5N11/PMRWfUK8aGp54zs8gqb0r51jXw J8GBQD8e3vNN8AkVo42QQ==
X-Virus-Scanned: Debian amavisd-new at server1.fvdevelopment.com
Received: from server1.fvdevelopment.com ([127.0.0.1]) by localhost (server1.fvdevelopment.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8b0IS0eBLm7u for <hatrix05slk@gmail.com>; Thu,
  5 Oct 2017 10:44:11 +0200 (CEST)
Received: by server1.fvdevelopment.com (Postfix, from userid 33) id 0E6148157A; Thu,
  5 Oct 2017 10:44:11 +0200 (CEST)
To: hatrix05slk@gmail.com
Subject: Friss hirek jöttek
X-PHP-Originating-Script: 0:rcube.php
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Date: Thu, 05 Oct 2017 10:44:10 +0200
From: "Mag Norbert Fotográfus" <info@magnorbertfotografus.hu>
Message-ID: <066c4122a97faef9edce55bfcfcbc8bf@magnorbertfotografus.hu>
X-Sender: info@magnorbertfotografus.hu
User-Agent: Roundcube Webmail/1.2-beta

如您所见,从"从"部分收到的地方有一个本地主机。我的/etc/主机看起来如下:

207.154.236.132 server1.fvdevelopment.com
127.0.0.1 server1.fvdevelopment.com server1
127.0.1.1 server1.fvdevelopment.com server1
127.0.0.1 localhost.localdomain localhost

my/etc/hostName具有server1.fvdevelopment.com。

关于如何摆脱当地主机部分的任何想法,因为我尝试了很多变化,但无法摆脱它。

最好的问候,trix

检查smtp_header_checks选项,例如在main.cf中添加此行:

smtp_header_checks = pcre:/usr/local/etc/postfix/header_checks.pcre

,在/usr/local/etc/postfix/header_checks.pcre中,您可以使用以下内容隐藏以Received:开头的额外标头,例如User-Agent,发件人IP甚至RoundCube X-PHP-Originating-Script:

的签名
/^Received:/                  IGNORE
/^X-PHP-Originating-Script:/  IGNORE
/^X-Originating-IP:/          IGNORE
/^X-Mailer:/                  IGNORE
/^User-Agent:/                IGNORE

smtp_header_checks仅适用于传出邮件(SMTP客户端)

日志中的邮件标头表示该消息在主机上内部转发一次或两次,然后将其发送到Gmail。我不知道内部服务器的设置是什么,但是" Postfix"似乎在熄灭之前将其发送给内部(或其他实例)。在其中一个"啤酒花"上,发件人被检测或报告为" localhost"。

要避免这种情况,请执行以下操作: - 修改/etc/hosts不要具有Localhost和您的实际服务器名称的相同IP地址,例如,尝试以下操作:

207.154.236.132 server1.fvdevelopment.com
127.0.1.1 server1.fvdevelopment.com server1
127.0.0.1 localhost.localdomain localhost

(请注意,"外部"名称不在127.0.0.1上)

  • 检查所有与邮件服务有关的config Files for to'localhost'的任何引用并杀死它们(用服务器名称替换)。

  • 检查所有与邮件服务有关的配置文件,涉及IP地址127.0.0.1的任何引用,并将其更改为127.0.1.1。这样,从主机到自身的"内部跳跃"的连接仍将在lo接口上,但不能在127.0.0.1上,因此它将没有机会将其反向分解为localhost

  • 验证所选的辅助本地地址(例如127.0.1.1)回到您的完整服务器名称(例如python -c 'import socket as s ; print (s.gethostbyaddr("127.0.1.1"))'

  • 验证hostname --fqdn是否返回server1.fvdevelopment.com(如果您的主机名设置为server1,通常是这种情况)。

只需记住^^如果您在ispconfig中的全局过滤器中更改某些内容,那么您所有手动编辑的REGEXES都会因/etc/etc/postfix/header_checks

而失败

我刚刚直接添加了这些字段电子邮件 ->内容过滤器

最好的问候

相关内容

  • 没有找到相关文章

最新更新