Linux Configuration Outgoing Mail

Source: Internet
Author: User

Edit/etc/mail.rc Add to Last:


Set [email protected] #发送邮箱地址

Set smtp=smtp.sina.com #发送邮箱服务器

Set [email protected] #登录名

Set Smtp-auth-password=test #登录密码

Set Smtp-auth=login #登录认证方式


After the configuration is complete, test:

echo "Test" |mail-s "test" [email protected]


If you are unable to receive mail normally, you can view it by command:

mail-v [email protected]

Subject:test #输入标题

Test #输入内容 (Ctrl +d) ends

EOT

Resolving host smtp.sina.com ... done.

Connecting to 219.142.78.230 ... connected.

Smtp-2-31.smtpsmail.fmail.yf.sinanode.com ESMTP

>>> EHLO Nagios

250-smtp-2-31.smtpsmail.fmail.yf.sinanode.com

250-auth LOGIN PLAIN

250-auth=login PLAIN

250-starttls

8BITMIME

>>> AUTH LOGIN

334 Vxnlcm5hbwu6

>>> ndazntk4mubzaw5hlmnvbq==

334 Ugfzc3dvcmq6

>>> exvtaw5zdgfsba==

235 OK Authenticated

>>> MAIL From:<[email protected]>

Ok

>>> RCPT To:<[email protected]>

Ok

>>> DATA

354 END data with <CR><LF>.<CR><LF>

>>>.

OK queue ID 6918754530958

>>> QUIT


Open mailbox successfully received mail


This article is from the "Shell" blog, be sure to keep this source http://zhizhimao.blog.51cto.com/3379994/1924364

Linux Configuration Outgoing Mail

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.