Here's how :
Preparation for the first time
Before making changes to Sendmail for the first time, prepare the config files in /etc/mail:cd /etc/mail makeThis will copy the freebsd.mc to $(hostname).mc and freebsd.submit.mc to $(hostname).submit.mc then generate the .cf files.
Subsequently
The previous step is only needed for the very first time before changing config files. Now, every time when changes are made to Sendmail config files, do the following :- Edit hostname.mc or hostname.submit.mc
- Generate the necessary .cf files:
make install
- Restart the Sendmail daemon :
make restart
In fact, there are more options to manage Sendmail :
# The user-driven targets are:These options are taken from /etc/mail/Makefile. Take a look at it.
#
# 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.
Ciao !!!
No comments:
Post a Comment