29
2023
12
08:52:52

优化自建邮箱的发件验证



推荐点击下面图片,通过本站淘宝优惠价购买:

image.png

一年前,我使用Mail Plus Server自建了邮箱,但是问题连连。今天再修复一次。

用了1年左右了,说实话自建邮箱的意义不大,这是我最后一次修这邮箱了,如果再出问题,就重新用outlook。

今天看了一眼notice@mb6.top的发件记录,发现有很多的退信通知,主要是两种: outlook屏蔽和gmail屏蔽。


image.png


outlook的退信消息是这样的

This is the mail system at host mail.mb6.top.I'm sorry to have to inform you that your message could notbe delivered to one or more recipients. It's attached below.For further assistance, please send mail to postmaster.If you do so, please include this problem report. You candelete your own text from the attached returned message. The mail system<xinjiawei@outlook.com>: host outlook-com.olc.protection.outlook.com[104.47.73.161] said: 550 5.7.1 Service unavailable, Client host [123.180.145.226] blocked using Spamhaus. To request removal from this list see https://www.spamhaus.org/query/ip/123.180.145.226 (AS3130). [MW2NAM04FT009.eop-NAM04.prod.protection.outlook.com] (in reply to MAIL FROM command)

总结一句话,就是我的ip不在Spamhaus可信的列表里,所以被屏蔽了。那么Spamhaus是个啥?

看看百度百科的介绍:spamhaus,它是一个国际性非营利组织,其主要任务是跟踪国际互联网的垃圾邮件团伙,实时黑名单技术 ,协助执法机构辨别,追查全世界的垃圾邮件,并游说各国政府制订有效的反垃圾邮件法案。

原来是个邮件ip黑名单系统,那么我还有办法洗白吗?当然有,在退信消息里有一段地址

https://www.spamhaus.org/query/ip/123.180.158.145

点进去在页面最下方的就能申请解除。记得申请邮箱一定要填写邮件服务器的管理员邮箱。

image.png

那么为啥我的ip会在黑名单里呢?

由于我使用的是民用的动态ip,ISP会向Spamhaus提交一个不适合当邮件服务器的ip列表,Spamhaus会根据这个列表不经审查直接拉黑掉。并且,同一个ip不能频繁的申请,否则会把ip彻底拉黑。这一点对动态ip用户不太友好。

gmail的退信消息是这样的

<?xml version="1.0" encoding="UTF-8" ?><feedback> <report_metadata> <org_name>google.com</org_name> <email>noreply-dmarc-support@google.com</email> <extra_contact_info>https://support.google.com/a/answer/2466580</extra_contact_info> <report_id>13467600768161737146</report_id> <date_range> <begin>1635379200</begin> <end>1635465599</end> </date_range> </report_metadata> <policy_published> <domain>mb6.top</domain> <adkim>r</adkim> <aspf>r</aspf> <p>reject</p> <sp>reject</sp> <pct>100</pct> </policy_published> <record> <row> <source_ip>123.180.145.139</source_ip> <count>3</count> <policy_evaluated> <disposition>none</disposition> <dkim>fail</dkim> <spf>pass</spf> </policy_evaluated> </row> <identifiers> <header_from>mb6.top</header_from> </identifiers> <auth_results> <dkim> <domain>mb6.top</domain> <result>fail</result> <selector>dkim1</selector> </dkim> <spf> <domain>mb6.top</domain> <result>pass</result> </spf> </auth_results> </record></feedback>

可以看到,spf的验证通过,但是dkim的验证不通过。关于spf和dkim的概念可以在以下网址里得到。

http://blog.sina.com.cn/s/blog_bf73626a0102yjrb.html

在最开始自建邮箱时,按照教程照猫画虎设置了spf,dkim等,但是很明显教程的dkim教程是错误的。

使用 https://www.mail-tester.com/ 在线测试邮箱的垃圾邮件匹配度。这个网站可以测试邮箱服务器的外发服务区是否正确。

这是我最初的检查结果

image.png

查询群晖知识库,对比发现txt记录的值和官方给的值不太一样,按照官方的设置一遍。

https://kb.synology.com/en-ph/DSM/help/MailPlus-Server/mailplus_server_multiple_domains?version=6#:~:text=save%20the%20settings.-,Add%20and,-update%20the%20public

 The TXT record should be added as follows:Type: TXTTXT record name: DKIM selector prefix._domainkey.your domainNote: DKIM selector prefix is the prefix you entered above, and your domain is your actual domain name.Example: 123._domainkey.example.comTXT record value: v=DKIM1; k=rsa; p=DKIM public keyNote: DKIM public key is the key you generated in the above step.Example: v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQE...



image.png


 再测试一下

image.png

现在的分数


用qq邮箱测试一下,看看qq邮箱能得积分,居然才5.2分,看着这测试平台也就那样。




不过也有可能国内邮箱做的松,毕竟国内邮箱用的少一点。

给outlook和gmail发邮件试试,看看好了吗gmail成功接收到


gmail成功接收到
outlook归到垃圾邮件了(#暴怒)


outlook生效需要时间,但是gmail好了,还行。只能说非营利组织都挺炒蛋。

2022.12.15更新:spf的介绍:https://help.aliyun.com/document_detail/36771.html 贴一个spf设置策略 http://www.open-spf.org/SPF_Record_Syntax/


本文链接:https://hqyman.cn/post/4757.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:





休息一下,本站随机推荐观看栏目:


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

您的IP地址是: