sendthemessage报错_mutt+msmtp运行报错集合

现象一:发送邮件执行时报错

[email protected]/usr/bin# echo "hello this echo print"|mutt -s"linkmail"[email protected]

Error sending message, child exited 127 (Exec error.).

Could not send the message.

先单独使用msmtp发送测试:msmtp -S  发现是配置文件没找到

msmtp: account default not found: no configuration file available

查看当前的配置文件路径:msmtp -P

ignoring system configuration file/work/target/etc/msmtprc: No such file or directory

ignoring user configuration file /root/.msmtprc: No such file ordirectory

falling back to default account

msmtp: account default not found: no configuration file available

故将/usr/local/etc/Muttrc  复制为/root/.muttrc

将/usr/local/etc/msmtprc  复制为/root/.msmtprc

即可。

现象二:发送邮件服务器退回邮件(邮件服务器认为发送的是垃圾邮件)

msmtp: the server did not accept the mail

msmtp: server message: 543 reject byentas5-smtp(ID:1361427919.643)(time:Thu Feb 21 14:25:29 2013)

msmtp: could not send mail (account default from/usr/local/etc/msmtprc)

因为没有填写from和to段。

此外如果是通过smtp.163.com发送的话,也必须要填写from和to段,否则,163将认为其是垃圾文件,拒绝转发。

host smtp.163.com

port 25

from [email protected]

auth login

tls off

user [email protected]

password ***** #密码

logfile /var/log/msmtp.log

原文:http://www.cnblogs.com/itstudys/p/5434539.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值