Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHPmailer泄露服务器IP地址,如何隐藏?_Php_Email_Smtp_Phpmailer - Fatal编程技术网

PHPmailer泄露服务器IP地址,如何隐藏?

PHPmailer泄露服务器IP地址,如何隐藏?,php,email,smtp,phpmailer,Php,Email,Smtp,Phpmailer,我使用CloudFlare隐藏原始服务器IP地址(防止对服务器的攻击、DDos…),但当我在站点上使用phpMail向客户发送确认电子邮件时,攻击者很容易获得原始IP,因为它位于电子邮件头中 PHPmailer设置为通过Google SMTP中继发送 Received: from www.website.com (webhosting2.xxx.cloud. [195.91.163.4]) by smtp-relay.gmail.com with ESMTPS id 88sm96

我使用CloudFlare隐藏原始服务器IP地址(防止对服务器的攻击、DDos…),但当我在站点上使用phpMail向客户发送确认电子邮件时,攻击者很容易获得原始IP,因为它位于电子邮件头中

PHPmailer设置为通过Google SMTP中继发送

Received: from www.website.com (webhosting2.xxx.cloud. [195.91.163.4])
        by smtp-relay.gmail.com with ESMTPS id 88sm967264wrf.7.2018.01.22.12.34.50
        for <thomas.cook@customer.com>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 22 Jan 2018 12:34:50 -0800 (PST)
X-Relaying-Domain: mywebsite.com
Date: Mon, 22 Jan 2018 20:34:50 +0000
To: thomas.cook@customer.com
From: "Website store" <info@mywebsite.com>
Reply-To: "Website store" <info@mywebsite.com>
Subject: Confirmation and payment instructions
Message-ID: <36830818e32b289e8637b8017a4fccf9@www.mywebsite.com>
X-Mailer: PHPMailer 5.2.23 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
收到:来自www.website.com(webhosting2.xxx.cloud[195.91.163.4])
通过smtp-relay.gmail.com发送,ESMTPS id为88sm967264wrf.7.2018.01.22.12.34.50
对于
(版本=TLS1_2密码=ECDHE-RSA-AES128-GCM-SHA256位=128/128);
2018年1月22日星期一12:34:50-0800(太平洋标准时间)
X-Relaying-Domain:mywebsite.com
日期:2018年1月22日星期一20:34:50+0000
致:托马斯。cook@customer.com
发件人:“网站商店”
回复:“网站商店”
主题:确认和付款说明
消息ID:
X-Mailer:PHPMailer 5.2.23(https://github.com/PHPMailer/PHPMailer)
MIME版本:1.0
内容类型:text/html;字符集=UTF-8
问题出现在第一行“接收:来自…(服务器主机名和IP)

您是否有任何提示可以修改PHPmailer代码或其他解决方案来隐藏原始服务器我的网站在哪里


谢谢

您无法阻止它出现,因为它是由接收服务器添加的,而不是由发送服务器添加的,因此它不受您的控制

因为您是在中继,所以根本没有特别的理由认为源服务器需要可以通过互联网访问;它所需要的唯一外部连接是到谷歌邮件服务器的出站SMTP,因此您可以阻止其他一切。如果防火墙是从您的服务器上游进行的,那么它将被很好地隔离,实际上不会受到任何DDoS流量的影响


这更多的是一个安全或服务器故障问题。

Service PostmarkApp.com可用于此目的。它用于事务性电子邮件(不用于营销),并隐藏原始服务器的IP地址。

这是网络标准的要求。转发电子邮件的每一步都应该创建一个
Received
行,显示该切换的详细信息。