I am rather new to Linux and trying to set up a MailScanner box. I went as far as to set it up with postfix and succeeded sending a test message via it from the local console.

However, when I try to connect to port 25 on the box IP which is, I get connection refused message. Running nmap localhost shows open port 25, however nmap shows no open port 25. IPtables and selinux are disabled.

How can I determine what is blocking the port and how do I unblock it?



Verify with netstat -ln that the service is actually listening on or (all interfaces) and not just local host.

Verify iptables isn't running (iptables -L -n -v no results)

Check /etc/hosts.deny for any access rules that may be in play.

Check the logs just to make sure there isn't a mail configuration specific reason.

Verify you can ping that host from another on the same subnet, and that you can telnet to port 25 on that box.

That should cover it.

  • I don't think postfix has support for tcp_wrappers
    – wzzrd
    Nov 12 '09 at 20:53

If you're sure that there are no iptables firewall rules loaded (iptables -vnL)

Run netstat -tanop to verify that postfix is listening on all network interfaces ( or ( not just local.

Regards K

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.