栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Linux邮件代理mailx

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Linux邮件代理mailx

mailx是邮件代理工具 并非邮箱服务器,配置指定邮件账号发送邮件!!!

邮件用户代理(MUA,Mail User Agent)
邮件传送代理(MTA,Mail Transport Agent)
邮件分发代理(MDA,Mail Deliver Agent)

1、安装

yum -y install mailx

2、修改配置文件 /etc/mail.rc
// 配置文件解释:

   set from=xxx@126.com  # 发送的邮件地址
  set smtp=smtp.126.com  # 发送邮件服务器
  set smtp-auth-user=xxx@126.com  # 发件人账号,一般情况下为邮件地址
  set smtp-auth-password=xxx  # 发件人密码
  set smtp-auth=login    # 邮件认证方式

//QQ生成授权码及配置文件内容:

[root@localhost ~]# tail -n 5 /etc/mail.rc 
set from=1507341xx4@qq.com
set smtp=smtp.qq.com
set smtp-auth-user=1507341xx4@qq.com
set smtp-auth-password="xxxx"
set smtp-auth=login

//163生成授权码及配置文件内容:

[root@localhost ~]# tail -n 5 /etc/mail.rc
set from=qinzitenxxx@163.com
set smtp=smtp.163.com
set smtp-auth-user=qinzitenxxx@163.com
set smtp-auth-password="xxxx"
set smtp-auth=login

3、测试

echo `date  '+%X-%x'` | mail -s "test" 17901685xx@qq.com
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/296495.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号