Installing sendmail as described in the previous section also installs the sendmail startup script /etc/init.d/sendmail and creates symbolic links that automatically start and stop sendmail at run levels 3 (/etc/init.d/rc3.d/S14sendmail and /etc/init.d/rc3.d/K08sendmail, respectively) and 5 (/etc/init.d/rc5.d /S14sendmail and /etc/init.d/rc5.d/K08sendmail, respectively). To start sendmail, execute the startup script manually, as in the following example:
To verify that sendmail is running and its current status, you can use a command such as the following:
UPID TTY STAT START TIME COMMAND
root ? Ss 05:31 0:00 sendmail: accepting connections
If the ps -p command returns the error message ERROR: List of process IDs must follow p, the pidof command returned NULL because sendmail is not running on your system. Try restarting sendmail using the startup script, as described previously. If you still receive an error message, try executing the ps -A command and using grep to search for sendmail in its output (ps -A | grep - I sendmail).
This shows that the sendmail daemon is running as root. Alternately, you could connect to the mail port (port 25) using your host's loopback address to verify that the sendmail daemon will respond to incoming requests, as in the following example:
$ telnet 127.0.0.1 25 Trying 127.0.0.1 ... Connected to 127.0.0.1. Escape character is "]'.
220 laptop.vonhagen.org ESMTP Sendmail 8.13.3/8.13.3/SuSE Linux 0.7; \ Thu, 9 Jun 2005 05:38:28 -0400
221 2.0.0 laptop.vonhagen.org closing connection Connection closed by foreign host.
If you configured sendmail to accept remote SMTP connections, you should also verify this by connection to the mail port on your host's externally visible IP address.
The file /etc/sysconfig/sendmail contains some basic configuration information that is used by the system when the sendmail daemon is started or restarted.
Was this article helpful?