Ext.: HTTP://WWW.TUICOOL.COM/ARTICLES/YRNQVFQ
In the CentOS system, if you want to send mail to the other, you need to configure a series of tools such as Sendmail+dovecot. In fact, it is not so troublesome, as long as the MUTT+MSMTP can realize the ability to send mail to the other. This article is based on CentOS6 64bit.
1, installation configuration msmtp
$ yum Install gcc gcc-c++ gnutls gnutls-devel gnutls-utils OpenSSL openssl-devel libidn libidn-devel-y$ wget http://sourceforge.net/projects/msmtp/files/msmtp/1.4. 32/msmtp-1.4. 32.TAR.BZ2$ tar-jxvf msmtp-1.4. 32.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 fromHello@163.comauth Logintls off user Hello465123456123456@qq. Compassword mypasswdaccount default:acc2eof
There are a few areas to note in the configuration file:
QQ Mailbox does not support TLS, use QQ mailbox need to close Tls_starttls,
NetEase Free Mailbox SSL certificate is not verified, so when using 163 mailbox, only TLS certificate verification can be turned off.
This profile does not support Chinese, nor can I paste Chinese comments, otherwise it will be an error.
2, installation configuration mutt
$ yum Install mutt-y$ cat >>/etc/muttrc<<EOF
Copy the following directly into the > location
Set sendmail="/usr/local/msmtp/bin/msmtp"set use_from=noset realname=set editor="Vim" EOF
3, Functional testing
"Here is the title" My@163.com
No accident, should be able to receive mail. Executing this command if more than 5s does not respond, the default account configuration in the MSMTPRC file is incorrect. Ps-ef can be executed first | grep Mutt Find the process number, and then modify the relevant configuration in the MSMTPRC file to try again later.
CentOS 6 sending mail using MUTT+MSMTP