Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you find out if sendmail is running?

Status
Not open for further replies.

daniel1965

Programmer
Jan 24, 2004
4
GB
I need to be able to check if sendmail is running on a Linux server.

I was just going to get the pid from the /var/run/sendmail.pid file and then see if a process with that value was actually running (via ps & grep).

But the problem I have is that the sendmail.pid file is owned by root (with 600 permissions) and the user from which I need to do the check is NOT root!

I was thinking of just changing the permissions to something like 644 but am thinking this may cause problems(??).

Does anyone know of another way I can check if sendmail is running without having to refer to the pid file? I guess I can just use ps & grep but there seem to be a lot of processes listed that relate to sendmail and, without a known pid, I am not sure which of these I should be checking for!
 

If you have the process service you can check in this way

Service sendmail status

and you can start, restart, or stop in the same way

Juanjo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top