Blue Flower

Sunday, 05 July 2015 13:24

Disabling Sendmail

Written by
Rate this item
(0 votes)

Type in the following commands to eliminate sendmail from being called on your box:

# killall sendmail
# mv /usr/sbin/sendmail /usr/sbin/sendmail.old
# chmod 0 /usr/sbin/sendmail.old

To tell FreeBSD not to tell sendmail to start on boot, add this to /etc/rc.conf like so:

# echo "sendmail_enable=NONE" >> /etc/rc.conf
# echo "sendmail_submit_enable=NO" >> /etc/rc.conf
# echo "sendmail_outbound_enable=NO" >> /etc/rc.conf
# echo "sendmail_msp_queue_enable=NO" >> /etc/rc.conf

Now to tell sendmail not to interfere with your qmail setup, add this to your /etc/make.conf like so:

# echo "NO_SENDMAIL=yes" >> /etc/make.conf
# echo "NO_MAILWRAPPER=yes" >> /etc/make.conf

Now lets tell anything that calls sendmail from the common location that we want it to send to qmail instead:

# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
# ln -s /var/qmail/bin/sendmail /usr/lib/sendmail

If you are using periodic.conf for your system messages you should also disable clean-purgestat from it. Open up /etc/periodic.conf and edit the following line as follows:

# 150.clean-hoststat
daily_clean_hoststat_enable="NO"                        # Purge sendmail host

That is it. Sendmail is uninstalled!

Read 2154 times Last modified on Thursday, 29 September 2016 02:40

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.