Linux
為什麼找不到 sendmail?
我剛剛在 Debian 上安裝了 Postfix,並在我的 VPS 上遵循本指南。
當我執行命令時:
$ echo "test email" | sendmail your-account@gmail.com
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
/usr/sbin 通常不在使用者的 PATH 上,只在 root 的路徑上。