139 e-mail message will be sent automatically after the email, using this function can send the server's exception information to 139 boxes and then the phone will receive SMS reminders, to facilitate the management of the server function.
To avoid being treated as spam, we need to install both the Mutt and MSMTP software, as well as a 139 mailbox and a 163 mailbox for sending mail.
1) Download MSMTP
wget http://downloads.sourceforge.net/msmtp/msmtp-1.4.16.tar.bz2?modtime=1217206451& Big_mirror=0
2) Unzip:
tar jxvf msmtp-1.4. . tar. bz2
3) Installation:
./configure--prefix=/usr/local/msmtpmake make andinstall
4) Configuration Msmtp
cd/usr/local/msmtp/mkdir ETCCD etc/vim MSMTPRC
This is the configuration information for MSMTPRC.
for/usr/local/msmtp/msmtp.log# The SMTP server of the Provider.account [email protected]163 . com# SMTP mail server address host SMTP. 163 . com# sent mail emailfrom [email protected] 163 logintls off# mail server login account user [email protected]163. com# Mail server login password password password# Set a default accountaccount default: [email protected]163. com
5) Save exit to test if client is available
/USR/LOCAL/SMTP/BIN/MSMTP Target Mailbox
Enter some characters casually, and then press CTRL D to exit to see if the message was received from the destination email address.
6) Configure Mutt,mutt General Linux will be installed by default, you can use which mutt to view the path of mutt installation, if not installed, you can use Yum installation.
Yum Install Mutt
Edit Mutt configuration file
Vim/etc/muttrc
At the end of MUTTRC, add the following information
Set sendmail="/usr/local/msmtp/bin/msmtp" #你的msmtp命令路径 set Use_from=Yesset Realname="Jimmy Chen" #发信人setfrom [email protected]163. com # Email Set Editor="vim"
7) Save exit and test if Mutt is valid:
Echo " test the contents of a message " " test the title of the message the test email address
MUTT+MSMTP implementing e-mail in a shell environment