Linux MAILX installation use

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.