sendmail使用

来源:互联网 发布:windows无法启动怎么办 编辑:程序博客网 时间:2024/04/30 08:17

安装和启动sendmail

sendmail有没有运行起来, ps aux | grep sendmail 查询下就知道了
修改mail配置
然后修改/etc/mail.rc,增加一下类似N行,指定外部的smtp服务器地址、帐号密码等。

# vi /etc/mail.rc  set from=123456@qq.comset smtp=smtp.qq.com  set smtp-auth-user=123456set smtp-auth-password=sbsbsbsbset smtp-auth=login  

然后通过命令来发送邮件

echo  hello word | mail -s " title" 123456@qq.com  
0 0