为什么找不到 sendmail?

为什么找不到 sendmail?

我刚刚在 Debian 上安装了 Postfix,并且正在关注本指南在我的 VPS 上。

当我执行命令时: $ echo "test email" | sendmail [email protected]

sendmail: command not found

为什么会发生这种情况?

有人建议我运行以下命令:

$ 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

答案1

/usr/sbin 通常不在用户的 PATH 中,只在 root 的 PATH 中。

相关内容