1

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"
/var/lib/sendmail
/usr/sbin/sendmail
/usr/lib/sm.bin/sendmail
/usr/lib/sendmail
/usr/share/sendmail
/usr/share/sendmail/examples/dhcp/dhclient-exit-hooks.d/sendmail
/usr/share/sendmail/examples/logcheck/ignore.d.paranoid/sendmail
/usr/share/sendmail/examples/logcheck/ignore.d.server/sendmail
/usr/share/sendmail/examples/logcheck/ignore.d.workstation/sendmail
/usr/share/sendmail/examples/network/if-down.d/sendmail
/usr/share/sendmail/examples/network/if-post-down.d/sendmail
/usr/share/sendmail/examples/network/if-up.d/sendmail
/usr/share/sendmail/examples/ppp/ip-down.d/sendmail
/usr/share/sendmail/examples/ppp/ip-up.d/sendmail
/usr/share/sendmail/examples/resolvconf/update-libc.d/sendmail
/usr/share/sendmail/sendmail
/etc/logcheck/ignore.d.server/sendmail
/etc/logcheck/ignore.d.paranoid/sendmail
/etc/logcheck/ignore.d.workstation/sendmail
/etc/cron.d/sendmail
/etc/network/if-down.d/sendmail
/etc/network/if-post-down.d/sendmail
/etc/network/if-up.d/sendmail
/etc/dhcp/dhclient-exit-hooks.d/sendmail
/etc/alternatives/sendmail
/etc/init.d/sendmail
/etc/cron.daily/sendmail
/etc/ppp/ip-up.d/sendmail
/etc/ppp/ip-down.d/sendmail
/etc/resolvconf/update-libc.d/sendmail
/run/sendmail
2
  • 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

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.