2009-10-06 11:38
今天又整了一次mutt 配置文件是同学给的 环境ubuntu 9.04
sudo apt-get install mutt msmtp 然后配置 在主目录下 mkdir Mail touch .msmtp.log 进入Mail目录 cd Mail touch sent default index send postponed mkdir inbox -------------- 这是在主目录下 (((.msmtprc的配置))) defaults tls on logfile ~/.msmtp.log account gmail host smtp.gmail.com from tonghuasanren@gmail.com port 587 user tonghuasanren@gmail.com password 你的密码 auth on tls_certcheck off account default:gmail (((.muttrc配置))) # 默认信箱目录 set folder="~/Mail" # 已读的信箱 set mbox="~/Mail/inbox" # 进入mutt后默认使用的信箱,可以考虑和$HOME/.procmailrc设置的默认信箱相同 set spoolfile="~/Mail/inbox" # 不清楚 #set postponed="~/Mail/postponed" # 已发送的信箱 set record="~/Mail/sent" set envelope_from = yes my_hdr Reply-To:tonghua<tonghuasanren@gmail.com> set use_from=yes set from="tonghuasanren@gmail.com" my_hdr From:tonghua<tonghuasanren@gmail.com> set realname="tonghua" set editor=vim set sort=threads mailboxes = "inbox" set check_new = yes set timeout = 300 # 终端的编码 set charset="UTF-8" # 外发邮件使用的编码 set send_charset="UTF-8" # 用中文格式显示日期 set locale="zh_CN.UTF-8" # 解决没有设置字符编码的信件显示为乱码的问题 charset-hook ^us-ascii$ gb2312 # 解决主题为utf-7的信件标题显示为乱码的问题 charset-hook !UTF-8 gb2312 # 解决未经过MIME编码的信件显示为乱码的问题 #set strict_mime=no set assumed_charset="gb2312" # 解决中文附件名为乱码的问题 set rfc2047_parameters=yes # Color color hdrdefault black cyan color quoted red white color signature brightblack white color indicator brightwhite magenta color attachment black green color error red white color message blue white color search brightwhite magenta color status brightyellow blue color tree red white color normal blue white color tilde green white color bold brightyellow white color markers red white color index brightwhite red ~N color index red default ~O color index brightblack default ~D mono bold bold mono underline underline mono indicator reverse auto_view text/html #新闻组 #subscribe xiyoulinux@googlegroups.com #xiyousource@googlegroups.com #地址薄: #source ~/.muttrc.a # 采用msmtp发送邮件 set sendmail="/usr/bin/msmtp" # 让mutt可以更好的阅读html邮件 auto_view text/html #set signature="~/.mutt_sig" # 用快捷键G来调用getmial收取邮件 macro index G "!/usr/bin/getmail" #set sig_on_top=YES (((.procmail配置))) PATH=/bin:/sbin:/usr/bin:/usr/sbin SHELL=/bin/bash MAILDIR=$HOME/Mail DEFAULT=$MAILDIR/inbox :0 * ^From.*@gmail.com Gmail :0 #最后的这个配置就是指如果上面分类剩下的信件全扔到inbox里 * .* inbox # 黑名单(垃圾邮件) :0: * ^From.*badguy /dev/null # 分拣日志保存的位置 LOGFILE=”/var/log/procmail.log” # 邮件转换程序 #FORMAIL=/usr/bin/formail # 暂时未作任何分拣 # 所有经过分拣后的邮件都存储在$MAILDIR/default信箱中 #:0 #* .* #default (((.getmailrc配置))) [retriever] type = SimplePOP3SSLRetriever server = 209.85.199.109 #server = pop.gmail.com port = 995 username = tonghuasanren@gmail.com password = ####### [destination] type = Maildir path = ~/Mail/inbox/ [options] verbose = 0 delete = true 最重要的一点就是 把Mail/sent这个文件的权限改为600 chmod 600 sent 这样就ok了 |