Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a WP site on a linux box. Our email was working fine in Wordpress but recently it stopped, I think because of a restart. All I could think of was to restart sendmail.

I couldn't find sendmail in the normal directory (/etc/init.d/sendmail restart) but that didn't exist. I found another directory for sendmail in the sbin but every time I try running it it doesn't respond and I have to exit. This is all what I tried. Any ideas?

[root@li209-134 ~]# /etc/init.d/sendmail restart
-bash: /etc/init.d/sendmail: No such file or directory

[root@li /]# find . -name sendmail -print
[root@li /]# ./usr/sbin/sendmail restart
[root@li /]# sudo /usr/sbin/sendmail restart
[root@li /]# sudo service sendmail start
sendmail: unrecognized service
[root@li /]# /usr/sbin/sendmail start
[root@li /]# /usr/sbin/sendmail
[root@li /]# /usr/lib/sendmail start
share|improve this question

migrated from stackoverflow.com Jun 5 '12 at 15:26

This question came from our site for professional and enthusiast programmers.

The command '/usr/sbin/sendmail anystring' is interpreted as meaning 'take the following input from stdin and email it to the user known as anystring', rather than 'please restart the service known as sendmail'.

Are you sure you were using the sendmail daemon (as opposed to, say, postfix)? In either case the /usr/sbin/sendmail wrapper would most likely be available.

You could try rpm -q --whatprovides /usr/sbin/sendmail

share|improve this answer
Thanks. Yeah it may very well not use sendmail. I have no idea. I got a "rpm: command not found" ..any idea if it was postfix how to start it up? – wejrowski Jun 5 '12 at 0:12
If it were postfix it'd be 'sudo service postfix start'. Edited to add: You could try running 'sudo alternatives --display mta'. That should tell you what the sendmail link really points to. – Soz Jun 5 '12 at 0:17

Thanks Soz. Here's the answer.. and I also turned it on in the chkconfig so it doesn't turn off again.

[root@li ~]# postfix start
postfix/postfix-script: starting the Postfix mail system
[root@li ~]# chkconfig --levels 35 postfix on
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.