Operating System - Linux
1821410 Members
2541 Online
109633 Solutions
New Discussion юеВ

How to enable smtp port in Linux

 
SOLVED
Go to solution
Binu_5
Regular Advisor

How to enable smtp port in Linux

Hi All

I have setup postfix server but the problem smtp port is not enabled .
SMTP port details has been added in /etc/services

The error is as follows
telnet 192.151.103.42 25
Trying 192.151.103.42...
telnet: connect to address 192.151.103.42: Connection refused
telnet: Unable to connect to remote host: Connection refused

OS =Red hat linux enterprose version 4

Thanks
Binu
4 REPLIES 4
Ivan Ferreira
Honored Contributor
Solution

Re: How to enable smtp port in Linux

1- Ensure that your firewall is open at the port 25. To test, disable the firewall.

service iptables stop

2- Ensure that the service is up and running:

service postfix start
service postfix status
chkconfig postfix on

3- Ensure that your main.cf file has the following option configured:

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?
Ivan Ferreira
Honored Contributor

Re: How to enable smtp port in Linux

Also, you can try disabling SELinux, use system-config-securitylevel.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Indrajit_1
Valued Contributor

Re: How to enable smtp port in Linux

Hi,

Please check if firewall is configured in ur machine..

#iptalbles -A

if it is enabled, either u need to flush out or u need to disable the firewall for the port 25

#iptables -F

#man iptables

#iptables -d INPUT -P TCP --dport 25 -J ACCEPT
#iptables -d OUTPUT -P TCP --dport 25 -J ACCEPT

Hope it will help u to resolve ur issue..

cheers
indrajit
Never Ever Give Up
Vipulinux
Respected Contributor

Re: How to enable smtp port in Linux

Hi
Telnet port 25 from the server itself:
telnet localhost 25
if it connect that means u have Iptables restricting access. In this case do
iptables -F and try again
If even from localhost u cant connect do the following:

Do an nmap to see if the port is open:

nmap localhost

if it is not open do
service postfix restart

Best of luck!!!