-
Notifications
You must be signed in to change notification settings - Fork 4
/
.muttrc
253 lines (202 loc) · 8.43 KB
/
.muttrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# MIME alternative
unalternative_order *
alternative_order text/html text/plain
# Selecting headers
ignore *
unignore From Subject Date To CC BCC Reply-To X-PGP-Key-ID
hdr_order From Subject Date To CC BCC Reply-To X-PGP-Key-ID
# Format strings
set index_format="%4C %Z %{!%b %d %Y} %-18.18F [%4c]%?X?*& ? %s"
set status_format="mutt-filter mutt '-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]----%>-(%P)---'|"
# Display status on the first line
set status_on_top=yes
# No record
unset record
# Set editor
set editor="vim"
# Use Maildir
set mbox_type=Maildir
# Set folder
set folder="~/documents/mails/gmail"
set spoolfile="+INBOX"
set postponed="+Drafts"
# Message cache
set header_cache=~/.mutt/cache/header
# Set sendmail
set sendmail="pre-sendmail"
# New mail
set mark_old=no
set beep_new=yes
set check_new=yes
mailboxes =INBOX =PgSQL
# Set timeout
set timeout=30
set mail_check=10
# Quit without question
set quit=ask-yes
# Ask for a key after command
set wait_key=yes
# Decode the messages before pipe
set pipe_decode=yes
# Decode RFC2047-encoded MIME parameters
set rfc2047_parameters=yes
# Mailcap
set mailcap_path=~/.mutt/mailcap
mime_lookup application/octet-stream
# Auto view
auto_view application/msword application/pdf application/vnd.oasis.opendocument.text text/html
# Message included in reply
set include=yes
# Pager view
set resolve=yes
set pager_stop=yes
set menu_scroll=yes
set pager_index_lines=6
# Allow editing the headers
set edit_headers=yes
# To recognize reply messages
set reply_regexp="^(re([\[0-9\]+])*|aw|回复|答复)[::][ \t]*"
# Include attachments in forward emails
set mime_forward=yes
set mime_forward_rest=yes
# Traditional Fwd: subject
set forward_format="Fwd: %s"
# Show tildes at the end of mail
set tilde=yes
# Add Bcc header
my_hdr Bcc: [email protected]
# Set From header
set use_from=yes
set reverse_name=yes
set realname="Adam Lee"
set reverse_realname=no
set from="Adam Lee <[email protected]>"
# Set alternative addresses
alternates '^[email protected]$' '^adam8157\+.*@gmail.com$'
# Alias file
source ~/.mutt/alias
set alias_file=~/.mutt/alias
# Signature
set signature=~/.mutt/signature
# Set sort order
set sort=reverse-threads
set sort_aux=last-date-sent
# Mail-Followup-To
set followup_to=no
set honor_followup_to=no
# Mailing lists
lists .*@vger.kernel.org
lists .*@lists.postgresql.org
subscribe [email protected]
# ---------------------GnuPG stuff-----------------------------------
# Specify key
set pgp_sign_as="0x2365E9762F39D84D"
# PGP header
#my_hdr X-PGP-Key-ID: 0x2365E9762F39D84D
# Autosign hook
#send-hook ~A "set pgp_autosign"
#send-hook ~u "set nopgp_autosign"
# Use gpg-agent
set pgp_use_gpg_agent=yes
# If attempt to verify PGP/MIME signatures
set pgp_verify_sig=yes
# Don't store unencrypted and unsigned mail
set fcc_clear=no
# Sign replies to messages which are signed
set pgp_replysign=yes
# Encrypt replies to messages which are encrypted
set pgp_replyencrypt=yes
# Automatically attempt to decrypt traditional PGP messages
set pgp_auto_decode=yes
# During these time you will not needed to enter passphrase again
set pgp_timeout=3600
# Set PGP commands
set pgp_decode_command="gpg --no-verbose --quiet --output - %f"
set pgp_verify_command="gpg --no-verbose --quiet --output - --verify %s %f"
set pgp_decrypt_command="gpg --no-verbose --quiet --output - %f"
set pgp_sign_command="gpg --no-verbose --quiet --output - --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --no-verbose --quiet --output - --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --encrypt-to 0x2365E9762F39D84D --charset utf8 --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg --encrypt-to 0x2365E9762F39D84D --charset utf8 --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
set pgp_import_command="gpg --no-verbose --import %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --verbose --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --quiet --with-colons --list-keys %r"
set pgp_list_secring_command="gpg --no-verbose --quiet --with-colons --list-secret-keys %r"
set pgp_getkeys_command="gpg --recv-keys %r > /dev/null 2>&1"
# Pattern for good signature
set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
# ---------------------Key bindings----------------------------------
bind attach,browser,pager i exit
bind attach <space> view-attach
bind index,pager g noop
bind browser,index gg first-entry
bind browser,index G last-entry
bind browser,index,pager \cb previous-page
bind browser,index,pager \cf next-page
bind browser l select-entry
bind browser <space> select-entry
bind editor <space> noop
bind index \cx sync-mailbox
bind index j next-entry
bind index k previous-entry
bind index,pager p search-opposite
bind index,pager r group-reply
bind index,pager R reply
bind pager G bottom
bind pager gg top
bind pager j next-line
bind pager k previous-line
macro attach s "<save-entry><kill-line>~/downloads/<enter>a" "Save attachment"
macro index \cr "<tag-pattern>.\n<tag-prefix><clear-flag>N<untag-pattern>.\n" "Mark all messages as read"
macro index gi "<change-folder>=INBOX<enter>" "Go to inbox"
macro index gs "<change-folder>=Spam<enter>" "Go to spam"
macro index gt "<change-folder>=Trash<enter>" "Go to trash"
macro index i '<change-folder>?<toggle-mailboxes>'
macro index,pager H "<save-message>=INBOX<enter>" "Mark message as ham"
macro index,pager S "<save-message>=Spam<enter>" "Mark message as spam"
macro pager \cu |urlview\n "Call urlview"
folder-hook . 'bind index,pager \cd noop'
folder-hook 'Spam|Trash' 'bind index,pager \cd delete-thread'
folder-hook . 'bind index,pager \ed noop'
folder-hook 'Spam|Trash' 'bind index,pager \ed delete-subthread'
folder-hook . 'bind index,pager A delete-message'
folder-hook 'Spam|Trash' 'bind index,pager A noop'
folder-hook . 'macro index,pager d "<save-message>=Trash<enter>" "Mark message as trash"'
folder-hook 'Spam|Trash' 'bind index,pager d delete-message'
# Collapse all threads
folder-hook 'PgSQL' 'push <collapse-all>'
# ---------------------Color theme-----------------------------------
color normal white default
color attachment magenta default
color hdrdefault cyan default
color indicator brightblack white
color markers blue default
color signature cyan default
color status brightcyan black
color tilde blue default
color tree red default
color quoted green default
color quoted1 yellow default
color quoted2 red default
color hdrdefault cyan default
color header default magenta .*
color header brightgreen blue ^(From|To|Cc|Subject):
color signature cyan default
color index green default ~p # To me
color index blue default ~P # From me
color index brightyellow default ~N # New
color index brightgreen default "~N ~p" # New to me
color index brightcyan default ~T # Tagged
color index magenta default ~D # Deleted
color index brightyellow blue ~F # Flaged
color body red default "[!?]{3,}" # exclamation
color body green default "^ *[-+*o] +" # list item
color body brightgreen black "[;:]-*[)>(<|PD]" # :-) etc...
color body red default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # email
color body brightred default "(^| )[*_]+[-&[:alnum:]]+[*_]( |$)" # bold/underline
color body yellow default "(ftp|http|https)://[\-\.\,/+=&%~_:?\#a-zA-Z0-9]+" # URL
color body cyan default "[0-9]{1,2}:[0-9]{2}(:[0-9]{2})?( ?(AM|PM|am|pm))?( +[+-][0-9]{4})?"
color body cyan default "(\(19|20\)?[0-9]{2}/[01]?[0-9]/[0123]?[0-9]|[0123]?[0-9][/.][01]?[0-9][/.]\(19|20\)?[0-9]{2})(( at)? +[0-9]{1,2}:[0-9]{2}(:[0-9]{2})?( ?(AM|PM|am|pm))?( +[+-][0-9]{4})?)?"
color body cyan default "((Sun(day)?|Mon(day)?|Tue(sday)?|Wed(nesday)?|Thu(sday)?|Fri(day)?|Sat(urday)?),? +)?(Jan(uary)?|Feb(rary)?|Mar(ch)?|Apr(il)?|May|June?|July?|Aug(ust)?|Sep(ember)?|Oct(ober)?|Nov(ember)?|Dec(ember)?)[ .]+[0-9]{1,2}(st|nd|rd|th)?,?( +(19|20)[0-9]{2}(,?( at)? [0-9]{1,2}:[0-9]{2}(:[0-9]{2})?( ?(AM|PM|am|pm))?( +[+-][0-9]{4})?)?)?"
color body cyan default "((Sun(day)?|Mon(day)?|Tue(sday)?|Wed(nesday)?|Thu(sday)?|Fri(day)?|Sat(urday)?),? +)?[0-9]{1,2}(st|nd|rd|th)?[ .]+(Jan(uary)?|Feb(rary)?|Mar(ch)?|Apr(il)?|May|June?|July?|Aug(ust)?|Sep(ember)?|Oct(ober)?|Nov(ember)?|Dec(ember)?),?( +(19|20)?[0-9]{2})?(( at)? [0-9]{1,2}:[0-9]{2}(:[0-9]{2})?( ?(AM|PM|am|pm))?( +[+-][0-9]{4})?)?"