Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Recently, my linux servers sendmail program stopped working and every time I send an email I get this error:

Warning: mail() [function.mail]: Could not execute mail delivery program '/usr/sbin/sendmail' in /var/www/includes/Swift-4.0.6/lib/classes/Swift/Transport/SimpleMailInvoker.php on line 50

Now, I've traced through my web application and surely there is no problem there. So, the problem lies in executing sendmail. It used to work before so I'm not sure why it would stop all of a sudden, and I don't recall making any server changes either. I've also tried reinstalling sendmail, but I still get the same error.

One thing I noticed is that there is no file called sendmail in /usr/sbin/. However, there is an entire folder called sendmail in /usr/sbin/ and inside it there are executables and sendmail files there (sendmail.8, sendmail.h, and sendmail.0 files exist). Their execute permissions are also set fine. Is this something to worry about?

Any suggestions as to how to fix this problem?

Thanks in advance.

share|improve this question
    
as mentioned in answer, please provide linux distribution and version information. (eg. debian lenny, redhat fedora core 9, etc). If you don't know how the directory /usr/sbin/sendmail was created and populated with files that shouldn't be there, then that IS a problem. –  unixguy Oct 5 '10 at 4:55

1 Answer 1

You have a bad installation somehow.

It is conventional on Unix that a program exists in /usr/sbin/sendmail$, which acts as an interface to the local MTA. This MTA is rarely sendmail nowadays, but other MTA's have a compatible program which is installed here.

sendmail.h would be part of the source code for sendmail, and sendmail.0 and sendmail.8 would be the man pages, so it looks like you've somehow got the source code for the right sendmail in /usr/sbin

You need to clean this up, and get a proper sendmail program into /usr/sbin/sendmail to fix php. Since you've not told us the distribution, nor which MTA you're actually using, no-one else can help you.

$ = Actually one or more of /usr/lib/sendmail and /usr/bin/sendmail as well as /usr/sbin/sendmail, programs will either search these paths, or have one or more hardcoded into them, or ask at installation time. It looks like your program is using /usr/sbin/sendmail. Regardless of which, the installation for the MTA will do it.

share|improve this answer
    
I am using Ubuntu 9.10 and sendmail 8.14.3-9ubuntu1. So yes my MTA is actually sendmail. Perhaps I can try relaying sendmail messages to another server? How would I configure that? –  Baseer Oct 5 '10 at 14:43
    
Well I just uninstalled sendmail and installed postfix but that doesn't seem to work either... –  Baseer Oct 5 '10 at 15:12

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.