我正在尝试使用 Postfix 和 Digital Ocean 上的邮件收发电子邮件。我可以成功发送,但似乎无法收到任何邮件。我关注了这教程。
我已将 Digital Ocean 设置为域名的名称服务器,但我想知道我是否错误地设置了邮件的 MX 和 A 记录。
DNS 记录
TYPE HOSTNAME VALUE TTL(seconds) Priority
A mail.domain.me <000.000.000.000> my ip 3600TTL
MX domain.me mail handled by mail.domain.me 14400TTL 1
A domain.me <000.000.000.000> my ip 3600TTL
NS domain.me ns1.digitalocean.com. 3600TTL
NS domain.me ns2.digitalocean.com. 3600TTL
NS domain.me ns3.digitalocean.com. 3600TTL
我正在尝试接收邮件[email protected]
。
我还使用 nmap 检查过,以确保其他服务器可以访问我的电子邮件端口。
Postfix 设置
从/etc/postfix/main.cf
myhostname = domain.me
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, domain.me, mail.domain.me, localhost.domain.me,$
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
更新:
我昨天尝试从 Gmail 向服务器发送一些测试电子邮件并收到此错误(如果它有任何相关性)。
The recipient server did not accept our requests to connect.
Learn more at https://support.google.com/mail/answer/7720
[mail.domain.me. 000.000.000.000: unable to read banner]
Final-Recipient: rfc822; [email protected]
Action: delayed
Status: 4.4.1
Diagnostic-Code: smtp; The recipient server did not accept our requests
to connect. Learn more at https://support.google.com/mail/answer/7720
[mail.domain.me. 000.000.000.000: unable to read banner]
Last-Attempt-Date: Fri, 05 May 2017 04:17:05 -0700 (PDT)
Will-Retry-Until: Sun, 07 May 2017 03:44:56 -0700 (PDT)
答案1
一个建议的解决方案是,
SSH-Login root
type "sudo nano /etc/postfix/main.cf"
Find line "inet_interfaces = loopback-only" and replace with "inet_interfaces = all"
Save by CTRL+X and hit Y
restart postfix by "sudo /etc/init.d/postfix restart"