LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-02-2001, 12:00 PM   #1
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 22
Posts: 371

Rep: Reputation: 30
smtp port not turned on - how do i do it?


easy question for most of you, i'm sure:

for some reason, my smtp port is just not turned on. i can't receive incoming mail as a result. i don't know how to turn it on either. can someone shed the light?

i'm using rh 7.1.

thanks!
 
Old 08-02-2001, 12:13 PM   #2
d3funct
Member
 
Registered: Jun 2001
Location: Centralia, WA
Posts: 274

Rep: Reputation: 31
Is sendmail running on your system? Try running "/usr/sbin/sendmail" and then do "ps -ef |grep sendmail" you should see something like:

root 702 1 0 Jul19 ? 00:00:00 sendmail: accepting connections

Also, if you have "nmap" on your box run "nmap localhost" and look for the smtp entry. It should look like this:

25/tcp open smtp

And check /etc/services and ensure that smtp is present in the file and that its stanza is not commented out. Like this:

/etc #grep smtp /etc/services
smtp 25/tcp mail
smtp 25/udp mail
smtps 465/tcp # SMTP over SSL (TLS)

Hope this helps



 
Old 08-02-2001, 12:19 PM   #3
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 22
Posts: 371

Original Poster
Rep: Reputation: 30
yes, it was from nmap that i discovered that smtp port 25 isn't open even though sendmail is accepting connections (tried that also ) and the like.

all else looks good. /etc/services doesn't have anything commented out, but port 25 still is off.

what could it be?
 
Old 08-02-2001, 01:15 PM   #4
d3funct
Member
 
Registered: Jun 2001
Location: Centralia, WA
Posts: 274

Rep: Reputation: 31
Can you telnet to your smtp port successfully from the localhost? You might also kill your sendmail process and restart it using the command "/usr/bin/sendmail -bd -q this will run it in daemon mode (smtpd) and have it periodically process the queue. Once it's restarted try sending mail to an account on the localhost. If this fails you might try restarting network services and sendmail by running /etc/rc.d/init.d/network(or sendmail) restart. And again try sending mail to an account on the localhost.
 
Old 08-02-2001, 01:30 PM   #5
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 22
Posts: 371

Original Poster
Rep: Reputation: 30
also tried that. no matter what i do, smtp port 25 is not showing up as being open, and i can't figure out how to enable it....

 
Old 08-02-2001, 01:36 PM   #6
d3funct
Member
 
Registered: Jun 2001
Location: Centralia, WA
Posts: 274

Rep: Reputation: 31
I don't know of any more suggestions, but if you go to www.tek-tips.com there is a linux(server) and linux(client) forum which has a lot of extremely technically experienced people willing to help. Check them out and give www.linuxquestions.com a commecial there also.
 
Old 08-02-2001, 02:48 PM   #7
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 22
Posts: 371

Original Poster
Rep: Reputation: 30
hm. strange.

thanks for the help.

does anyone know if i need to add some configs to my ipchains file? i don't really know the syntax for ipchains configurations.

(still getting messages from other hosts - "can't send mail for the past four hours")
 
Old 08-02-2001, 02:58 PM   #8
dilberim82
Member
 
Registered: Apr 2001
Location: NY
Distribution: used to be Redhat, now Debian Sarge
Posts: 291

Rep: Reputation: 30
Do you have a firewall? Just a thought...
 
Old 08-02-2001, 03:03 PM   #9
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 22
Posts: 371

Original Poster
Rep: Reputation: 30
yeah, that was brought up by the network admin here. nope, i don't...

i actually tried running /usr/sbin/tcpd and it worked (it shows up on nmap at least, but i don't know if the mail is going through just yet).

is that normal?
 
Old 08-02-2001, 03:06 PM   #10
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 22
Posts: 371

Original Poster
Rep: Reputation: 30
scratch that. i have a tcp wrappers file that informs me when intruders break into the system, and well, it informed me that tcpd was a break-in attempt. so i'm not exactly sure how it just randomly turned on like that.
 
Old 08-02-2001, 03:17 PM   #11
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 22
Posts: 371

Original Poster
Rep: Reputation: 30
grr. forget that. smtp is not showing up as an open port anymore. and rebooting doesn't help.

btw, netstat -atu shows the following:

tcp 0 0 localhost.localdom:smtp *:* LISTEN

no outgoing smtp... only internal connections.

Last edited by punt; 08-02-2001 at 04:01 PM.
 
Old 08-03-2001, 10:51 AM   #12
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
Ok forget everything you've been told.
It's a network issue not a security problem.

Your /etc/sendmail.cf file is setup so it only starts the service for localhost.

so do this to get it on your correct ip address interface.

first type:
# netstat -natp
will show you it's only on localhost accept
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 781/sendmail: accep

Then type this to stop the service:
#/etc/rc.d/init.d/sendmail stop

should say stopped.

now edit the sendmail.cf file in /etc

#vi /etc/sendmail.cf

change the line that says
# SMTP daemon options

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

to

# SMTP daemon options
O DaemonPortOptions=Port=smtp,Addr=your_external_ip_address, Name=MTA
# make the bit that says your_external_ip_address your linux servers external ip address.

Save and exit
now type
#/etc/rc.d/init.d/sendmail start

should say started!

now type:
# netstat -natp
should now be working on correct interface

tcp 0 0 32.96.111.130:25 0.0.0.0:* LISTEN 9288/sendmail: acce

Get this far and yours sorted.
Now you just have to make sure your ISP's DNS servers knows your email zone MX address for your SMTP server.

/Raz
 
Old 08-04-2001, 10:41 PM   #13
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 22
Posts: 371

Original Poster
Rep: Reputation: 30
wow raz, you are amazing. thanks
 
Old 08-05-2001, 09:51 AM   #14
nabil
Member
 
Registered: Feb 2001
Location: MI, USA
Distribution: Debian Linux 100% GNU
Posts: 210

Rep: Reputation: 31
Red Hat changed the way that sendmail is run on version 7.1. They decided that most people need a client-only version of sendmail. So it is listening only on the localhost interface.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SMTP Port always open AJones Linux - Security 2 08-05-2005 11:34 PM
smtp server can't get port 25 Charles Daniel Linux - Security 1 10-26-2004 08:27 AM
smtp port changes Bruce Hill Linux - General 1 10-17-2004 06:37 PM
Help! SMTP port 25 on RH 8.0 - can't open it! albracco Linux - General 9 04-21-2003 04:41 PM
HELP! Someone is bombarding my SMTP port john_biggs Linux - Networking 6 03-19-2002 03:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration