Debian iTOps Tube

Tuesday, November 22, 2011

Starting Sendmail

Starting Sendmail

The methodologies vary depending on the variant of Linux you are using as you'll see next.


Fedora / CentOS / RedHat

With these flavors of Linux you can use the chkconfig command to get sendmail configured to start at boot:


[root@bigboy tmp]# chkconfig sendmail on


To start, stop, and restart sendmail after booting use the service command:


[root@bigboy tmp]# service sendmail start
[root@bigboy tmp]# service sendmail stop
[root@bigboy tmp]# service sendmail restart

To determine whether sendmail is running you can issue either of these two commands. The first will give a status message. The second will return the process ID numbers of the sendmail daemons.


[root@bigboy tmp]# service sendmail status
[root@bigboy tmp]# pgrep squid

Note: Remember to run the chkconfig command at least once to ensure sendmail starts automatically on your next reboot.

Ubuntu / Debian

With these flavors of Linux the commands are different. Try installing the sysv-rc-conf and sysvinit-utils DEB packages as they provide commands that simplify the process. (For help on downloading and installing the packages, see Chapter 6, Installing Linux Software). You can use the sysv-rc-conf command to get sendmail configured to start at boot:


user@ubuntu:~$ sudo sysv-rc-conf sendmail on


To start, stop, and restart sendmail after booting the service command is the same:


user@ubuntu:~$ sudo service sendmail start
user@ubuntu:~$ sudo service sendmail stop
user@ubuntu:~$ sudo service sendmail restart

To determine whether sendmail is running you can issue either of these two commands. The first will give a status message. The second will return the process ID numbers of the sendmail daemons.


user@ubuntu:~$ sudo service sendmail status
user@ubuntu:~$ pgrep sendmail

Note: Remember to run the sysv-rc-conf command at least once to ensure sendmail starts automatically on your next reboot.

No comments:

Post a Comment