## user
set realname = "rzli"
## folder & spool
set spoolfile = ~/Mail/inbox
set folder = ~/Mail
set tmpdir = ~/.mutt/tmp
set mbox_type = Maildir
set mbox = +inbox
set record = +sent
set postponed = +postponed
mailboxes \
$MAIL \
=inbox \
=junkmail \
=favorites \
=archive
set move = no
# locale
set charset = UTF-8
set locale = zh_CN.UTF-8
# hook charset
charset-hook !UTF-8 gbk
charset-hook "^us-ascii$" "utf-8"
# send charset
set send_charset= "us-ascii:iso-8859-1:utf-8:gbk"
set rfc2047_parameters=yes
#Flag
# " "(空): 表示这封邮件不是给你的,也就是说 To: 和 Cc: Bcc: 都没有你的地址,
# 很多转发的邮件,未确认的邮件列表邮件,垃圾邮件都有这个特征。
# +: 表示你是收件人( To: 是你的地址之一),而且是唯一的收件人。
# T: 表示你是收件人( To: 包括了你的地址之一),但是你不是唯一的收件人。这是一封群体信件。
# C: 表示你的地址出现在 CC:,但是你不是唯一的被抄送的人。
# F: 表示这封邮件是你发出去的。
# L: 表示这是一封你已经加入的邮件列表寄来的。
#trash
folder-hook . 'macro index d "s$folder/trash\r"'
folder-hook $folder/trash 'bind index d delete-message'
# Set header
ignore headers *
unignore headers from: to: cc: subject date
set header=no
# set index
set index_format="%4C %Z %{%y年%b%d} %-15.15L (%?l?%4l&%4c?) %s"
#score
#score "~N" +4 #新信件
#score "~D" -5 #有删除标记
#score "~O" +1 #上次没有读
#score "~f huiqin" +2 #来自 xxxx
#score "~s xxxx" + 3 #主题上有 xxxx
#sort
set sort = reverse-date
set sort_aux = threads
#confirm
set confirmappend = no
# wrap & stop @ last mail
set pager_stop = yes
set smart_wrap = yes
set pager_index_lines = 5
# message editor
set editor = "vim"
set fast_reply = yes
set edit_headers = yes
# ext app to view attachment
set mailcap_path= "~/.mutt/mailcap"
# wait too see output info while quit
set wait_key=yes
#Alias
set alias_file = ~/.mutt/alias
source ~/.mutt/alias
# Attachment
set attach_format = "%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] "
set attach_sep = "\n"
set attach_split = 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
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=:-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# include original content when reply
set include = yes
# from
set envelope_from = yes
set encode_from = yes
#send hook
send-hook . 'my_hdr from:
[email protected]'
send-hook . 'set sendmail="/usr/bin/msmtp"'
reply-hook . 'my_hdr reply-to:
[email protected]'
send-hook '~t .*@163\.com$' 'my_hdr from:
[email protected]'
send-hook '~t .*@163\.com$' 'my_hdr reply-to:
[email protected]'
send-hook '~t .*@163\.com$' 'set sendmail="/usr/bin/msmtp -a 163"'
reply-hook '~t .*@163\.com$' 'my_hdr from:
[email protected]'
reply-hook '~t .*@163\.com$' 'my_hdr reply-to:
[email protected]'
reply-hook '~t .*@163\.com$' 'set sendmail="/usr/bin/msmtp -a 163"'
#key binding getmail
macro index G "!~/.getmail/getmail\n" "Invoke getmail"
macro pager G "!~/.getmail/getmail\n" "Invoke getmail"
#enter mailbox
macro index A "c=archive\r"
macro pager A "c=archive\r"
macro index I "c!\n" "Go to Inbox"
macro pager I "c!\n" "Go to Inbox"
macro index F "c=favorites\r"
macro pager F "c=favorites\r"
macro index J "c=junkmail\r"
macro pager J "c=junkmail\r"
# End of muttrc, but it could be more and more and more:)