Linux sends mail using an external mailbox

Source: Internet
Author: User

General Linux send alarm mail through the local mailbox or external mailbox server, I am accustomed to use the local mailbox to send mail, install a SendMail installation start, you can send mail functionality, but there are two issues:

1, the sender of the default display host name, and some will be mail service providers when the spam processing, you can also use Mutt to define the sender to solve the problem, to trouble.

2, send a delay, normal words, within a minute can receive, delay large words, a few hours will not be able to receive is also very normal, so the operation and maintenance engineers did not promptly received the alarm e-mail, delay the issue of timely processing.

For these two issues, with external mailbox can be solved, you simply register a domestic mail service provider mailbox, such as 163, you can also use the company mailbox, need to install MAILX tools, MAILX is a small mail sender program, installation is simple, as follows:


Centos:

# yum Install Mailx

# vi/etc/mail.rc #添加邮件信息

set [email protected] smtp=smtp.163.com

set [email protected] smtp-auth-password=123456

Set Smtp-auth=login


Ubuntu:

# sudo apt-get install HEIRLOOM-MAILX

# vi/etc/nail.rc #注意文件名和CentOS不同

set [email protected] smtp=smtp.163.com

set [email protected] smtp-auth-password=123456

Set Smtp-auth=login


To send a message test:

# echo "This is Test mail." |mail- S "test mail" [email protected]

Tips: if it is a QQ mailbox, to set up a mailbox to turn on client connection support, set-up account--open the POP3/SMTP service


This article is from the "Penguin" blog, please be sure to keep this source http://lizhenliang.blog.51cto.com/7876557/1612652

Linux sends mail using an external mailbox

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.