First, the software environment1. CentOS 6.52, msmtp-1.4.323, Mutt 1.5.20 (2009-12-10)
Ii. steps of Implementation1. Installation Configuration Mutt
$ yum Install mutt-y$ cat >>/etc/muttrc<<EOF
Copy the following directly into the > position and enter
set sendmail="/USR/LOCAL/MSMTP/BIN/MSMTP"set use_from=noset Realname="[email protected]"set editor="Vim"EOF
2.Installation Configuration Msmtp
$ Yum install gcc gcc-c++ gnutls gnutls-devel gnutls-utils OpenSSL openssl-devel libidn libidn-devel-y$ Wgethttp://sourceforge.net/projects/msmtp/files/msmtp/1.4. +/msmtp-1.4. +. tar.bz2$ TAR-JXVF msmtp-1.4. +. tar.bz2$ CD msmtp-1.4. +$ ./configure--prefix=/usr/LOCAL/MSMTP$ CD msmtp-1.4. +$ Make && make install$ Mdkir/usr/local/msmtp/etc
Build configuration file
$ cat >>/usr/local/msmtp/etc/msmtprc<<EOF
Copy the following directly into the > location
defaultstls onlogfile/usr/local/msmtp/msmtp.logaccount acc1host smtp.163 . com port 25 from hello@163.com (email account or nickname) Auth logintls off user hello@163.com (email account) password mypasswd (send mailbox password or authorization code, Here's how to get the authorization code. Account Default:1eof
There are a few areas to note in the configuration file:
NetEase Free Mailbox SSL certificate is not verified, so when using 163 mailbox, only TLS certificate verification can be turned off. (statement: TLS off)
This profile does not support Chinese, nor can I paste Chinese comments, otherwise it will be an error.
3. Test Mail sending[email protected] for the received mailbox
"Here's the text." "Here is the title" My@163. com
third, abnormal situation1, the test can not send messages, and throw exceptionsWorkaround: Assign the obtained authorization code to the MyPassword in 2.2
2, MSMTPRC profile direct paste using Notepad open may have multiple key value pairs connected together, need to be separated by a space, the following is the reference Defaultstls Onlogfile/usr/local/msmtp/msmtp.log
Account Acc1host smtp.163.com port from [email protected] Auth login tls off user [e-mail protected] Password XX account Default:acc1
Iv. References1, HTTP://WWW.TUICOOL.COM/ARTICLES/YRNQVFQ2, http://tieba.baidu.com/p/3540868917
From for notes (Wiz)
Linux_centos sending mail using MUTT+MSMTP