I have followed the tutorial(exactly) http://wiki.centos.org/HowTos/postfix

but I can't telnet my server's 25 port, I have no idea about this issue, so why?


  • Telnet to your server at port 25 from where? Is there a firewall between you? Have you tried "telnet localhost 25" locally on the mail server? – pauska May 11 '10 at 13:48
  • I can telnet localhost 25 – liuxingruo May 11 '10 at 23:29

Check the main.cf file in the postfix directory. The line "inet_interface" will say localhost by default. Change it to use the hostname that corresponds to your network interface for incoming/outgoing email.

Make sense?

  • I forget to comment inet_interface = localhost, thanks! – liuxingruo May 12 '10 at 8:10

you check at /var/log/ and any firewall rule and selinux disable and have look following link http://studyhat.blogspot.com/2009/10/postfix-server.html


Can you telnet to the mail server's port 25 using localhost (from that machine itself)?

If not, can you see the smtpd process running with the ps command?

If it's running and you're not seeing any errors in /var/log for the process, then the next thing to check is that you don't have firewall rules (iptables?) blocking access to the port, or if you can connect locally to 25 but not from another machine outside your network that you don't have a firewall that is blocking access. You need to have port 25 forwarded to the proper internal machine.

Nmap from an outside computer may help tell you what ports are open and visible from other machines. sockstat or socklist can also help on that machine. Check your local logs in /var/log to see if there are errors showing up in the firewall or SMTP processes.

  • I can't telnet to the mail server's 25 using localhost I can't see smtpd process running. I don't see any errors about smtp in /var/log. I don't know if i have any rules blocking access to port 25(can you tell me how to ,thanks). I used Nmap to scan the server. The result is: 25/tcp closed smtp – liuxingruo May 11 '10 at 15:02

Try these steps:

  • chkconfig --list postfix (it should be enabled in runlevel 3)
    • If not, enable with chkconfig postfix on
  • netstat -tlpen | grep 25 to check if Postfix is listening on port 25
    • If not, service postfix start, then check if error messages appear in /var/log/maillog
  • Make sure your firewall isn't blocking port 25: iptables -nvL
  • Is SELinux enabled? If getenforce returns "Enforcing", then it is
    • Then verify that SELinux isn't causing any problems: install the setroubleshoot package, service setroubleshoot start then watch its logfile /var/log/audit/audit.log for errors concerning Postfix
  • postfix chkconfig is enable. netstat -tlpen | gerp 25 it returns tcp 0 0* LISTEN 0 631826 12620/master iptables -nvl returns state NEW tcp dpt:25 408K 22M ACCEPT tcp -- * * SELINUX is disabled. – liuxingruo May 11 '10 at 15:20
  • 1
    It seems that postfix is listening on the loopback interface, which will only accept connections from the same box, using the loopback address. – alex May 11 '10 at 21:11
  • Thanks, and how can I fix it? – liuxingruo May 11 '10 at 23:30
  • Edit /etc/postfix/main.cf and change the line to "inet_interfaces = all" then restart Postfix. – weeheavy May 12 '10 at 6:52

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.