in Linux, many people will use the mail alarm, and this aspect of the software is also numerous, common like sendmail, sendemail, postfix, and so on, their advantages and disadvantages I do not say, the use of each their own. Today I would like to introduce you to the mutt, perhaps we are not unfamiliar with the online too much about Mutt and sendmail or with MSMTP cooperation with the tutorial. In fact, Mutt is very powerful as long as you study the official document (link http://www.mutt.org/doc/manual) system environment: centos 6.5 before formally installing mutt, Check the 2 security components first. openssl: openssl version -a #检查安装及版本信息SASL (System is usually brought in): rpm -qa | grep &NBSP;SASL query to the following: cyrus-sasl-gssapi-2.1.23-15.el6_6.2.x86_64cyrus-sasl-devel-2.1.23-15.el6_6.2.x86_ 64cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64cyrus-sasl-plain-2.1.23-15.el6_6.2.x86_64cyrus-sasl-2.1.23-15.el6_ 6.2.x86_64 If SASL is not running, start first:/etc/init.d/saslauthd start It's best to join the self-starter project:chkconfig saslauthd On because security authentication is required when sending mail. 1, the installation of the official website to download the latest version, or directly on this site, I have uploaded to 51 Download Center. # after decompression into the mutt directory cd /root/mutt-1.6.0# compile:./configure --prefix=/usr/local/mutt -- enable-pop --enable-smtp --with-ssl --with-sasl# Description--enable-pop Enable pop--enable-smtp Enable Smtp--with-ssl --with-sasl with the above protocol enabled, you must use a more secure encryption ps: because I use the test account is QQ mail, QQ Mail use the SMTP protocol when required to use SSL secure connection, The use of a secure connection in Mutt must also use SASL encryption, so the above 2 security components should be added when compiling the installation. Otherwise, "SMTP&NBSP;AUTHENTICATION&NBSP;REQUIRES&NBSP;SASL" or another SSL-related error will appear when you send the message. # installing MAKE&NBSP;&&&NBSP;MAKE&NBSP;INSTALL2, configuration file Method 1: After installation, copy the/usr/local/mutt/etc/configuration file in the installation directory MUTTRC to/ ROOT/.MUTTRC, you can also directly modify the configuration file, set the read profile path to the security directory, so that no need to copy. Default setting: set alias_file= "~/.muttrc" Method 2:cat /usr/local/mutt/etc/muttrc | grep -v &NBSP;^#&NBSP;|&NBSP;GREP&NBSP;-V&NBSP;^$&NBSP;>&NBSP;~/.MUTTRC This allows you to get the default configuration file information. After the installation is complete, we only need to set the following information: set folder= "./mail" #设置本地的收件箱, if you do not set the message will be prompted set from= "[email protected ] " #设置发件人地址set realname=" Zhang San " #发件人姓名set smtp_pass=" 999999 " #密码set smtp_url=" Smtps ://[email protected]:465/" #发件人帐号和邮件主机信息, QQ mailbox must use a secure connection set use_envelope_from=yes # Using a custom sender mailbox set use_from=yes #使用自定义发件人姓名3, the syntax for testing the mutt-1.6 version of the sent message is slightly different from the 1.4 version, as follows:mutt -s " Title uses " -a /usr/local/mutt/content.txt -- [email protected] < /root/1# Description-s Message header-a Attachment-- followed by the recipient information < followed by the message body content, can also be given in the form of the previous echo xxx. The following: echo xxx|mutt -s "title use" -a /usr/local/mutt/content.txt -- [email protected] See, no need to cooperate with other software, Mutt can send the mail independently, of course, the reception is no problem, but in the mail alarm the need to do not need. One of the error messages:[[email protected] mutt]# echo "Hello" | mutt -s "Title" -- [email protected]TLSv1.2 connection using TLSv1/SSLv3 (aes256-sha256) Smtp authentication requires saslcould not send the message. Sending a successful message: [[email] protected] mutt]# echo "Hello3" | mutt -s "Title" -- [email protected]TLSv1.2 connection using TLSv1/SSLv3 (aes256-sha256)
This article is from a "sense of direction" blog, be sure to keep this source http://itech.blog.51cto.com/192113/1768002
(exclusive) Linux mail alarm artifact Mutt