1. 程式人生 > 其它 >linux郵件配置

linux郵件配置

型號:centos7系統
郵箱設定:163郵箱
1、163郵箱開啟服務
在這裡插入圖片描述在這裡插入圖片描述
2、新增授權碼,要記住
在這裡插入圖片描述

3、配置Linux客戶端郵件傳送功能

[[email protected] ~]# vim /etc/mail.rc 

在檔案中新增如下:

set from=156***@163.com 

set smtp=smtp.163.com

set smtp-auth-user=156***@163.com

set smtp-auth-password=xxxxxxx (163郵箱授權碼)

set smtp-auth=login

4、測試驗證

[[email protected]
~]# echo hello | mail -s 'test' 156***@163.com

在這裡插入圖片描述