Postfix不接受外部连接

我已经build立了一个postfix服务器,当作为localhost访问时,工作得很好。 但是我无法从外面提供。

相关的configuration如下:

/etc/postfix/main.cf包含(和后缀重新加载):

myhostname = <myserver.with.fully.qualified.domain.name> # not localhost inet_interfaces = all inet_protocols = ipv4 smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination alias_maps = hash:/etc/aliases virtual_alias_maps = hash:/etc/postfix/virtual alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = <myserver.with.fully.qualified.domain.name> localhost.localdomain localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 inet_interfaces = all inet_protocols = ipv4 

〜$ sudo iptables -L – 行号

 Chain INPUT (policy DROP) num target prot opt source destination 1 ACCEPT all -- anywhere anywhere 2 ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED 3 ACCEPT tcp -- anywhere anywhere tcp dpt:ssh 4 ACCEPT tcp -- anywhere anywhere tcp dpt:http 5 ACCEPT tcp -- anywhere anywhere tcp dpt:https 6 ACCEPT icmp -- anywhere anywhere icmp echo-request 7 ACCEPT udp -- anywhere anywhere udp spt:ntp state ESTABLISHED 8 ACCEPT tcp -- anywhere anywhere tcp dpt:imap2 state NEW,ESTABLISHED 9 ACCEPT tcp -- anywhere anywhere tcp dpt:imaps state NEW,ESTABLISHED 10 ACCEPT tcp -- anywhere anywhere tcp dpt:smtp ctstate NEW,ESTABLISHED 

〜$ sudo netstat -tap

 Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 *:http *:* LISTEN 8067/nginx tcp 0 0 *:ssh *:* LISTEN 18536/sshd tcp 0 0 *:smtp *:* LISTEN 5913/master tcp 0 0 *:https *:* LISTEN 8067/nginx tcp 0 0 localhost.localdo:mysql *:* LISTEN 29579/mysqld tcp6 0 0 [::]:imap2 [::]:* LISTEN 4752/couriertcpd tcp6 0 0 [::]:ssh [::]:* LISTEN 18536/sshd tcp6 0 0 [::]:imaps [::]:* LISTEN 4803/couriertcpd 

并在同一时间 – 从一个不同的服务器:

 $ nmap <myIP> Starting Nmap 6.40 ( http://nmap.org ) at 2016-04-28 19:44 CEST Nmap scan report for myServer (<myIP>) Host is up (0.018s latency). Not shown: 995 filtered ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 143/tcp open imap 443/tcp open https 993/tcp open imaps Nmap done: 1 IP address (1 host up) scanned in 11.70 seconds 

所以SMTP显然是不开放的

我错过了什么?

谢谢!

请确保SMTP端口(TCP 25)不被您的托pipe服务提供商或运行远程nmap检查的ISP /networking运营商阻止。