繁体   English   中英

使用 AWS EC2 在 cpanel 上配置反向 DNS PTR

[英]Config reverse DNS PTR on cpanel with AWS EC2

这里的任何人都有 AWS EC2 在 Cpanel 主机上配置 SMTP 的经验。

完成配置后,DKIM 有效,SPF 有效,但 PTR 无效(反向 DNS)。 然后,当我将测试 email 发送到 mail-tester.com 时,它是 3/10。 这是错误消息

We didn't find a server (A Record) behind your hostname ip-172-31-1-135.ap-southeast-1.compute.internal.

You may want to publish a DNS record (A type) for the hostname 
ip-172-31-1-135.ap-southeast-1.compute.internal or use a different hostname in your mail software.

我是 DNS 东西的新手,如果您需要更多信息,请给我评论。

  1. 您应该将您的邮件服务器软件配置为使用您的自定义主机名(例如mail.example.com ),而不是 AWS 分配的默认值(例如ip-172-31-1-135.ap-southeast-1.compute.internal

  2. 您需要联系 AWS 支持以配置 PTR 记录https://aws.amazon.com/blogs/aws/reverse-dns-for-ec2s-elastic-ip-addresses/

  3. 请记住,默认情况下,Amazon EC2 会限制所有 EC2 实例的端口 25 上的流量,但您可以请求移除此限制: https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25 -风门/

如果您想在此服务器上接收电子邮件,则不能将端口号从 25 更改为其他值,因为其他服务器将尝试连接此端口以发送电子邮件。 如前所述,您还必须要求 AWS 移除端口 25 上的限制。

If you haven't already, create A DNS record for cpanel.mydomain.com pointing to your elastic IP (it is important that you have elastic IP not automatically assigned public IP)

最后,在调整了一些配置并等待 AWS Support to map Elastic IP 到我的域名后,我得到了 9.8/10,然后我可以得到 10/10

在此处输入图像描述

最重要的是,必须确保主机名与我的域有关 1. 设置主机名sudo hostname cpanel.mydomain.com

  1. 自动设置
cd /etc/dhcp/dhclient-exit-hooks.d/
sudo nano set-hostname.sh

file set-hostname.sh

#!/bin/sh
hostname cpanel.mydomain.com
/scripts/fixetchosts

更多详情,请免费参考这里

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM