muttrc 8.39 KB
Newer Older
uoou's avatar
uoou committed
1
2
3
4
5
6
7
8
# Account stuff

set smtp_pass = `pass show web/posteo.net | head -n 1`
set mbox_type=Maildir
set folder=/home/drew/.mail/posteo
set spoolfile=+Inbox
set header_cache=/home/drew/.mail/posteo/headers
set message_cachedir=/home/drew/.mail/posteo/bodies
uoou's avatar
stuff    
uoou committed
9
10
11

set record = +Sent
set postponed = +Drafts
uoou's avatar
uoou committed
12
#set trash = +Trash
uoou's avatar
uoou committed
13
set from = uoou@posteo.net
uoou's avatar
stuff    
uoou committed
14
set realname = 'Drew'
uoou's avatar
ting  
uoou committed
15
set use_from = yes
uoou's avatar
uoou committed
16
set smtp_url = smtp://uoou@posteo.net:$smtp_pass@posteo.de:587
uoou's avatar
ting  
uoou committed
17
set ssl_force_tls = yes
uoou's avatar
stuff    
uoou committed
18
set ssl_starttls = yes
uoou's avatar
ting  
uoou committed
19

uoou's avatar
stuff    
uoou committed
20
set timeout = 0
uoou's avatar
uoou committed
21
22
23
set mail_check = 1

unmailboxes *
uoou's avatar
uoou committed
24
mailboxes "=Sent" "=Drafts" "=Inbox"
uoou's avatar
uoou committed
25

uoou's avatar
uoou committed
26
#set new_mail_command = "/home/drew/bin/email_notify"
uoou's avatar
wg    
uoou committed
27
# doesn't seem to work any more
uoou's avatar
uoou committed
28
29

# General stuff
uoou's avatar
ting  
uoou committed
30

uoou's avatar
stuff    
uoou committed
31
32
set text_flowed
unset mark_old
uoou's avatar
current    
uoou committed
33
34
35
set delete           # don't ask, just do
unset confirmappend  # don't ask, just do!
set quit             # don't ask, just do!!
uoou's avatar
ting  
uoou committed
36

uoou's avatar
uoou committed
37
38
39
40
41
42
43
# bindings
bind index,pager g noop
bind index,pager gg noop
bind index,pager M noop
bind index,pager C noop
bind index,pager i noop
bind index \Cf noop
uoou's avatar
ting  
uoou committed
44
45

# sort/threading
uoou's avatar
uoou committed
46
47
48
49
50
51
52
53
54
set sort = reverse-date-received
#set sort     = threads
#set sort_aux = reverse-last-date-received
#set sort_re
#bind index - collapse-thread
#bind index _ collapse-all
#folder-hook . "exec collapse-all"
#macro   index,pager ">"     "<next-thread><previous-entry>"
#macro   index,pager "<"     "<previous-thread><next-entry>"
uoou's avatar
ting  
uoou committed
55
56
57
58
59
60
61
62
63
64

# look and feel
set pager_index_lines = 8
set pager_context     = 5
set pager_stop
set menu_scroll
set smart_wrap
set tilde
unset markers

uoou's avatar
uoou committed
65
# composing
uoou's avatar
decency    
uoou committed
66
set editor="vim +':set textwidth=0' +':set wrapmargin=0' +':set wrap'"
uoou's avatar
uoou committed
67
unset mime_forward
uoou's avatar
ting  
uoou committed
68

uoou's avatar
uoou committed
69
# headers and dates
uoou's avatar
ting  
uoou committed
70
71
72
73
ignore *                               # first, ignore all headers
unignore from: to: cc: date: subject:  # then, show only these
hdr_order from: to: cc: date: subject: # and in this order

uoou's avatar
uoou committed
74
bind index gg first-entry
uoou's avatar
uoou committed
75
macro index o "<shell-escape>mbsync -a<enter>" "run mailsync"
uoou's avatar
uoou committed
76
77
78
79
80
81
82
83
84
85
86
87
88

macro index,pager gi "<change-folder>=Inbox<enter>" "go to inbox" 
macro index,pager Mi "<save-message>=Inbox<enter>" "move mail to inbox" 
macro index,pager Ci "<copy-message>=Inbox<enter>" "copy mail to inbox" 
macro index,pager gs "<change-folder>=Sent<enter>" "go to sent" 
macro index,pager Ms "<save-message>=Sent<enter>" "move mail to sent" 
macro index,pager Cs "<copy-message>=Sent<enter>" "copy mail to sent" 
macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts" 
macro index,pager Md "<save-message>=Drafts<enter>" "move mail to drafts" 
macro index,pager Cd "<copy-message>=Drafts<enter>" "copy mail to drafts" 
macro index,pager gt "<change-folder>=Trash<enter>" "go to trash" 
macro index,pager Mt "<save-message>=Trash<enter>" "move mail to trash" 
macro index,pager Ct "<copy-message>=Trash<enter>" "copy mail to trash" 
uoou's avatar
ting  
uoou committed
89

uoou's avatar
lolpiss    
uoou committed
90
set mailcap_path = /home/drew/.config/mutt/mailcap
uoou's avatar
uoou committed
91
set date_format="%d %b, %H:%M"
uoou's avatar
uoou committed
92
#set display_filter = "/home/drew/.local/bin/emaildates" # format times as local
uoou's avatar
uoou committed
93
set index_format="%5C  %-60.60s %-50.50F %> %D  %zs %?X?A& ?"
uoou's avatar
uoou committed
94
95
96
97
98
99
100
101
102
103
104
105
106
107
set query_command = "abook --mutt-query '%s'"
set rfc2047_parameters = yes
set sleep_time = 0		# Pause 0 seconds for informational messages
set markers = no		# Disables the `+` displayed at line wraps
set wait_key = no		# mutt won't ask "press key to continue"
set fast_reply			# skip to compose when replying
set fcc_attach			# save attachments with the body
set forward_format = "Fwd: %s"	# format of subject when forwarding
set forward_quote		# include message in forwards
set reverse_name		# reply as whomever it was to
set include			# include message in replies
auto_view text/html		# automatically show html (mailcap uses w3m)
auto_view application/pgp-encrypted
alternative_order text/plain text/enriched text/html
uoou's avatar
ting  
uoou committed
108

uoou's avatar
uoou committed
109
110
111
112
113
114
115
116
# General rebindings
bind attach <return> view-mailcap
bind attach l view-mailcap
bind editor <space> noop
bind index G last-entry
bind index gg first-entry
bind pager,attach h exit
bind pager l view-attachments
uoou's avatar
uoou committed
117
118
#bind index D delete-message
bind index d purge-message
uoou's avatar
uoou committed
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
bind index U undelete-message
bind index L limit
bind index h noop
bind index l display-message
bind browser h goto-parent
bind browser l select-entry
bind pager,browser gg top-page
bind pager,browser G bottom-page
bind index,pager,browser \Cd half-down
bind index,pager,browser \Cu half-up
bind index,pager R group-reply
bind index \031 previous-undeleted	# Mouse wheel
bind index \005 next-undeleted		# Mouse wheel
bind pager \031 previous-line		# Mouse wheel
bind pager \005 next-line		# Mouse wheel
uoou's avatar
ting  
uoou committed
134
bind editor <Tab> complete-query
uoou's avatar
wg    
uoou committed
135
bind index,pager H   "display-toggle-weed"
uoou's avatar
ting  
uoou committed
136

uoou's avatar
uoou committed
137
138
macro index,pager a "|abook --add-email\n" 'add sender to abook'
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
uoou's avatar
stowed    
uoou committed
139
macro index O "<shell-escape>mbsync -Va<enter>" "run mbsync to sync all mail"
uoou's avatar
uoou committed
140
141
142
143
144
145
146
macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>read -p 'Enter a search term to find with notmuch: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\^id:// for@a;$,=\"|\";print@a'\`\"<enter>" "show only messages matching a notmuch pattern"
macro index A "<limit>all\n" "show all messages (undo limit)"


# Default index colors:
color index white default '.*'
color index_author red default '.*'
uoou's avatar
uoou committed
147
color index_number green default
uoou's avatar
uoou committed
148
color index_subject cyan default '.*'
uoou's avatar
uoou committed
149
color index_date blue default
uoou's avatar
uoou committed
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

# New mail is boldened:
color index brightwhite black "~N"
color index_author brightred black "~N"
color index_subject brightcyan black "~N"

# Deleted mail is dulled
color index brightblack default "~D"

# Other colors and aesthetic settings:
mono bold bold
mono underline underline
mono indicator reverse
mono error bold
color normal default default
color indicator brightblack white
color normal brightwhite default
color error red default
color tilde black default
color message cyan default
color markers red white
color attachment white default
color search brightmagenta default
color status brightwhite black
color hdrdefault brightgreen default
color quoted green default
color quoted1 blue default
color quoted2 cyan default
color quoted3 white default
color quoted4 red default
color quoted5 brightred default
color signature brightgreen default
color bold black default
color underline black default
color normal default default

# Regex highlighting:
color header blue default ".*"
color header brightmagenta default "^(From)"
color header brightcyan default "^(Subject)"
color header brightwhite default "^(CC|BCC)"
color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
color body green default "\`[^\`]*\`" # Green text between ` and `
color body brightblue default "^# \.*" # Headings as bold blue
color body brightcyan default "^## \.*" # Subheadings as bold cyan
color body brightgreen default "^### \.*" # Subsubheadings as bold green
color body white default "^(\t| )*(-|\\*) \.*" # List items as white
color body brightcyan default "[;:][-o][)/(|]" # emoticons
color body brightcyan default "[;:][)(|]" # emoticons
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
color body red default "(BAD signature)"
color body cyan default "(Good signature)"
color body brightblack default "^gpg: Good signature .*"
color body brightwhite default "^gpg: "
color body brightwhite red "^gpg: BAD signature from.*"
mono body bold "^gpg: Good signature"
mono body bold "^gpg: BAD signature from.*"
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"