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