A first delete the system, SendMail
#yum Remove Sendmail-y
B
cd /opt/ ll wget http://sourceforge.net/projects /heirloom/files/latest/download?source=files ll du -sh Mailx-12.4.tar.bz2 tar jxvf mailx-12.4.tar.bz2 cd mailx-12.4 make make install ucbinstall=/usr/bin/install mailx -V vi /etc/nail.rc # Only Include selected header fields when forwarding messages.fwdretain subject date from toset [email protected] #邮件名字set smtp=smtp.163.com #服务器域set [email protected] #账号set smtp-auth-password=123456 #密码set smtp-auth=login
# echo "Hi" |/usr/local/bin/mailx-s "owrd" [email protected]
C Crontab's script
#!/bin/bash[email protected],[email protected],[email protected],[email protected],[email protected]for IP in 192.168.1.10 192.168.1.20donc-w5 $IP 80if [$-ne 0]thencat/home/a.log|/usr/local/bin/mailx-s "$IP-stop" $Msleep 2fi done~~
After the mailbox can be used, for the splitter open, you can use more than one email address
#!/bin/bash
Export lang=zh_cn.gb18030
echo "Chinese content test!" | /usr/local/bin/mailx-s "Chinese title" [Email protected]
...
The message will be sent to Chinese as normal.
This article is from the "study Notes" blog, please be sure to keep this source http://837877.blog.51cto.com/827877/1537323