博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux邮件客户端mutt日志文件,发不出邮件
阅读量:5748 次
发布时间:2019-06-18

本文共 4754 字,大约阅读时间需要 15 分钟。

linux上面使用很方便的收发邮件客户端(即MUA),还有一个是mail,大家也可以试试。

在网上找了很多,都说需要msmtp配合使用,其实mutt里面也内建了smtp支持的。

mutt and SMTPmutt can't speak SMTP ... wait, it can ... ... or why mutt should not but slowly becomes an "all-in-1" program.mutt was developed with the concept of "one task per tool", enabling performance through combination with other high quality modular programs. This is an aspect of the "unix philosophy".Putting too much into an application wastes unused resources --either in storage (HDD/RAM) or in run-time performance-- when in many cases people don't even use this extra functionality, or it is covered by some other specialist tool. (With a commercial program you'd even have to pay for the unused code, would you do that if you had the choice?)That's why --so far-- things have been kept separate (or out of mutt).For quite some time basic MRA functionality has been included in mutt, which some consider a breach of the concept and therefore demand inclusion of SMTP support as well (and because "all the other MUAs have SMTP as well"). The original reasons for the MRA part are not recorded (ed: anyone who knows shall fill in), but it makes sense to have MRA in mutt and not MTA:MUA+MRA access&store msgs within your control-reach (pull),MTA passes msgs beyond your control boundary (push).On this abstract level, MUA+MRA combined cover 1 area so they can both go into one application like mutt, while MTA covers another. IMAP already works with a folder system, so it's a simple step to include that into mutt, and with the URL-syntax POP can be treated like a remote folder, too."This entire concept is rubbish and the mutt developers are just plain lazy [to add all the good stuff]."Well, it seems the force of the masses is hard to withstand though ... recently experimental minimal SMTP support has been added to mutt as an option. If you fail to use a separate local MTA with mutt, try this failsafe. But still the preferred way is the MTA way. Choose your own optimal way for (multi-account) maintenance.

在centos7上面,我使用mutt可以直接使用,但是在centos6上面试了下,发不出去邮件,具体原因我也没找到,可能是因为smtp的原因。

后来准备使用其他smtp发送邮件,按照网上的参考试了几个都没有发送出去,最后发现可能是smtp_url配置的问题,按照如下配置,就可以发送了

set envelope_from=yesset from='youremail@mailserver.com'set realname='nickname'set use_from=yesset smtp_pass='yourpassword'set smtp_url="smtp://mail.mailserver.com:25" #注,这是25端口没有使用加密,url也可以使用smtp://smtp.mailserver.com:portset smtp_authenticators='gssapi:login'

之前按照网上的smtp_url中,添加了账号

smtp_url="smtp://myemail@mail.com@mail.mailserver.com:25"smtp_url="smtp://myemail@mail.mailserver.com:25"

上面两种方式,我试了都是发了邮件,也没返回错误,也没有收到邮件,mutt的日志也没有明确的指出哪里出问题了,不过应该是邮件没有发送成功的。

方法二:

通过yum install mutt安装的mutt,如果按照上面方式后,还是不行的话,可以去官网下载最新的包,自己编译,因为可能有的选项默认安装的包没有编译进去。

./configure --prefix=/opt/tmp/mutt --enable-smtp --enable-debug  --with-sasl  --enable-pop  --enable-imap

 

 

mutt调试模式:

Debugging TipsMake sure your mutt is built with debugging support enabled and runmutt -vand look for+DEBUGIf it isn't, you'll have to rebuild mutt with debugging support:Build-enable debugging in muttpass the --enable-debug flag to configure along with any other flags you need.it can also be useful to run make as make CFLAGS=-ggdb in order to get better debugging symbolsGenerating a trace fileTo produce a debug trace, run mutt with the -d2 flag. -d takes a number from 1-5, corresponding to increasing levels of verbosity:errorsnetwork tracing, important state changesless important informationlog spam, e.g. status updates from functions that are called very ofteneverything, even very confidential information like passwordsFor most purposes, level 2 provides the right amount of detail for a bug report.It may also include some confidential information (email addresses, server URLs), so you should read it over before you send it to anyone.Feel free to sanitize it -- we'll ask for further information if necessary.Analyzing a crashWe'd love to see a debugger back trace.If you have a core fileIf mutt has produced a core file, run gdb /path/to/mutt 
, then enter backtrace at the (gdb) prompt and cut and paste the output.If you don'tOne common reason for not getting a core dump when mutt crashes is ulimit. If running ulimit -c returns 0, that means core dumps are disabled in your login session. Try executing ulimit -c unlimited, then running mutt again.If you still don't have a core dump, you can always run mutt inside of gdb, then generate the backtrace when it crashes:gdb /path/to/mutt(gdb) run -d2 [other arguments you use](make mutt crash)backtrace

 

 

 

参考:https://dev.mutt.org/trac/wiki/DebugTips

https://nixtricks.wordpress.com/2010/05/05/mutt-configure-mutt-to-receive-email-via-imap-and-send-via-smtp/

https://dev.mutt.org/trac/wiki/MailConcept

转载于:https://www.cnblogs.com/z-books/p/7478195.html

你可能感兴趣的文章
CentOS 在编译php 的时候可能出现的错误以及需要安装的类库
查看>>
在以TCP为连接方式的服务器中,为什么在服务端设计当中需要考虑心跳?
查看>>
[阅读笔记]王坚对话CIO:揭开企业“去IOE”的实质
查看>>
如何让你的网页打开速度降低到 1s 内
查看>>
Linux中的用户和组及其权限管理
查看>>
java和UML-2-面向对象
查看>>
从问题看本质: 研究TCP close_wait的内幕
查看>>
CentOS -- YUM服务器搭建(一)_光盘挂载方式
查看>>
Class.forName和ClassLoader.loadClass区别
查看>>
交互式Ruby解释器:irb
查看>>
一共81个,开源大数据处理工具汇总(上)
查看>>
文件服务器文件夹,共享文件夹及权限迁移
查看>>
玩转grub加密
查看>>
VMware Virtual SAN:见证组件部署逻辑
查看>>
java 内存异常排错
查看>>
调试JS的工具和一些方法
查看>>
第一章 Map
查看>>
Ruby String方法摘要
查看>>
Java 8 基础教程(二)
查看>>
cocos2dx update跳跃函数
查看>>