summaryrefslogtreecommitdiff
path: root/.muttrc
blob: 89a5d310f518a4ead885441c936a032bd44c0f14 (plain)
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
# -*- mode: conf; -*-

# --- preferences

set from=spw@sdf.org
set realname="Sean Whitton"
#set reverse_name = yes
#set reverse_realname = no
set envelope_from = yes
set use_from = yes
set folder=~/.offlinemail/
set spoolfile = +INBOX
set record = +sent
set postponed = +drafts
set certificate_file = ~/.mutt/certificates
set move = no
set delete = ask-yes
#unset edit_hdrs
set edit_hdrs
set include
set reply_to
set abort_nosubject = no
alternates '(spw@sdf.org)|(spwhitton@email.arizona.edu)'
set hdr_format="%4C %Z %{%m/%d} %-15.15F (%4c) %s"
unset help
set mail_check=20
set timeout=15
set pager_index_lines=8
unset arrow_cursor
set fast_reply
set pager_context = 1
set reply_to = ask-yes
set recall = ask-yes
#set pager_stop
set tmpdir="~/local/mutt"
set resolve = yes
set noconfirmappend
set abort_unmodified = yes
unset signature
unset mark_old                  # to make F9 binding more useful
set editor = "emacsclient -t -a \"zile -f auto-fill-mode +8\""
#set editor="switch-to-emacsclient"
set tilde
set smart_wrap
set wrapmargin=10
unset markers
set wait_key=no
set print_command="muttprint"

# --- CatMail hooks

# reply-hook . 'set from="Sean Whitton <spw@sdf.org>" use_from'
# reply-hook "~f arizona.edu" 'set from="Sean Whitton <spwhitton@email.arizona.edu>" use_from'
# reply-hook "~t spwhitton@email.arizona.edu" 'set from="Sean Whitton <spwhitton@email.arizona.edu>" use_from'

# send2-hook . 'set from="Sean Whitton <spw@sdf.org>" use_from'
# send2-hook "~t arizona.edu" 'set from="Sean Whitton <spwhitton@email.arizona.edu>" use_from'

# --- sorting

set sort = threads
set sort_browser = date
set sort_aux = last-date-received

# --- GPG settings

set pgp_autosign = yes
set pgp_sign_as = 0x3B6D411B
set pgp_replysign = yes
set pgp_replysignencrypted = yes
set pgp_replyencrypt = yes
set pgp_timeout = 120
#set fcc_clear = yes
set fcc_clear = no
set pgp_use_gpg_agent = yes
#set pgp_strict_enc # maybe needed?

set pgp_decode_command="gpg --use-agent --no-verbose --quiet --batch --output - %f"
set pgp_verify_command="gpg --use-agent --no-verbose --quiet --batch --output - --verify %s %f"
set pgp_decrypt_command="gpg --use-agent --no-verbose --quiet --batch --output - %f"
set pgp_sign_command="gpg --use-agent --no-verbose --batch --quiet --output - --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --use-agent --no-verbose --batch --quiet --output - --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --use-agent --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0x3B6D411B -- -r %r -- %f"
set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg --use-agent --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0x3B6D411B -- -r %r -- %f"
set pgp_import_command="gpg --use-agent --no-verbose --import %f"
set pgp_export_command="gpg --use-agent --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --use-agent --verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --use-agent --no-verbose --batch --quiet --with-colons --list-keys %r"
set pgp_list_secring_command="gpg --use-agent --no-verbose --batch --quiet --with-colons --list-secret-keys %r"
set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"

# --- message headers

hdr_order From: Date: User-Agent: X-Mailer: x-oxford-username: Message-Id: To: Cc: Reply-To: Subject:
ignore *
unignore From: Date: User-Agent: X-Mailer: x-oxford-username: Message-Id: To: Cc: Reply-To: Subject:

# --- mailboxes

source ~/.mutt/mailboxes

# --- message part viewing

auto_view text/html
alternative_order text/html text/plain text/enriched text
set mailcap_path = ~/.mutt/mailcap

# --- addresses

set alias_file=~/.mutt/aliases  # this is the main alias file
source ~/.mutt/aliases
source ~/.mutt/groups           # keep shortcut groups in a separate
                                # file for simplicity

# --- key bindings

# filtering function keys, some from Jonathan
macro index <F2> "<limit>((~N|~O)!~D)<enter><home>"
macro pager <F2> "<limit>~(((~N|~O)!~D))<enter><home>"

macro index,pager <F3> "lall\n<end>"
macro index,pager <F5> "c=INBOX<return>" "switch to inbox"
macro index,pager <F6> "c=sent<return>" "switch to sent"
macro index,pager <F7> "c=archive<return>" "switch to archive"

# limit to the messages I haven't dealt with yet when opening inbox
folder-hook INBOX$ push <F2>

# extract URLS--config from http://www.memoryhole.net/~kyle/extract_url/
macro index,pager ,b "<enter-command> set my_pdsave=\$pipe_decode<enter>\
<enter-command> unset pipe_decode<enter>\
<pipe-message>extract_url.pl<enter>\
<enter-command> set pipe_decode=\$my_pdsave<enter>" "get URLs"

macro index,pager ,B "<enter-command> set my_pdsave=\$pipe_decode<enter>\
<enter-command> set pipe_decode<enter>\
<pipe-message>extract_url.pl<enter>\
<enter-command> set pipe_decode=\$my_pdsave<enter>" "decrypt message, then get URLs"

message-hook .  'macro index,pager \cb ,b "URL viewer"'
message-hook ~G 'macro index,pager \cb ,B "URL viewer"'

# send Message-Id over to Emacs so that I can link to messages
macro index,pager <F8> "|~/bin/org-mairix-el-store-link\n"

# open RSS links in browser
macro index,pager <F4> "<pipe-message>grep '\^http' | sed 's/\^/-new-tab /' | xargs iceweasel<enter>" "open all URLs at beginning of lines in message in browser tabs"

# easier scrolling
bind pager ] previous-page
bind pager [ next-page

# Emacs-style bindings
bind index n next-undeleted
bind pager n next-undeleted
bind index p previous-undeleted
bind pager p previous-undeleted
bind index ! flag-message
bind pager ! flag-message
bind pager t display-toggle-weed

# --- colours

# make flagged & new messages more obvious
color index brightred black "~F"
color index brightwhite black "~N|~O"