I've just installed Postfix on Debian and am following this guide on my VPS.

When I execute the command: $ echo "test email" | sendmail your-account@gmail.com

sendmail: command not found

Why is this happening?

Someone suggested I run the following:

$ sudo find / -name "sendmail"
  • Thanks so much - I owe you a beer! (I'm a dev, not a sysadmin)... If you want the rep, use that as an answer (Y)
    – Glenn
    Apr 20, 2021 at 20:53
  • Done. Was a developer myself, stayed in touch even when system or db admin became my official task. Some OS knowledge won't hurt you! Apr 20, 2021 at 21:44

1 Answer 1


/usr/sbin is normally not on a user's PATH, only on root's.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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