CentOS 6 sending mail using MUTT+MSMTP

Source: Internet
Author: User
Tags ssl certificate

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

Related Article

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.