Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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
./usr/sbin/sendmail
./usr/lib/sendmail
[root@li /]# ./usr/sbin/sendmail restart
^C
[root@li /]# sudo /usr/sbin/sendmail restart
^C
[root@li /]# sudo service sendmail start
sendmail: unrecognized service
[root@li /]# /usr/sbin/sendmail start
^C
[root@li /]# /usr/sbin/sendmail
^C
[root@li /]# /usr/lib/sendmail start
^C
share|improve this question
add comment

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

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

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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