Connection refused from remote computers on port 25 with postfix

1

I have a postfix / dovecot mail server setup using TLS.

The IMAP / POP side of the server works perfectly, but I cannot connect to it for SMTP.

Even telnetting it from a remote computer I get Connection refused.

Calling telnet localhost 25 from the server itself works fine though, and if I look at the open ports one of them is 0.0.0.0:25, which looks like it is listening on port 25 for incoming connections.

Any ideas?

Nick Duffell

Posted 2012-11-08T06:00:59.503

Reputation: 25

Answers

0

Multiple possibilities

  1. Antivirus software is blocking traffic going to port 25
  2. Gateway/firewall is blocking
  3. ISP is blocking

All the above are common causes.

If you are trying to use that server as your out going smtp, use port 587 or 465.

You may have to modify postfix configuration file your email server to enable the above ports.

In /etc/postfix/master.cf, look for following lines

#submission inet n       -       -       -       -       smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING

#smtps     inet  n       -       -       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING

Un-comment them (remove the # in the beginning of each line) and restart postfix.

The submission section enable port 587.

the smtps section enable port 465.

John Siu

Posted 2012-11-08T06:00:59.503

Reputation: 4 957

You sir, are a legend. – Nick Duffell – 2012-11-08T08:54:18.877