我在server1.fvdevelopment.com上运行了一个ispconfig网络/邮件服务器,问题是我的邮件最终在Google上发送垃圾邮件。我已经设置了所有设置rDNS,DKIM,SPF,dmarc,在mail.tester.com上测试并获得了10/10所以我不认为记录部分会成为一个问题。但是,我的邮件头包含在一个地方localhost。根据谷歌的说法,这是一种不好的做法。
标题如下:
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
正如你所看到的那样,#34;收到了一个本地主机。部分。 我的/ etc / hosts看起来如下:
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
我的/ etc / hostname有server1.fvdevelopment.com。
关于如何摆脱localhost部分的任何想法,因为我尝试了很多变化,但无法摆脱它。
祝你好运, 特丽克丝
答案 0 :(得分:1)
日志中的邮件标题表明该邮件在发送到gmail之前在主机上内部转发了一两次。我不知道内部服务器设置是什么,但是看来“后缀”是在内部发送出去之前发送给它自己(或发送给它自己的另一个实例)的。在这些“跳数”之一中,发件人被检测到或报告为“本地主机”。
为避免这种情况,请执行以下操作: -修改/ etc / hosts,使其与本地主机和您的实际服务器名称不具有相同的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上)
检查与邮件服务相关的所有配置文件,以查找对“ 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
的情况。)
答案 1 :(得分:1)
选中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 {{1}的签名}
X-PHP-Originating-Script:
/^Received:/ IGNORE
/^X-PHP-Originating-Script:/ IGNORE
/^X-Originating-IP:/ IGNORE
/^X-Mailer:/ IGNORE
/^User-Agent:/ IGNORE
仅适用于外发邮件(smtp客户端)
答案 2 :(得分:0)
请记住^^如果您在Ispconfig的“全局过滤器”中进行了更改,那么所有手动编辑的正则表达式将从/ etc / postfix / header_checks中消失
我刚刚将这些字段直接添加到 电子邮件->内容过滤器
最诚挚的问候