I'm trying to telnet into port 25 on a CentOS server that runs PostFix to test sending email messages from the server.
When I try to telnet in from another CentOS box on the same network I get the message below:
Unable to connect to remote host: Connection refused
SELinux is disabled and I've opened port 25 in iptables…what else should I be looking at?
Best Answer
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:
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.