]> git.donarmstrong.com Git - mail.git/blob - .muttrc
remove additional )
[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 ## ==============================================
279 ## Bindings for editing and reloading the .muttrc
280 ## ==============================================
281
282 macro generic   ,ve   "!sane_editor ~/.muttrc\n"
283 macro generic   ,vu   ":source ~/.muttrc\r"
284 macro generic   ,va   "!sane_editor ~/.mail_aliases \n"
285
286 ## ======================
287 ## Bindings for index
288 ## ======================
289
290 bind index   P          recall-message
291 bind index   s          save-message
292 bind browser x          check-new
293 bind index   <pagedown> next-page
294 bind index   <pageup>   previous-page
295 bind index   x          sync-mailbox
296 bind index   a          tag-prefix
297 bind index   \;         tag-entry
298
299 macro index  \cb        "|urlview\n"
300 macro index  ,l         "l~N ! ~p\n"
301 macro index  ,n         "l~N\n"
302
303 # ======================================
304 # Quickly change to my favorite folders:
305 # ======================================
306 macro index  "\\d"  "c=lists/debian-devel\r"
307 macro index  "\\o"  "c=outbox\r"
308 macro index  "\\t"  "c=TODO\r";
309 macro index  "\\b"  "c=buildd_don\r"
310 macro index  I      "c!\n" "Go to Inbox"
311
312 macro pager  "\\d"  "c=lists/debian-devel\r"
313 macro pager  "\\t"  "c=TODO\r";
314 macro pager  "\\o"  "c=outbox\r"
315 macro pager  "\\b"  "c=buildd_don\r"
316 macro pager  I      "c!\n" "Go to Inbox"
317
318 # ===========================
319 #    Bindings for pager
320 # ===========================
321
322 bind pager     /   search
323 bind pager     L   list-reply
324 bind pager     b   bounce-message
325 bind pager     f   forward-message
326 bind pager     m   mail
327 bind pager     g   group-reply
328 bind pager     j   next-line
329 bind pager     k   previous-line
330 bind pager     :   enter-command
331 bind pager     p   previous-undeleted
332 bind pager     n   next-undeleted
333 bind pager     \n  next-unread
334 # bind pager     \cf forget-passphrase
335 bind compose   s   send-message
336 bind pager ,p print-message
337
338 macro pager J "!gpg --keyserver wwwkeys.eu.pgp.net --recv-key " "Get PGP Key"
339 macro pager K "!gpg --lsign-key " "Sign PGP Key"
340
341 macro pager "i" "<sync-mailbox><change-folder>?<toggle-mailboxes>"
342 macro index "i" "<sync-mailbox><change-folder>?<toggle-mailboxes>"
343
344 ## =====================================
345 ## Tom's cursor movement system [tm] ;-)
346 ## =====================================
347
348 bind  pager   <up>     previous-line
349 bind  pager   <down>   next-line
350 bind  pager   <left>   exit 
351 bind  pager   <right>  view-attachments
352 bind  attach  <left>   exit
353 bind  attach  <right>  view-attach
354 bind  index   <right>  display-message
355 # Pre mutt 1.3.x, you'll want this instead:
356 #macro index   <left>   "c?"
357 macro index   <left>   "c?<tab>"
358 bind  browser <right>  select-entry
359 bind  browser <left>   exit
360
361 ## =================
362 ## Color definitions
363 ## =================
364 color attachment white     magenta
365 color body      brightgreen       default  "ftp://[^ ]*"
366 color body     brightgreen default "[[:alnum:]][-+.#_[:alnum:]]*@[-+.[:alnum:]]*[[:alnum:]]"
367 color body      brightgreen       default  "<URL:[^ ]*>"
368 color bold      green      default
369 color error     red        default
370
371 color header    yellow     default  "^from"
372 color header    green      default  "^from:"
373 color header    green      default  "^to:"
374 color header    green      default  "^cc:"
375 color header    green      default  "^date:"
376 color header    yellow     default  "^newsgroups:"
377 color header    yellow     default  "^reply-to:"
378 color header    brightcyan default  "^subject:"
379 color header    red        default  "^x-spam-score:"
380 color header    yellow     default  "^x-mailer:"
381 color header    yellow     default  "^message-id:"
382 color header    yellow     default  "^Organization:"
383 color header    yellow     default  "^Organisation:"  
384 color header    yellow     default  "^User-Agent:"  
385 color header    yellow     default  "^X-Message-Flag:"
386 color header    yellow        default  "^X-Diagnostic:"
387
388 color indicator white      blue
389 color markers   red        default
390 color message   white      blue
391
392 ## ==================================================
393 ## Colorizing the body of messages (ie in the pager)
394 ## ==================================================
395
396 color normal    white     default  # pager body
397
398 #  Coloring quoted text - coloring the first 7 levels:
399 color quoted    cyan      default
400 color quoted1   yellow    default
401 color quoted2   red       default
402 color quoted3   green     default
403 color quoted4   cyan      default
404 color quoted5   yellow    default
405 color quoted6   red       default
406 color quoted7   green     default
407
408 color signature brightred      default
409 color status    white          blue
410 color tilde     blue           default
411 color tree      brightmagenta  default
412 color underline yellow         default
413 # color body      yellow         default  "[;:]-[)/(|]"  # colorise smileys
414 # color body      yellow         default  "[;:][)/(|]"
415 color body      brightblue     default  "(http|ftp|news|telnet|finger)://[^ ]*"
416
417 color index     yellow         default  ~N      # New
418 color index     yellow         default  ~O      # Old
419 color index     brightgreen    default  '~p'    # mail to myself
420 color index     brightcyan    default  '~P'    # mail from myself
421 color index     magenta        default  ~F      # Flagged
422 color index     blue           default  ~T      # Tagged
423 color index     red            default  ~D      # Deleted
424
425 # Headers to ignore/see
426 # Ignore everything but the really important lines:
427 ignore *
428 unignore from: date subject to cc reply-to:
429 unignore organization organisation
430 unignore user-agent: x-agent: x-mailer: x-newsreader:
431 unignore newsgroups: posted-to: x-spam-rule:
432 # These can provide amusement
433 unignore X-Fnord: X-WebTV-Stationery: X-Message-Flag:
434 unignore Message-Id:
435 # procmail rules for listmaster
436 unignore X-Diagnostic:
437
438 # ordering of headers in the pager
439 unhdr_order *
440 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:
441
442 ## "alternates" tells mutt about your addresses.  Mutt thus can show mails
443 ## addresses to you in the folder index as "personal" using the flag '+'.
444 #set alternates=((tom|gilbertt)@snowman.net|.*@linuxbrit.*|.*@offended.*|giblet@lunixbrat.com)
445
446 folder-hook .    my_hdr "From: Don Armstrong <don@donarmstrong.com>"
447 folder-hook .    unmy_hdr "Reply-To:"
448 folder-hook .    unmy_hdr "Cc:"
449
450 folder-hook .    set sort=threads
451 folder-hook INBOX set sort=date-received
452
453 # bug hooks
454 #reply-hook "~h X-Debian-PR" my_hdr "X-Debbugs-No-Ack: yes no ack";
455 send-hook ~A unmy_hdr "X-Debbugs-No-Ack";
456 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"
457
458
459 set signature='~/lib/signature_stuff/pick_a_quote.pl|'
460
461 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"
462 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"
463
464
465 # Fix the Mail-Followup-To for sdondley
466 send-hook . unmy_hdr "Mail-Followup-To";
467 send-hook "(~f sdondley@gmail.com|~f s@gmail.com|~f s@dondley.com)" my_hdr "Mail-Followup-To: Don Armstrong <don@donarmstrong.com>";
468
469 # Debian folder hooks
470 folder-hook debian- my_hdr "From: Don Armstrong <don@debian.org>"
471 folder-hook bdo_role my_hdr "From: Don Armstrong <don@debian.org>"
472 folder-hook bdo_role my_hdr "Reply-To: owner@bugs.debian.org"
473 folder-hook bdo_role my_hdr "Cc: owner@bugs.debian.org"
474 folder-hook 0_ldo_role my_hdr "From: Don Armstrong <don@debian.org>"
475 folder-hook 0_ldo_role my_hdr "Reply-To: listmaster@lists.debian.org"
476 folder-hook 0_ldo_role my_hdr "Cc: listmaster@lists.debian.org"
477
478 folder-hook INBOX "reply-hook \"~C donarm@illinois.edu\" my_hdr \"From: Don Armstrong <donarm@illinois.edu>\""
479 folder-hook !INBOX "unhook reply-hook"
480
481 #reply-hook '~C don@debian.org' my_hdr "From: Don Armstrong <don@debian.org>"
482
483 macro generic   ,ad   my_hdr "From: Don Armstrong <don@debian.org>"
484 macro generic   ,an   my_hdr "From: Don Armstrong <don@donarmstrong.com>"
485
486 ## "lists" adds a list of mailing lists addresses
487 ## so mutt knows about these for showing them in the folder indes
488 ## and to allow replying to them with the command "list-reply".
489 ## The first part of the address (up to the @) should be used here.
490 unlists *      # remove old entries first
491 lists `cd ~/Mail/lists && echo *`
492 lists `cd ~/Mail/bugs && echo *`
493
494 unsubscribe *
495 subscribe `cd ~/Mail/lists && echo *`
496 subscribe `cd ~/Mail/bugs && echo *`
497
498 ## "mailboxes" defines the list of folders to be checked for new mail
499 ## Mutt both can show the number of mailboxes with new mail in the index and
500 ## you can cycle through these after giving the "change-folder" command.  :-)
501 mailboxes +INBOX
502 mailboxes +TODO
503 mailboxes +bdo_role
504 mailboxes +buildd_don
505 mailboxes +0_ldo_role
506 mailboxes +oftc
507 mailboxes `for file in ~/Mail/lists/*; do echo -n "+lists/$(basename $file) "; done`
508 mailboxes `for file in ~/Mail/bugs/*; do echo -n "+bugs/$(basename $file) "; done`
509
510 # integration with org mode
511 macro index \eR "|~/bin/remember_mail\n"
512 macro pager \eR "|~/bin/remember_mail\n"
513