LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Can send but no receive mail (https://www.linuxquestions.org/questions/linux-server-73/can-send-but-no-receive-mail-735132/)

nad4 06-23-2009 08:50 PM

Can send but no receive mail
 
I have Linux mail server, It always encounter this problem, when i shut down or restart the server. You cannot receive mail but you can send..
i use the following services:
iptables -F
service iptables restart
service sendmail restart
service dovecot restart

before when i run this services the email can send and receive..
hope you can help me..
thanks

zll5267 06-23-2009 08:57 PM

sorry ,I am a new one,I can't answer you question,but i hope you resolve your question soon,good luck!

chitambira 06-24-2009 03:58 AM

What order are you running the above commands?
Quote:

iptables -F
flushes out firewall rules, but then if you restart iptables, the rules are applied again. So you may skip
Quote:

iptables restart

fotoguy 06-24-2009 04:06 AM

Sounds like iptables is blocking ports, can you post the output from this command so we can see what rules are in place

Quote:

iptables -L -n

luisduenas 06-24-2009 10:36 AM

I use this rule to receive.

-A RH-Firewall-1-INPUT -p tcp -m state -m tcp --dport 25 --state NEW -j ACCEPT

nad4 06-24-2009 06:38 PM

i use the nmap application to check all ports.
pop3 110 port was not open.
how can i start the pop3 ports..

nad4 06-24-2009 09:27 PM

sir here is the output for
Quote:

iptables -L -n
Quote:

[root@mail ~]# iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 255
ACCEPT esp -- 0.0.0.0/0 0.0.0.0/0
ACCEPT ah -- 0.0.0.0/0 0.0.0.0/0
ACCEPT udp -- 0.0.0.0/0 224.0.0.251 udp dpt:5353
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:631
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:25
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
as you see there in no port 110. i think that is the problem why there is no receive mail.. how can i configured the pop3 port

fotoguy 06-25-2009 07:03 AM

OK you are restarting iptables but you do not have a rule to open the POP3 port, try adding this rule and see if it helps

Quote:

iptables -A INPUT -p tcp -i eth0 --dport 110 -m state --state NEW -j ACCEPT

nad4 06-25-2009 06:16 PM

now i can receive mail..
when i use the iptables -F and with out restart the iptables services.
just like what you said.
Quote:

What order are you running the above commands?
Quote:
iptables -F
flushes out firewall rules, but then if you restart iptables, the rules are applied again. So you may skip
Quote:
iptables restart
but i think there is no rule for may port 110, because when restarting the server same problem occurs.i must try this..
Quote:

OK you are restarting iptables but you do not have a rule to open the POP3 port, try adding this rule and see if it helps

Quote:
iptables -A INPUT -p tcp -i eth0 --dport 110 -m state --state NEW -j ACCEPT

fotoguy 06-26-2009 02:58 AM

To really flush the rules you also need to delete any user created chains, try this to get a full flush of any rules.

Quote:

iptables -F
iptables -F -t mangle
iptables -F -t nat
iptables -X
iptables -X -t mangle
iptables -X -t nat

iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT


All times are GMT -5. The time now is 01:43 PM.