Ubuntu中 mailx的安装与配置

1,安装mailx

使用sudo apt-get install mailx会出现两个包选择

heirloom-mailx和bsd-mailx

区别在于前者配置文件为/etc/nail.rc后者为/etc/mail.rc

我安装了heirloom-mailx这个包

然后配置文件

set from=发送邮箱的地址xx@163.com
set smtp=smtp.163.com
set smtp-auth-user=xx@163.com
set smtp-auth-password=password
set smtp-auth=login

 


发送命令

echo "practice"| mailx -s "Title" xx@163.com

 

posted @ 2018-08-02 16:01  被咬过的馒头  阅读(6130)  评论(0编辑  收藏  举报