Server Fault is a question and answer site for system and network administrators. 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 am trying to get postfix working, and when I test it using mail user I enter the subject, message, ect and get the following error:

mail: /usr/sbin/sendmail: No such file or directory
Can't send mail: sendmail process failed

Why is it talking about sendmail? I deleted that a long time ago and am using postfix. Is it still hanging around somewhere and the mail command thinks it should be using sendmail?

share|improve this question
Could you post the output from postconf –n – Bart De Vos May 12 '11 at 17:58
I get: postconf: warning: ???n: unknown parameter – Zed Said May 12 '11 at 18:15
up vote 5 down vote accepted

The postfix package on Debian actually includes an /usr/sbin/sendmail executable that functions as a compatibility interface (see man sendmail when postfix is installed).

Check ls -l /usr/sbin/sendmail* in case it was renamed or reinstall the postfix package so you get the wrapper in place.

share|improve this answer
I try to reinstall, and I get an error talking about sendmail: Errors were encountered while processing: sendmail-base E: Sub-process /usr/bin/dpkg returned an error code (1) – Zed Said May 12 '11 at 18:20
Should I just install sendmail-base on its own? – Zed Said May 12 '11 at 18:27
You shouldn't install any part of sendmail really, just postfix. Please post the output of dpkg-query -L postfix | grep sendmail. – Eduardo Ivanec May 12 '11 at 18:35
Thanks, running that gives me: /usr/sbin/sendmail /usr/share/man/man1/sendmail.1.gz /usr/lib/sendmail – Zed Said May 12 '11 at 19:05
And yet ls -l /usr/sbin/sendmail returns "No such file or directory"? I'd say your install is botched in some specific way that also causes reinstall to malfunction - try backing up all config files by hand, then apt-get remove --purge postfix (do back up first!) and finally apt-get install postfix. – Eduardo Ivanec May 12 '11 at 19:08

If you do not have /usr/sbin/sendmail, check if after installing postfix package, you have:


If you do, simply make a symlink:

ln -s /usr/sbin/sendmail.postfix /usr/sbin/sendmail
share|improve this answer

The postfix installation is probably broken. Try this:

sudo aptitude reinstall postfix
share|improve this answer
Did this, and it didn't fix the issue. – Zed Said May 12 '11 at 18:15

Your Answer


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.