近日,配置zabbix邮件告警的时候,安装好了sendmail后,运行命令:

[root@slave ~] # mail -s "test" 111111@qq.com < /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" 286577399@qq.com < /etc/inittab

[root@slave ~]# mailq

/var/spool/mqueue is empty

                Total requests: 0

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