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.