Postfix não aceitando conexões externas

1

Eu configurei um servidor de postfix que funciona bem quando acessado como localhost. No entanto, não posso disponibilizá-lo de fora.

As configurações relevantes são as seguintes:

/etc/postfix/main.cf contém (e o postfix foi recarregado):

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 --line-numbers

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

e ao mesmo tempo - de um servidor diferente:

$ 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

então o SMTP aparentemente não está aberto

O que estou perdendo?

Obrigado!

    
por fastcatch 28.04.2016 / 20:54

1 resposta

1

Verifique se a porta SMTP (TCP 25) não está bloqueada, seja pelo provedor de hospedagem ou pelo provedor / operador de rede a partir do qual você executa a verificação nmap do controle remoto.

    
por 30.04.2016 / 09:39