天天看点

关于使用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