- 05
- 11月
[TOC]
参考文档:
- http://xhc.me/wp-content/uploads/mutt/manual_1.5.19_zh.html
- http://docs.huihoo.com/homepage/shredderyin/mutt_frame.html
- http://home.ustc.edu.cn/~lixuebai/GNU/MuttConfig.html
- http://newnuy.com/?p=24
fetchmail配置
~/.fetchmailrc
:
set deamon 600 # second
poll pop.xxx.xxx protocol pop3 uidl user "xxx" password "xxxxx"
procmail配置
过滤邮件,可以使用默认配置,若有特殊需要可自定义配置。
mutt配置
mutt快捷键:
- k 指向上一条邮件
- j 指向下一条邮件
- z 下一页邮件
- Z 上一页邮件
- * 第一条邮件
- = 最后一条邮件
批量标记执行动作在邮件列表界面对需要标记的邮件摁”t”打上标记,然后摁”;d”删除,再摁”$”执行删除动作如果是”T”则输入需要打标记的匹配邮件的规则,比如对邮件标题中含有Newsletter的邮件打上标记删除则是摁”T”然后输入”~h Newsletter”,然后在摁”;d”,最后执行动作按”$”
~/.muttrc
:
# source ~/.mutt/gpg.rc
set copy=yes
set record="$HOME/Mail/sent"
set rfc2047_parameters=yes
set assumed_charset="gbk:utf-8"
charset-hook ^gb2312$ gbk
# 使用G键运行 fetchmail
macro index G "!fetchmail -k -m 'procmail -d %T'\r"
macro pager G "!fetchmail -k -m 'procmail -d %T'\r"
set fast_reply=yes
set include # 回信时是否包含原文
set sendmail="/usr/bin/msmtp"
set envelope_from=yes
set from="digwtx@163.com"
set realname="digwtx"
auto_view text/html
score "~N" +4
score "~f wtx358@qq.com" +2
score "~D" -5
score "~O" +1
# set sort=reverse-date
set sort=score
# set sort_aux=reverse-date
set sort_aux=date
#mutt显示日期为中文
set locale="zh_CN.utf-8"
#如果翻到最后,再按往下翻也不会翻到下一封信件
set pager_stop
set quit=ask-yes
set pager_index_lines=4
# 每行设置一项,两个颜色分别是前景色和背景色
color normal white black
color attachment brightyellow black
color hdrdefault cyan black
color indicator black cyan
color markers brightred black
color quoted green black
color signature cyan black
color status brightgreen blue
color tilde blue black
color tree red black
color header brightgreen black ^From:
color header brightcyan black ^To:
color header brightcyan black ^Reply-To:
color header brightcyan black ^Cc:
color header brightgreen black ^Subject:
color body brightred black [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+
color body brightblue black (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+
color index brightyellow black ~N
color normal white black
color attachment brightyellow black
color hdrdefault cyan black
color indicator black cyan
color markers brightred black
color quoted green black
color signature cyan black
color status brightgreen blue
color tilde blue black
color tree red black
color header brightgreen black ^From:
color header brightcyan black ^To:
color header brightcyan black ^Reply-To:
color header brightcyan black ^Cc:
color header brightgreen black ^Subject:
color body brightred black [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+
color body brightblue black (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+
color index brightyellow black ~N
alias wtx358 <wtx358@qq.com>
PS: 另外介绍一个mutt小技巧, 标记所有邮件为已读:
macro index \cr "<tag-pattern>.\n<tag-prefix><clear-flag>N<untag-pattern>.\n"
mutt with GnuPG
路径:/usr/doc/mutt-1.5.x/samples/gpg.rc
把mutt自带的gpg.rc
复制到~/.mutt
目录里面,在~/.muttrc
文件里引用。
写邮件时按p键会出现签名和加密的选项,根据需要选择即可。
msmtp
~/.msmtprc
:
account default
host smtp.xx.xxx
from xxx@xxx.xxx
#查阅man获取更多认证选项
auth login
user xxx
password xxx
#如果你的SMTP服务器支持TLS加密,去掉下面一行的注释
#tls
logfile ~/.msmtp.log
w3m
~/.mailcap
:
text/html; w3m -T text/html -I %{charset} -dump %s; nametemplate=%s.html; copiousoutput
在~/.muttrc
文件加上一行:
auto_view text/html