ChatGPT帮我修好了Hestia邮件服务器无法接收邮件的问题

背景

偶然间,看到了lowendtalk网站上spaceberg服务器促销的消息。随手入了一台月付9.44EUR,硬盘为1t nvme的大盘鸡。

通过与客服联系,确认25端口可以打开,萌生了将邮件服务器移植到spaceberg的想法。

移植服务器的另一个由头是因为sendinblue改名brevo,需要更换原邮件服务器smtp relay的设置。遗憾的是,原注册账号无法登录brevo。

经过若干时间对Hestia面板的学习,移植很成功,也确认25端口打开,可以发送邮件。但是暂时无法接收邮件。通常,有人认为邮件的dns解析需要48小时才能生效,于是我等了两天。

问题解决

过了48小时,发现邮件还有问题,我开始四处检查其它原因。HestiaCP论坛提醒说看mail log,于是我开始尝试。

我在/var/log/exim4下找到了maillog文件,打开以后截取了一段交给ChatGPT分析

2023-07-18 20:39:09 Start queue run: pid=989012
2023-07-18 20:39:09 1qKyIK-0004BH-W7 Message is frozen
2023-07-18 20:39:09 1qLQdl-002ihD-6y Message is frozen
2023-07-18 20:39:09 1qKy4d-000DDl-1v == [email protected] routing defer (-51): retry time not reached
2023-07-18 20:39:09 1qLZua-003RFR-Ac Message is frozen
2023-07-18 20:39:09 1qKzJE-000Kid-6X Message is frozen
2023-07-18 20:39:09 1qKyJJ-0004My-0Z Message is frozen
2023-07-18 20:39:09 1qKych-0008jx-1a == [email protected] routing defer (-51): retry time not reached
2023-07-18 20:39:09 1qL4AD-0010LZ-5M Message is frozen
2023-07-18 20:39:09 End queue run: pid=989012
2023-07-18 20:41:24 failed to expand condition "${if inbound_srs {$local_part} {${readfile{/etc/exim4/srs.conf}}}}" for inbound_srs router: unknown condition "inbound_srs"
2023-07-18 20:41:24 failed to expand condition "${if inbound_srs {$local_part} {}}" for inbound_srs_failure router: unknown condition "inbound_srs"
2023-07-18 20:41:24 1qLk16-0049Zh-05 <= [email protected] H=hcp.idavy.com (mail.idavy.com) [127.0.0.1] P=esmtpa A=dovecot_login:[email protected] S=528 [email protected]
2023-07-18 20:41:24 1qLk16-0049Zh-05 => [email protected] R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [74.125.71.26] X=TLS1.3:ECDHE_X25519__ECDSA_SECP256R1_SHA256__AES_256_GCM:256 CV=yes K C="250 2.0.0 OK t4-20020a0560001a4400b003143ad0fd0fsi995705wry.848 - gsmtp"
2023-07-18 20:41:24 1qLk16-0049Zh-05 Completed
2023-07-18 20:41:47 H=mail-yw1-f176.google.com [209.85.128.176] X=TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_128_GCM:128 CV=no SNI="mail.idavy.com" F=<[email protected]> rejected RCPT <[email protected]>: Rejected because 209.85.128.176 is in a black list at zen.spamhaus.org
2023-07-18 20:46:14 H=xmbg7.mail.qq.com [101.91.43.121] X=TLS1.2:ECDHE_SECP256R1__RSA_SHA512__AES_128_GCM:128 CV=no F=<[email protected]> rejected RCPT <[email protected]>: Rejected because 101.91.43.121 is in a black list at zen.spamhaus.org

这是ChatGPT帮我做了一段翻译,但是很乱,我发现我用的是3.5。于是赶紧切换GPT 4。GPT 4很直接的指出发送邮件的服务器的IP地址在Spamhaus的黑名单上。但我就奇怪了,发送邮件的服务器分别是qq和gmail,应该给是黑名单错了。

于是我继续问,能够在我的服务器上修改这些配置。

GPT 4 告诉我要查找以下两个文件,删除Spamhaus相关记录:

  • /etc/exim4/exim4.conf.template
  • /etc/exim4/exim4.conf.local

遗憾的是,我的exim4.conf.template并没有Spamhaus相关内容。我知道GPT的知识库偏旧,新版本的Hestia面板可能有所升级,于是我去HestiaCP论坛检索,很快找到的相关文件:

  • etc/exim/dnsbl.conf

dnsbl.conf中,我把Spamhaus相关所有内容删除,邮件服务一切恢复正常!

Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *