• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Electric Toolbox Blog

The Electric Toolbox Blog

Linux, Apache, Nginx, MySQL, Javascript and PHP articles

  • Applications
  • FCKEditor
  • Apache
  • Windows
  • Contact Us
Home / Starting and Stopping Sendmail with FreeBSD

Starting and Stopping Sendmail with FreeBSD

Management of sendmail is done on FreeBSD by changing to sendmail’sdirectory (/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.

Check Out These Related posts:

  1. Sendmail remote connection refused
  2. Changing exim4 settings with Debian 5 Lenny
  3. Mac mail queue commands
  4. Howto Restart Apache

Filed Under: Email Servers, Linux/Unix/BSD

Primary Sidebar

Categories

  • Apache
  • Applications
  • Article
  • Case Studies
  • Email Servers
  • FCKEditor
  • HTML And CSS
  • Javascript
  • Linux/Unix/BSD
  • Microsoft SQL Server
  • Miscellaneous Postings
  • MySql
  • Networking
  • Nginx Web Server
  • Offsite Articles
  • OSX
  • PHP
  • Quick Tips
  • RFC – Request for Comments
  • SilverStripe
  • VMWare
  • VPN
  • Windows
  • WordPress

Recent Posts

  • Vim Show Line Numbers
  • Add User To Group Linux
  • Chmod 777 Tutorial
  • How to Copy Directory Linux
  • Linux create user

Copyright © 2021. ElectricToolBox. All Rights Reserved.

  • Contact Us
  • Copyright Info
  • Privacy Policy
  • Sitemap