NetEase mailbox to send mail using the linux

  Operation and maintenance work is sometimes necessary to know whether their data backup plans succeed, to inform himself by mail, backup successfully. But how can small pieces of mail server can send messages in the script to your mailbox too! Here we introduce a method of using the NetEase mailbox to send mail! This is the way I learned. We can learn from.

First, set the NetEase mailbox

 

 

 

 

 

 

 

 

 Second, configure postfix mail server on linux

2.1, install the software postfix

  Yum can be installed directly, then you can start postfix.

command:

1 yum -y install postfix
2 systemctl start postfix
3 systemctl enable postfix

2.2, modify the configuration file, / etc / mail.rc

  Adding these two lines in the final surface profile on the line, the last saved restart postfxi.

set [email protected] smtp=smtp.163.com
set [email protected] smtp-auth-password=qwerty123456 smtp-auth=login

 

   Restart postfix.

Third, test sending mail

  Send a test mail in linux server to another mailbox, see if you can receive.

command:

1 echo "test" |mail -s "tesc message" fycyp310520@163.com

 

   由上图可证明,邮件发送成功,并且接受成功!

Guess you like

Origin www.cnblogs.com/mython/p/12180299.html