![Postfix 无法从外部来源 centos 7 接收邮件](https://linux22.com/image/671773/Postfix%20%E6%97%A0%E6%B3%95%E4%BB%8E%E5%A4%96%E9%83%A8%E6%9D%A5%E6%BA%90%20centos%207%20%E6%8E%A5%E6%94%B6%E9%82%AE%E4%BB%B6.png)
我使用 postfix、dovecot、squirrelmail 作为邮件服务器,一切正常,只是我无法接收来自外部来源的邮件。我可以向本地和外部来源发送邮件。
我正在关注这教程
我从外部来源发送邮件时出现此错误
Technical details of temporary failure:
The recipient server did not accept our requests to connect. Learn more at https://support.google.com/mail/answer/7720
[(1) mail.example.com. [62.210.36.xx]:25: socket error]
[(10) smtp.example.com. [62.210.36.xx]:25: socket error]
我的 postfix main.conf
myhostname = mail.example.com
mydomain = example.com
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 62.210.36.0/24, 62.210.16.0/6, 192.168.1.0/24, 127.0.0.0/8, [::ffff:127.0.0.0]/104 [::1]/128
unknown_local_recipient_reject_code = 550
mynetworks_style = host
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
home_mailbox = Maildir/
我的 dovecot 配置
dovecot.conf
protocols = imap pop3 lmtp
10-mail.conf
mail_location = maildir:~/Maildir
10-auth.conf
disable_plaintext_auth = yes
auth_mechanisms = plain login
我在 smtp 端口检查上有这个
[root@example ~]# sudo netstat -pel | grep smtp
tcp 0 0 localhost:smtp 0.0.0.0:* LISTEN root 106803 19109/master
tcp6 0 0 localhost:smtp [::]:* LISTEN root 106804 19109/master
unix 2 [ ACC ] STREAM LISTENING 106845 19109/master private/smtp
我在 25 端口上检查了这一点
[root@example ~]# netstat -plnt |grep :25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2505/master
tcp6 0 0 ::1:25 :::* LISTEN 2505/master
我已经在 MX 上检查过了
[root@example ~]# dig mx example.com
; <<>> DiG 9.9.4-RedHat-9.9.4-18.el7_1.5 <<>> mx example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48464
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 3
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;example.com. IN MX
;; ANSWER SECTION:
example.com. 3600 IN MX 1 mail.example.com.
example.com. 3600 IN MX 10 smtp.example.com.
;; AUTHORITY SECTION:
example.com. 3600 IN NS ns42.domaincontrol.com.
example.com. 3600 IN NS ns41.domaincontrol.com.
;; ADDITIONAL SECTION:
mail.example.com. 3600 IN A 62.210.36.xx
smtp.example.com. 3600 IN A 62.210.36.xx
;; Query time: 558 msec
;; SERVER: 62.210.16.xx#53(62.210.16.xx)
;; WHEN: Wed Nov 25 16:08:41 CET 2015
;; MSG SIZE rcvd: 169
请看看为什么我无法从外部来源获取邮件。
谢谢
答案1
[root@jersey ~]# telnet 62.21X.36.XX 25
Trying 62.21X.36.XX...
telnet: connect to address 62.21X.36.XX: No route to host
联系您的 ISP(或 VPS 提供商)。
看起来他们正在过滤您的入站流量。