#执行下面的命令,各位大侠都对号入座吧 #sendmial service sendmail stop chkconfig sendmail off #postfix service postfix stop chkconfig postfix off #再狠一点就直接卸载吧.. yum remove sendmail yum remove postfix
$ vi /etc/mail.rc set from=123456@qq.com set smtp=smtp.qq.com set smtp-auth-user=123456 set smtp-auth-password=runoob set smtp-auth=login
这里使用了QQ邮箱的SMTP,需要做以下配置:
qq邮箱通过生成授权码来设置密码:
echo hello word | mail -s " title" 123456@qq.com
sudo apt-get install heirloom-mailx
vi /etc/nail.rc 添加 QQ 邮箱开放的需要认证的smtp服务器:
set from=429240967@qq.com set smtp=smtp.qq.com set smtp-auth-user=429240967@qq.com set smtp-auth-password=runoob set smtp-auth=login
echo "邮件内容" | heirloom-mailx -s "邮件标题" 123@qq.com