標題: mutt配置成功 [打印本頁] 作者: blueycx 時間: 2008-11-20 23:25 標題: mutt配置成功 哈哈,今天上午終于把mutt配制好了,類似我了,弄了好幾天,期間遇到了一些問題都被我kill掉了,有兩個是比較嚴肅的,第一個,最還不要用其他的文本編輯器編寫配置文件,使用vim是最好的,我用其他編輯器些的配置文件,不知為什么不行,用vim就可以,第二,必須注意文件的權(quán)限在配置msmtp的時候始終提示~/.msmtprc: must have no more than user read/write permissions于是到網(wǎng)上查資料,最終在一個不起眼的地方找到了,只要這樣 chmod 600 ~/.msmtprc就可以了,不過實在不明白為什么權(quán)限這么嚴格?只要600?下面附上配置文件。
# 默認信箱目錄
set folder="~/Mail"
# 已讀的信箱
set mbox="~/Mail/inbox"
# 進入mutt后默認使用的信箱,可以考慮和$HOME/.procmailrc設(shè)置的默認信箱相同
set spoolfile="~/Mail/inbox"
# 不清楚
#set postponed="~/Mail/postponed"
# 已發(fā)送的信箱
set record="~/Mail/sent"
set envelope_from = yes
my_hdr Reply-To:LiQiangFeng
set use_from=yes
set from="blueskyflq@gmail.com"
my_hdr From:LiQiangFeng
set realname="LiQiangFeng"
set editor=vim
set sort=threads
mailboxes = "inbox"
set check_new = yes
set timeout = 300
set metoo=yes
# 終端的編碼
set charset="UTF-8"
# 外發(fā)郵件使用的編碼
set send_charset="UTF-8"
# 用中文格式顯示日期
set locale="zh_CN.UTF-8"
# 解決沒有設(shè)置字符編碼的信件顯示為亂碼的問題
charset-hook ^us-ascii$ gb2312
# 解決主題為utf-8的信件標題顯示為亂碼的問題
charset-hook !UTF-8 gb2312
# 解決未經(jīng)過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發(fā)送郵件
set sendmail="/usr/bin/msmtp"
# 讓mutt可以更好的閱讀html郵件
auto_view text/html
#set signature="~/.mutt_sig"
# 用快捷鍵G來調(diào)用getmial收取郵件
macro index G "!/usr/bin/getmail"
#set sig_on_top=YES
#~/.msmtprc
defaults
tls on
logfile ~/.msmtp.log
account gmail
host smtp.gmail.com
from user@gmail.com
port 587
user user@gmail.com
password 123456
auth on
tls_certcheck off
account default:gmail
#~/.getmail
[retriever]
type = SimplePOP3SSLRetriever
server = 209.85.199.109
#server = pop.gmail.com
port = 995
username = user@gmail.com
password = 123456
[destination]
type = Maildir
path = ~/Mail/inbox/
[options]
verbose = 0
delete = true