大网数据广告活动
服务器运维问答

Mail is not getting through to gmail

· 52CE 我爱测

I have a self hosted mail server on a VPS. When sending mail through an application, most of my mail is getting rejected by google. Google is giving following message about the mail. Reporting-MTA: dns; mail.myclearmargin.com X-P…

问题原文

原帖链接 · Alauddin Ahmed · CC BY-SA 4.0

I have a self hosted mail server on a VPS. When sending mail through an application, most of my mail is getting rejected by google. Google is giving following message about the mail.

Reporting-MTA: dns; mail.myclearmargin.com
X-Postcow-Queue-ID: BAC4E881209
X-Postcow-Sender: rfc822; [email omitted]
Arrival-Date: Mon,  8 Aug 2022 00:03:09 -0700 (PDT)

Final-Recipient: rfc822; [email omitted]
Original-Recipient: rfc822;[email omitted]
Action: failed
Status: 5.7.25
Remote-MTA: dns; gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 550-5.7.25 [2a02:c206:2061:6136::1] The IP address
    sending this message does not 550-5.7.25 have a PTR record setup, or the
    corresponding forward DNS entry does 550-5.7.25 not point to the sending
    IP. As a policy, Gmail does not accept 550-5.7.25 messages from IPs with
    missing PTR records. Please visit 550-5.7.25
    https://support.google.com/mail/answer/81126#ip-practices for more 550
    5.7.25 information. z4-20020a05640240c400b0043d9832325fsi6139125edb.541 -
    gsmtp

But both of my forward DNS and reverse DNS looks okay.

host mail.myclearmargin.com
mail.myclearmargin.com has address 194.163.151.74

host 194.163.151.74                                   
74.151.163.194.in-addr.arpa domain name pointer mail.myclearmargin.com.

Can anyone help me out what could be the problem?

Note: When using this command host mail.myclearmargin.com, after sometimes it also returning connection timed out; no servers could be reached

已采纳解答

原帖链接 · glts · CC BY-SA 4.0

As you can see from Google’s diagnostic, you are using IPv6 to send the mail.

Using dig +short mail.myclearmargin.com. aaaa to look for your AAAA records, I’m not getting any addresses. This might well be the problem.

Set up the necessary AAAA record (IP address 2a02:c206:2061:6136::1) or configure your MTA to use IPv4 only.

Also: your SPF record, too, only allows IPv4 senders:

$ spftrace myclearmargin.com 2a02:c206:2061:6136::1
myclearmargin.com
│   "v=spf1 ip4:194.163.151.74 -all"
├── ip4:194.163.151.74 not-match
└── all match result=fail
fail

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2022-08-09)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。