Set up Linux to send mail using the SMTP service

Source: Internet
Author: User

Many times we need to know the running state of the server, such as an abnormal alarm, database backup status, and so on, if the server automatically report to you that is good, we can set when certain conditions triggered by the server to send mail to you, so you can understand the status of your server. At first I use the Linux itself Mail test to send the message, the system is prompted to send out, but the test receiving mailbox did not receive mail, instead of using a third-party mailbox as the sender, the following is the setting 163 Mailbox as the process for sending mailboxes.

First, enter /etc/mail.rc edit mode to add the following two lines of configuration

Note that this Smtp-auth-password is not a mailbox login password, but a client mailbox authorization code

II. Acquisition of Authorization code

Enter NetEase mailbox, the red box will be ticked, according to the prompt to operate

Finally, you will get a client authorization password, which will be sent to you by SMS

Third, test whether the configuration is successful

Note that as soon as you have a third-party mailbox set up, you can send mailboxes to any mailbox system that you set up to send the mailbox to.

Can see, I sent 163 Several test mail, and QQ mailbox sent several test mail, open test mailbox, found all received the mail, test success, due to 163 The mailbox is set to send the mailbox, so send to QQ the mail in the mailbox 163 mailbox can also be seen.

PS. to see if a message has been sent, you can use the

#/usr/lib/sendmail-b Command

If the message is displayed:

/var/spool/mqueue is empty

The message has been sent out successfully.

Set up Linux to send mail using the SMTP service

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.