]> git.donarmstrong.com Git - mail.git/blob - .muttrc
f0cf086e2d7c1213e292bac77e14ac9e1142127a
[mail.git] / .muttrc
1
2 set realname='Don Armstrong'
3 source ~/.mail_aliases
4 set alias_file=~/.mail_aliases
5
6 source /usr/lib/mutt/source-muttrc.d|
7
8 set abort_nosubject=no
9 set autoedit
10 unset beep
11 set bounce=yes
12 unset bounce_delivered
13 set collapse_unread
14 unset confirmappend
15 unset confirmcreate
16 set delete=yes
17 set edit_headers
18 set encode_from
19 set folder = "~/Mail"
20 set mime_forward
21 set from = "Don Armstrong <don@donarmstrong.com>"
22 unset help
23 set header_cache = ~/.mutt/header_cache
24 set hide_limited
25 set history = 20
26 set ignore_list_reply_to
27 set implicit_autoview
28 set index_format="%4C %Z %[!%k:%M %m.%d.%y] %-15.15F (%?M?C%3M&%4c?) %?H?[%H] ?%s"
29 set mailcap_path ="/etc/mailcap"
30 unset maildir_trash
31 unset mark_old
32 set narrow_tree
33 set pager_context = 2
34 set pager_stop = yes
35 set postpone
36 set quit = ask-yes
37 set record="~/Mail/outbox"
38 set reverse_alias = yes
39 set save_history = 5
40 unset sig_dashes
41 unset mark_old
42
43 set sort_re             # set: only put a child in a thread, if starts with Re:
44 unset status_on_top     # status line at the top or button?
45 unset strict_threads    # thread only by In-Reply-To/References or by Subject.
46 set suspend             # Ctrl-Z is able to suspend mutt.
47 set thorough_search     # MIME decode before searching.
48 unset tilde             # Internal Pager: ~~~~ at and of message?
49 unset uncollapse_jump   # don't move pointer, when uncollapsing thread
50 unset use_8bitmime      # run sendmail 8.8.x with -B8BITMIME to enable 8bit 
51 set use_domain          # add $domain to all addresses without @host
52 set use_from            # generate a "From:" header (unless my_hdr From:)
53 #unset use_ipv6         # Only use IPv4 address resolution.
54 set user_agent          # Create User-Agent: Mutt/<Version> header.
55 unset wait_key          # Only "press a key" if return value non-zero
56 set weed                # weed headers, when forwarding with forward_decode
57 set wrap_search         # Wrap search to top/bottom.
58 unset write_bcc         # send Bcc: line to $sendmail 
59
60 set header_cache = ~/.mutt/header_cache
61
62 set abort_nosubject=no  # Abort, if message has no subject.
63 set abort_unmodified=no # Abort, if message wasn't edited.
64 set copy=yes            # ask to save a copy of outgoing message?
65 set delete=yes          # ask for confirmation when deleting messages?
66 set honor_followup_to=ask-yes   # Ask whether to honor Mail-Followup-To header.
67 set include=yes         # quote message, when replying
68 set mime_forward=ask-yes        # use MIME when forwarding mails.
69 set mime_forward_rest=ask-yes   # forward attachments w/o autoview from attmenu
70 set move=no             # Move mail-spool to $mbox?
71 set postpone=ask-yes    # ask for postponing when doing an Abort.
72 set print=ask-yes       # ask whether you really want to print.
73 set quit=yes            # ask before quitting.
74 set recall=no           # don't ask for using postponed message.
75 set reply_to=ask-yes    # Use or ignore Reply-To.
76
77
78 set certificate_file=~/.mutt/ca-certificates
79
80
81 set history=200         # Size of the history buffer
82 set pager_context=0     # number of lines, to display twice on PgUp/Down
83 set pager_index_lines=6 # add small message index at top of pager (4)
84 set read_inc=10         # Mutt will notify when reading mailbox messages
85 set sendmail_wait=0     # >0 (wait seconds), 0 (forground), <0 (background)
86 set sleep_time=2        # pause (in seconds) while showing info messages
87
88 set sort=threads        # sorting the mails in threads
89 set sort_aux=date-received      # sorting the threads
90 set sort_browser=alpha
91 set sort_alias=alias
92
93 set display_filter=""   # pipe message through this filter before displaying
94 set editor="~/bin/sane_editor"
95 set folder=~/Mail       # where are the mailboxes (+ and = are shortcuts)
96 set from=""             # From: address (see send-hook my_hdr From)
97 set mbox=+inbox         # not used if "set move=no"
98 set pager=builtin       # internal pager: "builtin" or e.g. "less -e" 
99 set postponed=+postponed        # folder for postponed messages
100 set print_command="sed s/\f// | a2ps -2 -g --strip 1 -Email"
101 set query_command="lbdbq %s"    # query tlr's little brothers database.
102 set record="~/Mail/outbox"              # Don't save a copy of outgoing messages (Fcc)
103 reset shell             # Take shell from /etc/passwd 
104 # set signature='~/.signature'  # Signature (See send-hook!)
105 set spoolfile=+INBOX    # Maildir incoming file (~/Mail/incoming)
106 set narrow_tree=yes
107
108 set attach_sep="\n"     # Separator to add between tagged attachements
109 set charset="utf-8"     # Charset of Terminal (for display)
110 set send_charset="utf-8"  # Charsets for outgoing messages.
111 reset escape            # ESC-char for internal editor (use default).
112 reset hostname          # FQDN (use default).
113 set indent_string="> "  # Quoting mails with this string.
114 set mh_seq_flagged="flagged"    # Name of MH sequence used for flagged msgs.
115 set mh_seq_replied="replied"    # Name of MH sequence used for replied msgs.
116 set mh_seq_unseen="unseen"      # Name of MH sequence used for unseen msgs.
117 set simple_search="~f %s | ~C %s | ~s %s"       # default pattern (Fr|To|Cc|Su)
118 set status_chars="-*%A" # status of mbox (unchanged, changed, readonly, attach)
119 set to_chars=" +TCF "   # no to me, only to me, not only to me, Cc: to me, 
120                         # from me, to subscribed mailinglist.
121
122 set mbox_type=Maildir
123
124 alternates "\^(\
125 ((don(\\+.*)?@(.*\\.)?(donarmstrong|anylevel|oneinfinity)\\.(com|org|net))\
126 |(don(\\+.*)?@(.*\\.)?(rzlab|pellam)\\.ucr\\.edu)\
127 |(don(\\+.*)?@(.*\\.)?debian\\.org)\
128 |donarm(\\+.*)?@(.*\\.)?illinois\\.edu)\
129 )$"                             # alternate usernames
130
131 set gecos_mask="^[^,]*"         # Parse the GECOS field from passwd file.
132
133 set quote_regexp="^( {0,5}[>|:%]| {0,5}[a-z0-9]+[>|]+)+"
134                                 # for color quotes
135
136 set reply_regexp="^((re(\\^[0-9])? ?:|a(nt)?w(ort)?:|wg:|\\(fwd\\))[ \t]*)*"
137                         # Subject prefixes (removed on answering and threading)
138 #set reply_regexp="^(re|aw):[ \t]+"     # Default
139 set date_format="!%a %b %d, %Y at %I:%M:%S%p %Z"
140                         # control output of %d in index_format. strftime(3)
141                         # here: Monday Dec 06, 1997 at 08:30:42pm CET
142
143 set forward_format="(fwd) %s"
144                         # subject of forwarded mails
145
146 spam 'X-Spam-Level: \*\*\*\*\*\*\*\*' 8
147 spam 'X-Spam-Level: \*\*\*\*\*\*' 6
148 spam 'X-Spam-Level: \\*\\*\\*' 3
149 spam 'X-Spam-Level: \*\*' 2
150 spam 'X-Spam-Level: \*' 1
151 set index_format="%4C %Z %[!%k:%M %m.%d.%y] %-15.15F (%?M?C%3M&%4c?) %?H?[%H] ?%s"
152
153 set message_format="%-.16n: %s"
154                         # string for message/rfc822 in attachment list
155
156 set pager_format="-%Z- %C/%m [%[%H:%M]] %-17.17n   %s"
157
158 set post_indent_string=""       # Footer (after quotes, before signature).
159
160 set attribution='On %{%a, %d %b %Y}, %n wrote:\n'
161
162 set folder_format="%3C %t%N %f"
163
164 set compose_format="-- %v-- Compose  [Approximate Message Size: %l   Attachments: %a]%>-"
165
166
167 #
168 # Pretty Good Privacy (PGP):
169 #
170
171 set pgp_ignore_subkeys  # On OpenPGP keys only show the main key, not the sub.
172 set pgp_autosign        # pgp sign every outgoing mail. (send-hook?)
173 unset pgp_autoencrypt   # pgp encrypt every outgoing mail. (send-hook?)
174 set pgp_create_traditional=no   # Use old-style PGP? (don't do it!)
175 set pgp_replyencrypt    # Encrypt replies on encrypted mail
176 set pgp_replysign       # Sign replies on signed mail
177 set pgp_replysignencrypted      # Sign replies on encrypted mail
178 unset pgp_retainable_sigs       # disable retainable signatures.
179 set pgp_verify_sig=yes  # ask me whether I want to check a pgp signature
180 set pgp_timeout=7200    # forget PGP passphrase after 7200 seconds (=2 hours)
181 set pgp_strict_enc      # allway use QP enc. with PGP.
182 unset pgp_long_ids      # display 64bit PGP key-ids (don't change this!)
183 set pgp_show_unusable   # show unusable PGP keys in menu
184 set pgp_use_gpg_agent   # Use gpg_agent
185
186 set pgp_entry_format="%4n %t%f %[%y/%m/%d] %4l/0x%k %-4a %2c %u"
187
188 set pgp_sort_keys=trust
189
190 set dsn_notify="failure,delay"
191 set dsn_return="hdrs"
192
193 unscore *
194
195 unset score                     # turn off scoring
196 set score_threshold_delete=-1   # mark messages with score <=value deleted
197 set score_threshold_flag=9999   # mark messages with score >=value flagged
198 set score_threshold_read=-1     # mark messages with score <=value read
199
200 unmy_hdr *
201 auto_view text/richtext text/html text/x-sgml text/x-vcard text/x-sh \
202           text/x-csrc text/tex text/-xtex text/english \
203           application/x-tex application/x-dvi \
204           application/x-gzip-dvi application/x-diff-gzip application/x-gzip \
205           application/x-gunzip application/x-bzip2 \
206           application/x-cpio application/x-gtar \
207           application/x-tar application/x-tar-gz application/x-rar-compressed \
208           application/x-zip-compressed application/zip application/x-csh \
209           application/x-sh application/x-script application/x-shellscript \
210           application/x-latex application/x-tex application/x-shar \
211           application/x-troff application/x-troff-man application/x-troff-me \
212           application/x-pgp-message application/msword \
213           application/ms-tnef application/ms-word application/rtf \
214           application/octet-stream application/x-tcl application/x-perl \
215           application/x-debian-package message/partial
216
217
218 alternative_order text/enriched text/plain text/html
219
220 #
221 # monochrom terminals:
222 # (none, bold, underline, reverse, standout)
223 #
224 #    object             attribute
225 #
226 mono normal             none            # normal text
227 mono indicator          reverse         # actual message
228 mono tree               none            # thread arrows
229 mono status             reverse         # status line
230 mono error              bold            # errors
231 mono message            none            # info messages
232 mono quoted             bold            # quoted text
233 mono signature          none            # signature
234 mono attachment         underline       # MIME attachments
235 mono search             reverse         # search matches
236 mono tilde              none            # ~ at bottom of msg
237 mono markers            bold            # + at beginning of wrapped lines
238 mono hdrdefault         none            # default header lines
239 mono bold               bold            # hiliting bold patterns in body
240 mono underline          underline       # hiliting underlined patterns in body
241 #
242 #    object      attribute      RegExp
243 #
244 mono header      bold           "^(from|subject):"
245 #mono body       underline      "((ftp|http|https)://|news:)[^ >)\"\t]+"
246 mono body        underline      "((ftp|http|https)://|(file|news):|www\\.)[-a-z0-9_.:]*[a-z0-9](/[^][{} \t\n\r\"<>()]*[^][{} \t\n\r\"<>().,:!])?/?"
247 mono body        underline      "[-a-z_0-9.]+@[-a-z_0-9.]+"
248 mono body        bold           "(^| )\\*[-a-z0-9]+"
249
250 ## ========================================================================
251 ## BIND - bind commands to keys.
252 ## ========================================================================
253
254 ## ========================
255 ## Bindings for attach menu
256 ## ========================
257
258 bind attach ' ' select-entry
259
260 ## ============================
261 ## Bindings for index and pager
262 ## ============================
263
264 ## Jumping to the next mail that is still unread.
265 bind index   \t    next-new
266 bind pager   \t    next-new
267 bind index   ' '   next-unread
268 bind pager   ' '   next-unread
269 bind index   V     show-version
270 bind pager   V     show-version
271 bind index   A     create-alias
272 bind pager   A     create-alias
273 macro index  S     "s=spam.MANUALSPAM\r"
274 macro pager  S     "s=spam.MANUALSPAM\r"
275 macro index  X     "<copy-message>=spam.HAM\r"
276 macro pager  X     "<copy-message>=spam.HAM\r"
277
278 macro pager ,e     "<tag-prefix><pipe-message>ripmime -i - -d ~/attachments/"
279 macro index ,e     "<tag-prefix><pipe-message>ripmime -i - -d ~/attachments/"
280
281 ## ==============================================
282 ## Bindings for editing and reloading the .muttrc
283 ## ==============================================
284
285 macro generic   ,ve   "!sane_editor ~/.muttrc\n"
286 macro generic   ,vu   ":source ~/.muttrc\r"
287 macro generic   ,va   "!sane_editor ~/.mail_aliases \n"
288
289 ## ======================
290 ## Bindings for index
291 ## ======================
292
293 bind index   P          recall-message
294 bind index   s          save-message
295 bind browser x          check-new
296 bind index   <pagedown> next-page
297 bind index   <pageup>   previous-page
298 bind index   x          sync-mailbox
299 bind index   a          tag-prefix
300 bind index   \;         tag-entry
301
302 macro index  \cb        "|urlview\n"
303 macro index  ,l         "l~N ! ~p\n"
304 macro index  ,n         "l~N\n"
305
306 # ======================================
307 # Quickly change to my favorite folders:
308 # ======================================
309 macro index  "\\d"  "c=lists.debian-devel\r"
310 macro index  "\\o"  "c=outbox\r"
311 macro index  "\\t"  "c=TODO\r";
312 macro index  "\\b"  "c=buildd_don\r"
313 macro index  I      "c!\n" "Go to Inbox"
314
315 macro pager  "\\d"  "c=lists.debian-devel\r"
316 macro pager  "\\t"  "c=TODO\r";
317 macro pager  "\\o"  "c=outbox\r"
318 macro pager  "\\b"  "c=buildd_don\r"
319 macro pager  I      "c!\n" "Go to Inbox"
320
321 # ===========================
322 #    Bindings for pager
323 # ===========================
324
325 bind pager     /   search
326 bind pager     L   list-reply
327 bind pager     b   bounce-message
328 bind pager     f   forward-message
329 bind pager     m   mail
330 bind pager     g   group-reply
331 bind pager     j   next-line
332 bind pager     k   previous-line
333 bind pager     :   enter-command
334 bind pager     p   previous-undeleted
335 bind pager     n   next-undeleted
336 bind pager     \n  next-unread
337 # bind pager     \cf forget-passphrase
338 bind compose   s   send-message
339 bind pager ,p print-message
340
341 macro pager J "!gpg --keyserver wwwkeys.eu.pgp.net --recv-key " "Get PGP Key"
342 macro pager K "!gpg --lsign-key " "Sign PGP Key"
343
344 macro pager "i" "<sync-mailbox><change-folder>?<toggle-mailboxes>"
345 macro index "i" "<sync-mailbox><change-folder>?<toggle-mailboxes>"
346
347 ## =====================================
348 ## Tom's cursor movement system [tm] ;-)
349 ## =====================================
350
351 bind  pager   <up>     previous-line
352 bind  pager   <down>   next-line
353 bind  pager   <left>   exit 
354 bind  pager   <right>  view-attachments
355 bind  attach  <left>   exit
356 bind  attach  <right>  view-attach
357 bind  index   <right>  display-message
358 # Pre mutt 1.3.x, you'll want this instead:
359 #macro index   <left>   "c?"
360 macro index   <left>   "c?<tab>"
361 bind  browser <right>  select-entry
362 bind  browser <left>   exit
363
364 ## =================
365 ## Color definitions
366 ## =================
367 color attachment white     magenta
368 color body      brightgreen       default  "ftp://[^ ]*"
369 color body     brightgreen default "[[:alnum:]][-+.#_[:alnum:]]*@[-+.[:alnum:]]*[[:alnum:]]"
370 color body      brightgreen       default  "<URL:[^ ]*>"
371 color bold      green      default
372 color error     red        default
373
374 color header    yellow     default  "^from"
375 color header    green      default  "^from:"
376 color header    green      default  "^to:"
377 color header    green      default  "^cc:"
378 color header    green      default  "^date:"
379 color header    yellow     default  "^newsgroups:"
380 color header    yellow     default  "^reply-to:"
381 color header    brightcyan default  "^subject:"
382 color header    red        default  "^x-spam-score:"
383 color header    yellow     default  "^x-mailer:"
384 color header    yellow     default  "^message-id:"
385 color header    yellow     default  "^Organization:"
386 color header    yellow     default  "^Organisation:"  
387 color header    yellow     default  "^User-Agent:"  
388 color header    yellow     default  "^X-Message-Flag:"
389 color header    yellow        default  "^X-Diagnostic:"
390
391 color indicator white      blue
392 color markers   red        default
393 color message   white      blue
394
395 ## ==================================================
396 ## Colorizing the body of messages (ie in the pager)
397 ## ==================================================
398
399 color normal    white     default  # pager body
400
401 #  Coloring quoted text - coloring the first 7 levels:
402 color quoted    cyan      default
403 color quoted1   yellow    default
404 color quoted2   red       default
405 color quoted3   green     default
406 color quoted4   cyan      default
407 color quoted5   yellow    default
408 color quoted6   red       default
409 color quoted7   green     default
410
411 color signature brightred      default
412 color status    white          blue
413 color tilde     blue           default
414 color tree      brightmagenta  default
415 color underline yellow         default
416 # color body      yellow         default  "[;:]-[)/(|]"  # colorise smileys
417 # color body      yellow         default  "[;:][)/(|]"
418 color body      brightblue     default  "(http|ftp|news|telnet|finger)://[^ ]*"
419
420 color index     yellow         default  ~N      # New
421 color index     yellow         default  ~O      # Old
422 color index     brightgreen    default  '~p'    # mail to myself
423 color index     brightcyan    default  '~P'    # mail from myself
424 color index     magenta        default  ~F      # Flagged
425 color index     blue           default  ~T      # Tagged
426 color index     red            default  ~D      # Deleted
427
428 # Headers to ignore/see
429 # Ignore everything but the really important lines:
430 ignore *
431 unignore from: date subject to cc reply-to:
432 unignore organization organisation
433 unignore user-agent: x-agent: x-mailer: x-newsreader:
434 unignore newsgroups: posted-to: x-spam-rule:
435 # These can provide amusement
436 unignore X-Fnord: X-WebTV-Stationery: X-Message-Flag:
437 unignore Message-Id:
438 # procmail rules for listmaster
439 unignore X-Diagnostic:
440
441 # ordering of headers in the pager
442 unhdr_order *
443 hdr_order Date: From: To: Cc: X-Newsreader: X-Mailer: Organization: Organisation: User-Agent: X-Fnord: X-WebTV-Stationery: X-Message-Flag: X-Diagnostic: Newsgroups: Reply-To: Subject: x-spam-rule:
444
445 folder-hook .    set sort=threads
446 folder-hook INBOX set sort=date-received
447
448 # bug hooks
449 #reply-hook "~h X-Debian-PR" my_hdr "X-Debbugs-No-Ack: yes no ack";
450 send-hook ~A unmy_hdr "X-Debbugs-No-Ack";
451 send-hook "(~C submit@bugs.debian.org |~C control@bugs.debian.org |~C \d+@bugs.debian.org)" my_hdr "X-Debbugs-No-Ack: yes no ack"
452
453 # Fix the Mail-Followup-To for sdondley
454 send-hook . unmy_hdr "Mail-Followup-To";
455 send-hook "(~f sdondley@gmail.com|~f s@gmail.com|~f s@dondley.com)" my_hdr "Mail-Followup-To: Don Armstrong <don@donarmstrong.com>";
456
457 # identities
458 # default
459 source "~/.mutt/identity_default"
460 # Debian folder hooks
461 folder-hook debian- "source ~/.mutt/identity_debian"
462 folder-hook bdo_role "source ~/.mutt/identity_owner"
463 folder-hook 0_ldo_role "source ~/.mutt/identity_listmaster"
464
465 # INBOX hook
466 folder-hook INBOX "reply-hook \"~C donarm@illinois.edu\" source ~/.mutt/identity_illinois; reply-hook \"~C don@debian.org\" source ~/.mutt/identity_debian; reply-hook \"!(~C donarm@illinois.edu|~C don@debian.org)\" source ~/.mutt/identity_default"
467 folder-hook !INBOX "unhook reply-hook"
468
469 macro generic ,ad ":source ~/.mutt/identity_debian\r"
470 macro generic ,an ":source ~/.mutt/identity_default\r"
471 macro generic ,as ":source ~/.mutt/identity_illinois\r"
472
473 ## "lists" adds a list of mailing lists addresses
474 ## so mutt knows about these for showing them in the folder indexes
475 ## and to allow replying to them with the command "list-reply".
476 ## The first part of the address (up to the @) should be used here.
477 unlists *      # remove old entries first
478 lists `find ~/Mail/ -mindepth 1 -maxdepth 1 \( -iname 'lists.*' -o -iname 'bugs.*' \) -type d -printf '%f '|sed 's/(lists|bugs)\.//g'`
479
480 unsubscribe *
481 subscribe `find ~/Mail/ -mindepth 1 -maxdepth 1 \( -iname 'lists.*' -o -iname 'bugs.*' \) -type d -printf '%f '`
482
483 ## "mailboxes" defines the list of folders to be checked for new mail
484 ## Mutt both can show the number of mailboxes with new mail in the index and
485 ## you can cycle through these after giving the "change-folder" command.  :-)
486 mailboxes +INBOX
487 mailboxes +TODO
488 mailboxes +bdo_role
489 mailboxes +buildd_don
490 mailboxes +0_ldo_role
491 mailboxes +oftc
492 mailboxes `find ~/Mail/ -mindepth 1 -maxdepth 1 \( -iname 'lists.*' -o -iname 'bugs.*' \) -type d -printf '+%f '`
493
494 # integration with org mode
495 macro index \eR "|~/bin/remember_mail\n"
496 macro pager \eR "|~/bin/remember_mail\n"
497