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