As shipped, MkLinux DR2 has some problems with permissions on the mail spool directory /var/spool/mail. Also, sendmail is not enabled by default. This note describes how to correct these problems.
Set the Mail Spool Directory Permissions
MkLinux DR2 ships with incorrect permissions on the mail spool directory. In order to correct this, you should run the following commands as root:
# chgrp mail /var/spool/mail
# chmod 1777 /var/spool/mail
Enable sendmail
By default, sendmail will not run when MkLinux boots. This is not a problem if you don't expect to be exchanging mail with other machines. If you do, you should keep rsmtp from being run out of /etc/inetd.conf and make sure sendmail is started during the boot process and terminated during the shutdown process.
To disable rsmtp, look for a line like this in /etc/inetd.conf:
smtp stream tcp nowait root /usr/sbin/tcpd /usr/bin/rsmtp -bs
Remove the line or comment it out by putting a "#" character in front of it:
#smtp stream tcp nowait root /usr/sbin/tcpd /usr/bin/rsmtp -bs
Then send a HUP signal to inetd, or kill inetd and restart it. You can send the signal like this:
# ps -ax | grep inetd
125 ? S 0:00 inetd
# kill -HUP 125
If you don't signal inetd (or kill and restart it), inetd will continue to listen on the SMTP port and sendmail won't be able to. (The symptom of this will be "address already in use" messages in /var/log/messages.)
To make sure that sendmail is started and stopped during system boot and shutdown, run the following commands as root:
# cd /etc/rc.d/rc3.d
# ln -s ../init.d/sendmail.init S30sendmail
# ln -s ../init.d/sendmail.init K30sendmail
Then you should reboot your system:
# shutdown -r now
or else just invoke the sendmail script manually:
# /etc/rc.d/init.d/sendmail.init start