Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

Thanks

share|improve this question
    
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
add comment

4 Answers

up vote 1 down vote accepted

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?

share|improve this answer
    
I forget to comment inet_interface = localhost, thanks! –  liuxingruo May 12 '10 at 8:10
add comment

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

share|improve this answer
add comment

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.

share|improve this answer
    
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
add comment

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
share|improve this answer
    
postfix chkconfig is enable. netstat -tlpen | gerp 25 it returns tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 0 631826 12620/master iptables -nvl returns state NEW tcp dpt:25 408K 22M ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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