LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   Why is my port 25 still blocked (http://www.linuxquestions.org/questions/linux-security-4/why-is-my-port-25-still-blocked-418181/)

jfaberna 02-21-2006 07:15 PM

Why is my port 25 still blocked
 
I'm running FC4 with SElinux and firewall turned off. I'm behind a hardware firewall that passes ports FTP,SMTP, SSH, POP, IMAP. However, I can't receive incoming email. I'm using postfix
1. grc.com shields up says all the port listed above are open except 25 (SMTP).
2. I can telnet localhost 25 and it works.
3. I can email to myself from myself and it works correctly.
4. I can't telnet port 25 from another machine in the same subnet plugged into the same Linksys router/switch
5. I can from another machine on the same subnet login via squirrelmail to read the self-to-self email test.
6. I can email from my system to another address outside without a problem. Just don't get any replies.

Does anyone know what to look at next?

Jim A

Capt_Caveman 02-21-2006 07:55 PM

Is the mail daemon listening on the proper network address? Most distros now ship with a mail daemon that listens on localhost (127.0.0.1) so it can send and receive mail to itself as well as send outgoing mail to remote systems. However it won't be able to receive incoming mail from remote systems. Check 'netstat -pantu' and see what IP the daemon is listening on. If it's the wrong one, you likely just need to edit your mail config file.

ilikejam 02-21-2006 07:56 PM

Oops. Ignore this post. Didn't read No. 4.

jfaberna 02-21-2006 09:09 PM

netstat output
 
The only line in 'netstat -pantu' output that mentions port 25 is:

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2454/master


Not sure what that means as I'm running Postfix.

Jim Abernathy

Capt_Caveman 02-21-2006 09:58 PM

Yup. That's the mail daemon and it's listening on localhost. "Master" is just the postfix master process. Because it's only listening on localhost it can only receive local mail. The postfix config should be in /etc/postfix/main.cf. Scroll down the config to the section on "RECEIVING MAIL" and see if the inet_interface directive is set to localhost (you'll see several different entries but only one will be uncommented). If it's set to localhost, then simply comment out that line with the '#' and then uncomment the line that reads "#inet_interfaces = all".

jfaberna 02-21-2006 09:59 PM

Am I getting closer, or moving the problem?
 
Thanks for the 'netstat' tip.

Okay, I moved back to sendmail, where I have more control over the configuarion. I now have port 25 listening everywhere and I get inbound email that I wasn't getting prior to this.

However, I'm now getting relay refusal messages from earthlink. They told me at tech support to use a authenticated smtp server and setup the SMARTHOST define in sendmail.mc. Only problem with that is it require a username and password. Usually, that's my full earthlink email address and password. I don't have any examples or doc to tell me the syntax of SMARTHOST other than the name of the ISP's server.

Any ideas?

Jim A

Capt_Caveman 02-21-2006 10:14 PM

Sorry, I've never setup smarthosts before. This might be helpfull, if not you might want to start a new thread on how to configure smarthosts in the networking forum.

philix 02-21-2006 10:32 PM

Hi jfaberna,

You should have an entry like the one given below
tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN 11303/master
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 11303/master

The above statement implies that the computer is waiting under the port 25 under the LAN and localhost IP.

Your mail server is configured to accept mails from localhost
Please check your mail server for its configurations
Thanks
Philix
Jesus Loves you too

Capt_Caveman 02-21-2006 10:46 PM

Seriously, please read the thread.


All times are GMT -5. The time now is 08:45 PM.