Starting and Stopping Sendmail with FreeBSD
Posted December 17th, 2004 in Email Servers and Linux/Unix/BSD (Updated May 24th, 2005)
Management of sendmail is done on FreeBSD by changing to sendmail's directory (/etc/mail) and running "make" followed by the appropriate command. This either needs to be done as root or using sudo.
To stop sendmail:
cd /etc/mail
make stop
To start sendmail:
cd /etc/mail
make start
To restart sendmail:
cd /etc/mail
make restart
To get sendmail to regenerate aliases, the virtual user table and other stuff, run make on its own like so:
cd /etc/mail
make
After running "make" on its own, sendmail automatically reads all the files so you shouldn't need to restart sendmail yourself at this point.
The header information from the Makefile in /etc/mail contains information about commands that can be passed to make. The top of this file is listed below.
# This Makefile provides an easy way to
generate the configuration
# file and database maps for the
sendmail(8) daemon.
#
# The user-driven targets are:
#
# all - Build cf, maps and aliases
# cf
- Build the .cf file from .mc file
# maps
- Build the feature maps
# aliases - Build the sendmail
aliases
# install - Install the .cf file as /etc/mail/sendmail.cf
#
# For acting on both the MTA daemon and MSP queue running
daemon:
# start - Start both the
sendmail MTA daemon and MSP queue running
#
daemon with the flags defined in
/etc/defaults/rc.conf or
#
/etc/rc.conf
# stop
- Stop both the sendmail MTA daemon and MSP queue running
#
daemon
# restart - Restart both the sendmail MTA daemon
and MSP queue running
#
daemon
#
# For acting on just the MTA
daemon:
# start-mta - Start the sendmail MTA daemon
with the flags defined in
#
/etc/defaults/rc.conf or /etc/rc.conf
#
stop-mta - Stop the sendmail MTA daemon
# restart-mta
- Restart the sendmail MTA daemon
#
# For acting on just
the MSP queue running daemon:
# start-mspq - Start the
sendmail MSP queue running daemon with the
#
flags defined in
/etc/defaults/rc.conf or /etc/rc.conf
# stop-mspq -
Stop the sendmail MSP queue running daemon
# restart-mspq - Restart
the sendmail MSP queue running daemon
#
# Calling `make' will
generate the updated versions when either the
# aliases or one of the
map files were changed.
#
# A `make install` is only necessary
after modifying the .mc file. In
# this case one would normally also
call `make restart' to allow the
# running sendmail to pick up the
changes as well.
Subscribe!
If you found this post interesting and would like to be notified the next time something is posted, please subscribe to my RSS Feed. Thanks for visiting!


