天天看點

關于使用mail指令産生:-bash: mail: command not found的解決方法

近日,配置zabbix郵件告警的時候,安裝好了sendmail後,運作指令:

[root@slave ~] # mail -s "test" [email protected] < /etc/inittab

提示:

-bash: mail: command not found

是因為 mailx 和 whois 沒有安裝:

[root@slave ~] # yum -y install mailx

[root@slave ~] # yum -y install jwhois

運作:

[root@slave ~]# mail -s "test" [email protected] < /etc/inittab

[root@slave ~]# mailq

/var/spool/mqueue is empty

                Total requests: 0

You have mail in /var/spool/mail/root

本文轉自 聽丶飛鳥說 51CTO部落格,原文連結:http://blog.51cto.com/286577399/1685422