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