Unable to Telnet into port 25 on CentOS PostFix Server

Run the following the check if postfix is listening on port 25/tcp:

netstat -plnt |grep :25

You should see a line like:

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2460/master

If you don't see such a line, check /etc/postfix/master.cf.

In that file, you should see a line like:

smtp      inet  n       -       n       -       -       smtpd

The first column is the port, which postfix derives from /etc/services.

You should look up general documentation on setting up Postfix, so your server doesn't become a spam relay. The CentOS wiki has fairly good documentation in that regard.

Update:

Also, look at http://www.postfix.org/postconf.5.html#inet_interfaces which will describe how to configure Postfix to listen on different network interfaces. The relevant line will be found in /etc/postfix/main.cf.


I edited the file /etc/postfix/main.cf. The parameter to look up was

inet_interfaces = localhost

I changed it to

inet_interfaces = $myhostname, localhost

Restart postfix. The problem was fixed.


I had this problem and found that I needed to do:

# service postfix stop

followed (a bit later) by

# service postfix start

Postfix reload did not seem to close and then re-open the required ports.

Tags:

Networking