1、下载安装sendEmail
wget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gztar zxvf sendEmail-v1.56.tar.gz cd sendEmail-v1.56cp sendEmail /usr/local/bin/chmod 775 /usr/local/bin/sendEmail chown nagios:nagios /usr/local/bin/sendEmail #因为我要让nagios发邮件所以用的是nagios用户
2、测试一下
/usr/local/bin/sendEmail -f 发送者@163.com -t 接送@163.com -s smtp.163.com -u "邮件标题" -xu 帐号 -xp 密码 -m "邮件内容
时间: 2024-10-07 06:00:10