1828302 Members
3626 Online
109975 Solutions
New Discussion

Re: postfix and RHEL 4X

 
Chris Swenson
Advisor

postfix and RHEL 4X

I have just done a clean install of RHEL 4.X on a HP 380 G4 with postfix 2.2.10and lots of other things. I cannot get this server to accept an exteral connection to port 25. I have checked off smtp in lokkit. I cannot telnet localhost 25 from inside or outside the box. Postfix is new to me I have about 10 years of experience with sendmail and various versions of RH for 6.0 up in production. It is either getting too complicated or I am getting too old. I am waiting for Amazon to deliver my Postfix book but am irritated but not being able to get this basic functionality going.
ANY wisdom is appreciated.
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: postfix and RHEL 4X

Shalom,


netstat -an | grep ":25 "
# to see if there is a listener up.

Default RH configuration sets up iptables and blocks port 25.

service iptables stop

Test again.

If it works, configure iptables to permit traffic on port 25.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
skt_skt
Honored Contributor

Re: postfix and RHEL 4X

sendmail.cf file coming with some RHEL only listens on loopback interface. u can see that in netstat -an

it looks like this

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN

I Commented following option and restarted the sendmail daemon.

O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA


Then after restarting the daemon using netstat -an.
the output changed to

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN

My mail/smtp now works
Ivan Ferreira
Honored Contributor

Re: postfix and RHEL 4X

1- Check that postfix is running:

chkconfig postfix on
service postfix status

2- Check that sendmail is not running, or postfix will fail to start

service sendmail stop
chkconfig sendmail off

3- As methioned before, disable firewall to test. If you can connect after this, modify your iptables rules:

service iptables stop

4- Ensure that you have the following line in main.cf:

inet_interfaces = all
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
skt_skt
Honored Contributor

Re: postfix and RHEL 4X

what is the error you are getting when you telnet to port 25?
Chris Swenson
Advisor

Re: postfix and RHEL 4X

Thank for the responses, to various ideas:
Only Postfix is configured on this box. sendmail is not running.
netstat -an | grep *.25* yields nothing

netstat -an | grep .25 yields
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN

shuting down iptables does not alter results
inet_interfaces = all was set.

When Telneting I get:
telnet ratatosk.currycollege.net 25
Connecting To Ratatosk.currycollege.net...Could not open connection to the host, on port 25: Connect failed.

A true puzzlement.


skt_skt
Honored Contributor

Re: postfix and RHEL 4X

Do you have any other SMTP configured in any of the configuration files. May be configured requierment of a particular application ..etc.

Are u doing this telnet locally from the same server? is that machine in your local LAN ? if not is it going through any restricted firewall?
Chris Swenson
Advisor

Re: postfix and RHEL 4X

There will be a special place in hell for me if I am not there already.

I have been sitting at my windows PC trying to telnet to port 25 on the new linux box and the idiot virus scan blocks outbound port 25. Once I shut that down it works.

Thanks all to your advice and insight.
Chris S.
Chris Swenson
Advisor

Re: postfix and RHEL 4X

thank you everyone.
I learn a lot from reading your posts and most times I solve my problems with just a little search of this site.