mutt+msmtp运行报错集合

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

root@/usr/bin# echo "hello this echo print"|mutt -s"linkmail"coobutter@live.comapp

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

Could not send the message.this

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

msmtp: account default not found: no configuration file available.net

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

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

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

falling back to default accountget

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 coobutter@163.com
auth login
tls off
user coobutter@163.com
password ***** #密码
logfile /var/log/msmtp.log

 

msmtp问题及解决

一、安装msmtp,在进行 make时出现以下提示:
tls.o: In function `tls_init':
/root/Desktop/msmtp-1.4.30/src/tls.c:1100: undefined reference to ` gnutls_priority_set_direct'
collect2: ld 返回-1.4.
解决方法:在进行./configure时加上:--with-ssl=openssl
[root@localhost msmtp-1.4.30]# ./configure --prefix=/usr/app/msmtp-1.4.30/ --with-ssl=openssl
相关文章
相关标签/搜索