CentOS 6.5 The steps to set up a mail alert with mutt

Source: Internet
Author: User
Tags openssl openssl version centos

System Environment: CentOS 6.5

0, before the official installation of Mutt

Check the two security components first.

Openssl:

OpenSSL version-a #检查安装及版本信息
SASL (the system has been usually brought):

Rpm-qa | grep SASL
The query can be as follows:

Cyrus-sasl-gssapi-2.1.23-15.el6_6.2.x86_64
Cyrus-sasl-devel-2.1.23-15.el6_6.2.x86_64
Cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64
Cyrus-sasl-plain-2.1.23-15.el6_6.2.x86_64
Cyrus-sasl-2.1.23-15.el6_6.2.x86_64
If SASL is not running, start first:

/ETC/INIT.D/SASLAUTHD start
It is best to add to your startup project:

Chkconfig SASLAUTHD on
Because you will need to use security authentication when sending mail.

1, installation

The official website downloads the latest version.

# after decompression into the mutt directory
cd/root/mutt-1.6.0
Compiler
./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 more secure encryption
PS: Because I used the test account is QQ mail, QQ Mail using the SMTP protocol when required to use SSL security connection, and in the mutt use of secure connection must use SASL encryption, so the above 2 security components in the compilation of the installation must be added. Otherwise, "SMTP authentication requires SASL" or another SSL-related error will appear when you send the message.

# installation
Make && make install
2. Configuration file

Method 1:

After installation, copy a/usr/local/mutt/etc/configuration file muttrc to/ROOT/.MUTTRC in the installation directory, or modify the configuration file directly, set the read profile path to the security directory, so no copy is required.

Default settings:

Set alias_file= "~/.muttrc"
Method 2:

CAT/USR/LOCAL/MUTT/ETC/MUTTRC | Grep-v ^# | Grep-v ^$ > ~/.muttrc
This allows you to get the default profile information.

After the installation is complete, we only need to set the following information:

Set folder= "./mail" #设置本地的收件箱, if you do not set the Send message will be prompted
Set from= "123456789@qq.com" #设置发件人地址
Set Realname= "John" #发件人姓名
Set smtp_pass= "999999" #密码
Set smtp_url= "smtps://123456789@smtp.qq.com:465/" #发件人帐号和邮件主机信息, QQ mailbox must use a secure connection
Set Use_envelope_from=yes #使用自定义发件人邮箱
Set Use_from=yes #使用自定义发件人姓名
3, testing

The syntax of the mutt-1.6 version of the message is slightly different from the 1.4 version, with the following specific commands:

Mutt-s "title use"-a/usr/local/mutt/content.txt--rep@shoujianren.com </ROOT/1
Description

-S Message header

-A attachment

--Follow the recipient information

< is followed by the message body content, also can be given in the form of the preceding echo XXX. As follows:

echo xxx|mutt-s "title use"-a/usr/local/mutt/content.txt-rep@shoujianren.com
See, do not need to cooperate with other software, Mutt can send the mail independently, of course, receive also no problem, just in the mail alarm this need not need.

One of the error messages:

[Root@x63 mutt]# echo "Hello" | Mutt-s "Title"--xxx@xxxx.com
TLSv1.2 Connection using Tlsv1/sslv3 (aes256-sha256)
SMTP authentication requires SASL
Could not send the message.
This is a certificate failure.

Send a successful message:

[Root@x63 mutt]# echo "Hello3" | Mutt-s "Title"--xxx@xxxx.com
TLSv1.2 Connection using Tlsv1/sslv3 (aes256-sha256)

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.