LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-20-2004, 11:36 AM   #1
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: Ubuntu 18.04.3 LTS
Posts: 539

Rep: Reputation: 30
sendmail security


I've read something that says that running a sendmail daemon is a security risk and that running the daemon is really unnecessary if the machine is not a mail server/relay.

Given that, how do i tell the sendmail daemon is running automatically on boot,
how do i turn it off (and prevent it from starting on boot?)
 
Old 12-20-2004, 11:37 AM   #2
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: Ubuntu 18.04.3 LTS
Posts: 539

Original Poster
Rep: Reputation: 30
oh, running SuSE 9.2
 
Old 12-20-2004, 02:30 PM   #3
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: Ubuntu 18.04.3 LTS
Posts: 539

Original Poster
Rep: Reputation: 30
I don't have a sendmail.cf file, so i guess i can conclude that I'm not running sendmail
 
Old 12-20-2004, 11:29 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
You can tell ifsendmail is running with ps aux | grep sendmail -- if yo see a sendmail process, it's running. To disable it at boot, turn off the init script that starts the daemon. On RH systems, this can be accomplished by "chkconfig sendmail off". Note that in some default RH configs, sendmail is set to listen only on the loopback interface, which makes it much less of a risk. Do go ahead and disable it if you don't want it, though.
 
Old 12-21-2004, 12:58 AM   #5
mgatny
Member
 
Registered: Mar 2004
Posts: 41

Rep: Reputation: 15
Quote:
I've read something that says that running a sendmail daemon is a security risk and that running the daemon is really unnecessary if the machine is not a mail server/relay.
You probably don't need an SMTP daemon running if you aren't a mail server. In general, running any daemon you don't need only increases the chances for exploit.

However, the "sendmail is a security risk" argument is mostly trotted out by people who don't really understand sendmail, or are not discussing a modern version thereof. So don't believe it.

Quote:
Given that, how do i tell the sendmail daemon is running automatically on boot,
how do i turn it off (and prevent it from starting on boot?)
Some ways to tell if sendmail is running:
ps axw | grep sendmail | grep -v grep should produce some output if sendmail is running.

netstat -ltpn (run as root) will show you which processes are listening on which TCP ports. If sendmail is running, you will see it listening on port 25 (SMTP).

To tell what starts at boot:
chkconfig --list will print a listing of which scripts in /etc/init.d/ run at which runlevels.

To stop sendmail from starting at boot (on SuSE):
insserv -r sendmail

To stop sendmail if it's running right now:
/etc/init.d/sendmail stop


The default behavior of mailer daemons on SuSE is to listen for local connections only. For sendmail to listen remotely on port 25, you must set SMTPD_LISTEN_REMOTE="yes" in /etc/sysconfig/mail. Also note that the default SuSE MTA is postfix, not sendmail.

Last edited by mgatny; 12-21-2004 at 10:24 AM.
 
Old 12-21-2004, 09:37 AM   #6
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: Ubuntu 18.04.3 LTS
Posts: 539

Original Poster
Rep: Reputation: 30
thanks for the input.
it looks like sendmail is not running, so security risk or not, all is well.
 
  


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
Breach in Sendmail Security? bper Linux - Security 2 08-02-2005 05:40 PM
sendmail and security pippet Linux - Software 3 07-22-2004 11:14 PM
sendmail security? nabil_boussetta Linux - Security 1 03-05-2004 11:26 AM
Sendmail security cxel91a Linux - Networking 1 08-30-2003 07:37 AM
sendmail, iptables and security Tigger Linux - General 2 05-27-2003 08:45 AM

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

All times are GMT -5. The time now is 07:03 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