Linux_centos sending mail using MUTT+MSMTP

Source: Internet
Author: User


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

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.