diff options
Diffstat (limited to '.mutt')
-rw-r--r-- | .mutt/attachments | 65 | ||||
-rw-r--r-- | .mutt/colors | 120 | ||||
-rw-r--r-- | .mutt/gpg.rc | 113 | ||||
-rw-r--r-- | .mutt/macros | 2 | ||||
-rw-r--r-- | .mutt/mailboxes | 1 | ||||
-rw-r--r-- | .mutt/mailcap | 36 | ||||
-rw-r--r-- | .mutt/mailinglists | 17 | ||||
-rw-r--r-- | .mutt/muttrc | 202 | ||||
-rw-r--r-- | .mutt/muttrc.bak | 172 | ||||
-rw-r--r-- | .mutt/sample.muttrc | 340 | ||||
-rw-r--r-- | .mutt/zh | 54 |
11 files changed, 1122 insertions, 0 deletions
diff --git a/.mutt/attachments b/.mutt/attachments new file mode 100644 index 0000000..1c8535e --- /dev/null +++ b/.mutt/attachments @@ -0,0 +1,65 @@ +# $Id$ +# +# mutt attchment searching and counting configuration +# +# LIweitiaNux +# February 8, 2012 +# +# Ref: file:///usr/local/share/doc/mutt/html/mimesupport.html +# + +# Removing a pattern from a list removes that pattern literally. It +# does not remove any type matching the pattern. +# +# attachments +A */.* +# attachments +A image/jpeg +# unattachments +A */.* +# +# This leaves "attached" image/jpeg files on the allowed attachments +# list. It does not remove all items, as you might expect, because the +# second */.* is not a matching expression at this time. +# +# Remember: "unattachments" only undoes what "attachments" has done! +# It does not trigger any matching on actual messages. + +# Qualify any MIME part with an "attachment" disposition, EXCEPT for +# text/x-vcard and application/pgp parts. (PGP parts are already known +# to mutt, and can be searched for with ~g, ~G, and ~k.) +# +# I've added x-pkcs7 to this, since it functions (for S/MIME) +# analogously to PGP signature attachments. S/MIME isn't supported +# in a stock mutt build, but we can still treat it specially here. +# + +attachments +A */.* +attachments -A text/x-vcard application/pgp.* +attachments -A application/x-pkcs7-.* + + +# Discount all MIME parts with an "inline" disposition, unless they're +# text/plain. (Why inline a text/plain part unless it's external to the +# message flow?) + +attachments +I text/plain + + +# These two lines make Mutt qualify MIME containers. (So, for example, +# a message/rfc822 forward will count as an attachment.) The first +# line is unnecessary if you already have "attach-allow */.*", of +# course. These are off by default! The MIME elements contained +# within a message/* or multipart/* are still examined, even if the +# containers themselves don't qualify. + +#attachments +A message/.* multipart/.* +#attachments +I message/.* multipart/.* + + +## You probably don't really care to know about deleted attachments. +attachments -A message/external-body +attachments -I message/external-body + +## Then entering the command “attachments ?” as a command will list +## your current settings in Muttrc format, so that it can be pasted +## elsewhere. + +# vim: filetype=muttrc diff --git a/.mutt/colors b/.mutt/colors new file mode 100644 index 0000000..0da5176 --- /dev/null +++ b/.mutt/colors @@ -0,0 +1,120 @@ +# -*- muttrc -*- +# +# Color settings for mutt. +# +# LIweitiaNux +# February 8, 2012 +# +# Ref: http://aperiodic.net/phil/configs/mutt/colors + +# Default color definitions +color normal white default +color hdrdefault green default +color quoted green default +color quoted1 yellow default +color quoted2 blue default +color signature cyan default +color indicator brightyellow blue +color error brightred default +color status brightwhite blue +color tree brightmagenta default +color tilde blue default +color attachment brightyellow default +color markers brightblue default +color message white default +color search brightwhite magenta +color bold brightyellow default + +# Color definitions when on a mono screen +mono bold bold +mono underline underline +mono indicator reverse +mono error bold + +# Colors for items in the reader +color header brightyellow default "^(From|Subject):" +color header brightmagenta default ^Date: +color header brightcyan default ^To: +color header brightcyan default ^Cc: +mono header bold "^(From|Subject):" + +# Many of these formulas were stolen from Jeremy Blosser +# These would be much simpler if colors were additive. + +# regular new messages +color index black white "~N !~T !~F !~p !~P" +# regular tagged messages +color index black cyan "~T !~F !~p !~P" +# regular flagged messages +color index black blue "~F !~p !~P" +# messages to me +color index yellow default "~p !~N !~T !~F !~P" +color index brightyellow white "~p ~N !~T !~F !~P" +color index yellow cyan "~p ~T !~F !~P" +color index yellow blue "~p ~F !~P" +# messages from me +color index green default "~P !~N !~T !~F" +color index green white "~P ~N !~T !~F" +color index green cyan "~P ~T !~F" +color index green blue "~P ~F" +# messages which mention my name in the body +color index yellow default "~b \"phil(_g|\!| gregory| gold)|pgregory\" !~N !~T !~F !~p !~P" +color index brightyellow white "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~N !~T !~F !~p !~P" +color index yellow cyan "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~T !~F !~p !~P" +color index yellow red "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~F !~p !~P" +# messages which are in reference to my mails +color index magenta default "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" !~N !~T !~F !~p !~P" +color index magenta white "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~N !~T !~F !~p !~P" +color index magenta cyan "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~T !~F !~p !~P" +color index magenta blue "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~F !~p !~P" +# messages to root, etc. +color index cyan default "~C \"(root|postmaster|abuse|mailer-daemon)@\" !~N !~P !~p" +color index cyan white "~C \"(root|postmaster|abuse|mailer-daemon)@\" ~N !~P !~p" +# big messages +color index red default "!~N ~z 10485760-" +color index red cyan "~T !~F !~p !~P ~z 10485760-" +color index red white "~N ~z 10485760-" + +# deleted messages +color index brightred default "!~N ~D" +color index brightred white "~N ~D" + + +# Highlights inside the body of a message. + +# Attribution lines +color body magenta default "\\* [^<]+ <[^>]+> \\[[^]]+\\]:" +color body magenta default "(^|[^[:alnum:]])on [a-z0-9 ,]+( at [a-z0-9:,. +-]+)? wrote:" + +# URLs +color body brightyellow 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<>\"]" + +# email addresses +color body brightmagenta default "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])" + +# PGP messages +color body brightgreen default "^gpg: Good signature .*" +color body white default "^gpg: " +color body brightwhite red "^gpg: BAD signature from.*" +mono body bold "^gpg: Good signature" +mono body bold "^gpg: BAD signature from.*" + +### Various smilies and the like +color body brightwhite default "<[Gg]>" # <g> +color body brightwhite default "<[Bb][Gg]>" # <bg> +color body brightwhite default " [;:]-*[})>{(<|]" # :-) etc... +# *bold* +color body brightblue default "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" +mono body bold "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" +# _underline_ +color body brightblue default "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" +mono body underline "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" +# /italic/ (Sometimes gets directory names) +color body brightblue default "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" +mono body underline "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" + +### Border lines. +color body blue default "( *[-+=#*~_]){6,}" + +# +# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=muttrc: # diff --git a/.mutt/gpg.rc b/.mutt/gpg.rc new file mode 100644 index 0000000..e90fc00 --- /dev/null +++ b/.mutt/gpg.rc @@ -0,0 +1,113 @@ +# -*-muttrc-*- +# +# Command formats for gpg. +# +# This version uses gpg-2comp from +# http://70t.de/download/gpg-2comp.tar.gz +# +# $Id$ +# +# %p The empty string when no passphrase is needed, +# the string "PGPPASSFD=0" if one is needed. +# +# This is mostly used in conditional % sequences. +# +# %f Most PGP commands operate on a single file or a file +# containing a message. %f expands to this file's name. +# +# %s When verifying signatures, there is another temporary file +# containing the detached signature. %s expands to this +# file's name. +# +# %a In "signing" contexts, this expands to the value of the +# configuration variable $pgp_sign_as. You probably need to +# use this within a conditional % sequence. +# +# %r In many contexts, mutt passes key IDs to pgp. %r expands to +# a list of key IDs. + +# Note that we explicitly set the comment armor header since GnuPG, when used +# in some localiaztion environments, generates 8bit data in that header, thereby +# breaking PGP/MIME. + +# decode application/pgp +set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" + +# verify a pgp/mime signature +set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f" + +# decrypt a pgp/mime attachment +set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" + +# create a pgp/mime signed attachment +# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f" +set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f" + +# create a application/pgp signed (old-style) message +# set pgp_clearsign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" +set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" + +# create a pgp/mime encrypted attachment +# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" +set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" + +# create a pgp/mime encrypted and signed attachment +# set pgp_encrypt_sign_command="pgpewrap gpg-2comp %?p?--passphrase-fd 0? -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" +set pgp_encrypt_sign_command="pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" + +# import a key into the public key ring +set pgp_import_command="gpg --no-verbose --import %f" + +# export a key from the public key ring +set pgp_export_command="gpg --no-verbose --export --armor %r" + +# verify a key +set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r" + +# read in the public key ring +set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --list-keys %r" + +# read in the secret key ring +set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r" + +# fetch keys +# set pgp_getkeys_command="pkspxycwrap %r" + +# specify the uid to use when encrypting/signing +#set pgp_sign_as=0xC0B1382A # FreeBSD +#set pgp_sign_as=0xB9919753 # Debian + +# this set the number of seconds to keep in memory the passpharse +# used to encrypt/sign the more the less secure it will be +set pgp_timeout=300 + +# pattern for good signature - may need to be adapted to locale! +# +# it's a regexp used against the GPG output: if it matches some line of the output +# then mutt considers the message a good signed one (ignoring the GPG exit code) +set pgp_good_sign="^gpg: Good signature from" +# set pgp_good_sign="^gpgv?: Good signature from " +# OK, here's a version which uses gnupg's message catalog: +# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`" +# This version uses --status-fd messages +# set pgp_good_sign="^\\[GNUPG:\\] GOODSIG" + +# mutt uses by default PGP/GPG to sign/encrypt messages +# if you want to use S-mime instead set the smime_is_default variable to yes + +# automatically sign all outcoming messages +#set crypt_autosign +# sign only replies to signed messages +#set crypt_replysign + +# automatically encrypt outcoming messages +#set crypt_autoencrypt=yes +# encrypt only replies to signed messages +#set crypt_replyencrypt=yes +# encrypt and sign replies to encrypted messages +#set crypt_replysignencrypted=yes + +# automatically verify the sign of a message when opened +#set crypt_verify_sig=yes + +# vim: filetype=muttrc diff --git a/.mutt/macros b/.mutt/macros new file mode 100644 index 0000000..faf43e9 --- /dev/null +++ b/.mutt/macros @@ -0,0 +1,2 @@ +macro pager \cb <pipe-entry>'urlview'<enter> 'Follow links with urlview' + diff --git a/.mutt/mailboxes b/.mutt/mailboxes new file mode 100644 index 0000000..1f5948f --- /dev/null +++ b/.mutt/mailboxes @@ -0,0 +1 @@ +mailboxes "+autistici/Drafts" "+autistici/INBOX" "+autistici/Sent" "+autistici/Spam" "+autistici/Trash" diff --git a/.mutt/mailcap b/.mutt/mailcap new file mode 100644 index 0000000..c9d3b03 --- /dev/null +++ b/.mutt/mailcap @@ -0,0 +1,36 @@ +# $Id$ +# +# mutt mailcap configuration file +# +# Weitian LI <liweitianux@gmail.com> +# 2014/07/13 +# + +## 'copiousoutput' tells mutt the cmd passes possibly large amounts +## of text, causes mutt to invoke a pager. also denote non-interactive. + +#text/html; firefox -remote 'openURL(%s)'; test=RunningFirefox +text/html; w3m -T text/html -I %{charset} -dump %s; nametemplate=%s.html; copiousoutput + +image/jpeg; feh %s +image/png; feh %s +image/gif; feh %s +image/*; feh %s + +video/*; vlc %s + +application/x-compressed-tar; tar -tf %s; copiousoutput +application/x-gnuzip; gzcat; copiousoutput +application/x-bzip; bunzip2 -c %s | tar -tf -; copiousoutput +application/x-tar-gz; gunzip -c %s | tar -tf -; copiousoutput +application/x-7z-compressed; 7z l %s; copiousoutput + +# application/postscript; ps2ascii %s; copiousoutput +# application/pdf; apvlv %s; copiousoutput +# application/pdf; mupdf %s; copiousoutput +application/pdf; pdftotext '%s' -; copiousoutput; description="PDF Document"; nametemplate="%s.pdf" +application/msword; wvHtml --charset=gb2312 %s - | w3m -dump %s; nametemplate=%s.html; copiousoutput +# application/vnd.ms-excel; + + +# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=mailcap: # diff --git a/.mutt/mailinglists b/.mutt/mailinglists new file mode 100644 index 0000000..29aaf72 --- /dev/null +++ b/.mutt/mailinglists @@ -0,0 +1,17 @@ +# $Id$ +# +# mailing lists settings +# lists and subscribe +# +# LIweitiaNux +# February 9, 2012 +# + +## lists +lists ^opensourcesjtu2010@googlegroups\.com$ + +## subscribe +subscribe ^astro-ph@arXiv\.org$ +subscribe en@bsdmag\.org$ + +# vim: filetype=muttrc diff --git a/.mutt/muttrc b/.mutt/muttrc new file mode 100644 index 0000000..7d593d0 --- /dev/null +++ b/.mutt/muttrc @@ -0,0 +1,202 @@ +# $Id$ +# +########################################################### +## mutt configuration file ## +## ## +## Weitian LI <liweitianux@gmail.com> ## +## 2014/07/13 ## +########################################################### + +### personal settings +set realname = "Weitian LI" +### mailboxes +# from 'offlineimap' +source ~/.mutt/mailboxes +### gmail, use as default +source ~/.mutt/gmail.muttrc +### account specific sources +folder-hook 'gmail.*' source ~/.mutt/gmail.muttrc +folder-hook 'lavabit.*' source ~/.mutt/lavabit.muttrc +folder-hook 'autistici.*' source ~/.mutt/autistici.muttrc + +### files and directories +set alias_file = ~/.mutt/aliases +#set header_cache = ~/.mutt/cache/headers # needs external db lib +set message_cachedir = ~/.mutt/cache +set certificate_file = ~/.mutt/certificates +set mailcap_path = ~/.mutt/mailcap +set signature = ~/.mutt/signature +set history_file = ~/.mutt/history +set tmpdir = ~/.mutt/tmp + +### settings +set mbox_type = Maildir +set folder = ~/Maildir +set mail_check = 300 # how often (in s) look for new mail +set timeout = 15 # prompt timeout until abort waiting for input +#set sendmail_wait = -1 # always put sendmail in the bkg without waiting +set sleep_time = 0 # time to pause while displaying certain info msgs +set wait_key # wait after an external cmd invoked +set history = 128 # control the size of the string history buffer +set save_history = 128 # control the size of the 'history_file' +unset confirmappend # don't ask me if i want to append to mailboxes +set beep_new # beep when receive a new msg while mailbox open +set copy # always save a copy of outgoing messages +set delete # purge deleted messages without asking +set quit = ask-yes # ask for confirmation when quit mutt +set wrap_search # searches wrap around the end +set help # show the help lines +set use_from # always generate the `From:' header field +set read_inc = 25 # specify at which rate to update progress counters +set write_inc = 25 +set print = ask-yes # ask me if I really want to print messages +set print_command = /usr/bin/false # how to print things (I like to save trees) + +### index settings +#set date_format = "%m/%d/%y at %I:%M" +#set index_format = "%4C %Z %{%m/%d} %-15.15F (%4c) %s" # format of the index +set to_chars = " +TCFL" # char used to indicate mail addressed to you +set sort = threads # primary sorting method +set sort_aux = reverse-date-received +set uncollapse_jump # don't collapse on an unread message +set sort_re # thread based on regex +set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" + +### pager settings +set pager_format="-%S- %-20.20f %s" # format of the pager status bar +set pager_index_lines = 5 # number of index lines to show +set pager_context = 5 # number of context lines to show +set pager_stop # don't go to next message automatically +set menu_scroll # scroll in menus +set smart_wrap # don't split words +set tilde # show tildes like in vim +unset markers # no ugly '+' signs for wrapped lines +set noprompt_after # ask me for a command after the external pager exits +set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" + +### composing mail +set editor = "vim +/^$ -c 'set syntax=mail ft=mail enc=utf-8'" +set visual = "vim +/^$ -c 'set syntax=mail ft=mail enc=utf-8'" +set envelope_from # which from? +set sig_dashes # dashes before my 'signature' +set autoedit # go to the editor right away when composing + # set, cannot use 'send-hooks' depend on recipients +set edit_headers # show headers when composing +set askcc # ask for CC: +set askbcc # ask for BCC: +set fcc_attach # save attachments with the body +set forward_format = "Fwd: %s" +set forward_quote # include message in forwards +set forward_decode # decode when forwarding +unset mime_forward # forward attachments as part of body +set attribution = "On %d, %n wrote: " +#set metoo # sends a copy to all recipients and myself +set fast_reply # skip to compose when replying +set reply_to # reply to 'Reply to:' field +set reverse_name # reply as whomever it was to +set nosave_empty # remove files when no messages are left +#set postpone # auto postpone message not sent when exit +#set recall # prompt to recall postponed messages +set include # include message in replies +#set post_indent_string = '---end quoted text---' +unset bounce_delivered # not include 'Delivered-To' headers, 'postfix' +## charset +set send_charset = "utf-8" # for messages that we send +set assumed_charset = "iso-8859-1" # if no charset given on incoming messages + +### headers settings +ignore * # ignore all headers +unignore from: to cc bcc date subject # show only these headers +hdr_order from: to cc date subject + +### aliases +# set alias_file = ~/.mutt/aliases +set sort_alias = alias # sort alias file by alias +set reverse_alias # show names from alias file in index +#set alias_format = "%4n %t %-20a %r" +source $alias_file # enable auto-completion + +### abook +set query_command = "abook --mutt-query '%s'" +macro generic,index,pager \Ca "<shell-escape>abook<return>" "launch abook" +macro index,pager A "<pipe-message>abook --add-email<return>" "add the sender address to abook" + +### key bindings +bind index,pager \# noop +bind index i noop + +bind pager i exit +bind pager / search +bind pager <UP> previous-line +bind pager <DOWN> next-line +bind pager k previous-line +bind pager j next-line +bind pager gg top +bind pager G bottom +bind pager K previous-undeleted +bind pager J next-undeleted +bind index,browser gg first-entry +bind index,browser G last-entry +bind index K previous-unread +bind index J next-unread +bind index,pager R group-reply + +### macros +macro pager ';' "<exit><tag-prefix>" "q+ ;" +macro index q "<sync-mailbox><change-folder>?<toggle-mailboxes>" "Leaves Index to folder list" +macro browser q "<exit><quit>" "Exit mutt" +macro browser <Tab> "<toggle-mailboxes><check-new>" "Check New" +macro index \Cr "<tag-prefix><clear-flag>N" "mark tagged messages as read" +macro index B "<limit>~b " "search message bodies" +macro index I "<change-folder>!<enter>" "go to Inbox" +# save a decoded copy in ~ +macro index P "<pipe-message>cat > ~/" "save message as" +# quick-sync with offlineimap +macro index,browser Z "<shell-escape>offlineimap -o -u ttyui<enter>" "offlineimap sync ..." +# urlview +macro pager \Cu "<pipe-entry>urlview<enter>" "Follow links with urlview" + + +########################################################### +## Misc settings ## +########################################################### +## mailing lists: lists and subscribe +set followup_to # generate 'Mail-Followup-To:' header field +set honor_followup_to # 'Mail-Followup-To' header is honored +source ~/.mutt/mailinglists + +## mutt colors definitions +source ~/.mutt/colors +#set arrow_cursor # use '->' instead of hiliting the whole line + +## GnuPG +source ~/.mutt/gpg.rc + +## auto view +auto_view text/html application/x-gunzip application/x-bzip application/x-tar-gz \ + application/x-compressed-tar application/msword application/postscript + +## MIME multipart/alternative +## The 'multipart/alternative' container type only has child MIME parts +## which represent the same content in an alternative way. often used to +## send HTML msgs which contain an alternative plain text representation. +alternative_order text/plain text/enriched text/html application/postscript + +## MIME lookup, mime-lookup +## specifies a list of MIME types that should *not* be treated +## according to their mailcap entry +mime_lookup application/octet-stream application/X-Lotus-Manuscript + +## attachment searching and counting +## attachments { +|- } disposition mime-type +## 'disposition': inline(I), attachment(A) +source ~/.mutt/attachments + +## cope with encodings +# attachment encodeing +set rfc2047_parameters = yes +# some mail without 'charset', then set 'us-ascii' as an alias to 'gb2312' +charset-hook ^us-ascii$ gb2312 + +# +# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=muttrc: # diff --git a/.mutt/muttrc.bak b/.mutt/muttrc.bak new file mode 100644 index 0000000..7cca10c --- /dev/null +++ b/.mutt/muttrc.bak @@ -0,0 +1,172 @@ +# $Id$ +# +########################################## +## mutt configuration file ## +## ## +## LIweitiaNux ## +## February 6, 2012 ## +########################################## + +### files and directories +set alias_file = ~/.mutt/aliases +#set header_cache = ~/.mutt/cache/headers # needs external db lib +set message_cachedir = ~/.mutt/cache +set certificate_file = ~/.mutt/certificates +set mailcap_path = ~/.mutt/mailcap +set signature = ~/.mutt/signature +set history_file = ~/.mutt/history +set tmpdir = ~/.mutt/tmp + +### settings +set mbox_type = Maildir +set folder = ~/Maildir +set mail_check = 300 # how often (in s) look for new mail +set timeout = 15 # prompt timeout until abort waiting for input +#set sendmail_wait = -1 # always put sendmail in the bkg without waiting +set sleep_time = 0 # time to pause while displaying certain info msgs +set history = 128 # control the size of the string history buffer +set save_history = 128 # control the size of the 'history_file' +unset confirmappend # don't ask me if i want to append to mailboxes +set beep_new # beep when receive a new msg while mailbox open +set copy # always save a copy of outgoing messages +set delete # purge deleted messages without asking +set quit = ask-yes # ask for confirmation when quit mutt +#set date_format = "%m/%d/%y at %I:%M" +set wrap_search # searches wrap around the end +set help # show the help lines +set use_from # always generate the `From:' header field +set read_inc = 25 # specify at which rate to update progress counters +set write_inc = 25 +set print = ask-yes # ask me if I really want to print messages +set print_command = /usr/bin/false # how to print things (I like to save trees) + +### index settings +set index_format = "%4C %Z %{%m/%d} %-15.15F (%4c) %s" # format of the index +set sort = threads # primary sorting method +set sort_aux = reverse-date-received +set uncollapse_jump # don't collapse on an unread message +set sort_re # thread based on regex +set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" + +### pager settings +set pager_format="-%S- %-20.20f %s" # format of the pager status bar +set pager_index_lines = 5 # number of index lines to show +set pager_context = 5 # number of context lines to show +set pager_stop # don't go to next message automatically +set menu_scroll # scroll in menus +set smart_wrap # don't split words +set tilde # show tildes like in vim +unset markers # no ugly '+' signs for wrapped lines +set noprompt_after # ask me for a command after the external pager exits +set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" + +### composing mail +set editor = "vim +/^$" +set visual = "vim +/^$" +set realname = "LIweitiaNux" +set envelope_from # which from? +set sig_dashes # dashes before my 'signature' +set autoedit # go to the editor right away when composing + # set, cannot use 'send-hooks' depend on recipients +set edit_headers # show headers when composing +set askcc # ask for CC: +set askbcc # ask for BCC: +set fcc_attach # save attachments with the body +unset mime_forward # forward attachments as part of body +set forward_format = "Fwd: %s" +set forward_quote # include message in forwards +set forward_decode # decode when forwarding +set attribution = "On %d, %n wrote: " +#set metoo # sends a copy to all recipients and myself +set fast_reply # skip to compose when replying +set reply_to # reply to 'Reply to:' field +set reverse_name # reply as whomever it was to +set nosave_empty # remove files when no messages are left +#set postpone # auto postpone message not sent when exit +#set recall # prompt to recall postponed messages +set include # include message in replies +#set post_indent_string = '---end quoted text---' + +### headers settings +ignore * # ignore all headers +unignore from: to cc bcc date subject # show only these headers +hdr_order from: to cc date subject + +### mailboxes +# from 'offlineimap' +source ~/.mutt/mailboxes + +### gmail, use as default +source ~/.mutt/gmail.muttrc +### account specific sources +folder-hook gmail.* source ~/.mutt/gmail.muttrc +folder-hook lavabit.* source ~/.mutt/lavabit.muttrc + +### aliases +# set alias_file = ~/.mutt/aliases +set sort_alias = alias # sort alias file by alias +set reverse_alias # show names from alias file in index +set alias_format = "%4n %t %-20a %r" +source $alias_file # enable auto-completion + +### bindings +bind index,pager \# noop +bind index i noop +bind pager i exit +bind pager / search +bind pager <up> previous-line +bind pager <down> next-line +bind pager k previous-line +bind pager j next-line +bind pager gg top +bind pager G bottom +bind pager K previous-undeleted +bind pager J next-undeleted +bind index gg first-entry +bind index G last-entry +bind index K previous-unread +bind index J next-unread +bind index,pager R group-reply + +### macros +macro index \Cr "<tag-prefix><clear-flag>N" "mark tagged messages as read" +macro index B "<limit>~b " "search message bodies" +macro index I "<change-folder>!<enter>" "go to Inbox" +# save a decoded copy in ~ +macro index P "<pipe-message>cat > ~/" "save message as" +# quick-sync with offlineimap +macro index Z "<shell-escape>offlineimap -o -q -u ttyui<enter>" "offlineimap sync ..." + +### Misc settings +## mutt colors definitions +source ~/.mutt/colors +#set arrow_cursor # use -> instead of hiliting the whole line + +## zh attachment encodeing +set rfc2047_parameters = yes + +## GnuPG +source ~/.mutt/gpg.rc + +## auto view +auto_view text/html application/x-gunzip application/x-tar-gz \ + application/msword application/postscript + +## MIME multipart/alternative +## The 'multipart/alternative' container type only has child MIME parts +## which represent the same content in an alternative way. often used to +## send HTML msgs which contain an alternative plain text representation. +alternative_order text/plain text/enriched text/html application/postscript + +## attachment searching and counting +## attachments { +|- } disposition mime-type +## 'disposition': inline(I), attachment(A) +source ~/.mutt/attachments + +## MIME lookup, mime-lookup +## specifies a list of MIME types that should *not* be treated +## according to their mailcap entry +mime_lookup application/octet-stream application/X-Lotus-Manuscript + +# +# vim: filetype=muttrc diff --git a/.mutt/sample.muttrc b/.mutt/sample.muttrc new file mode 100644 index 0000000..07dbe17 --- /dev/null +++ b/.mutt/sample.muttrc @@ -0,0 +1,340 @@ +# $Id$ + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# ME's personal .muttrc (Mutt 0.92.5) +# +# The format of this file is one command per line. Everything after a pound +# sign (#) is a comment, unless a backward slash (\) precedes it. Note: In +# folder-hook and send-hook you need to account for two levels of dequoting +# (see manual). +# + +# Note: $folder should be set _before_ any other path vars where `+' or `=' +# is used because paths are expanded when parsed +# +#set folder=~/Mail # where i keep my mailboxes + +#set abort_unmodified=yes # automatically abort replies if I don't + # change the message +set alias_file=~/.mail_aliases # where I keep my aliases +#set allow_8bit # never do Q-P encoding on legal 8-bit chars +set arrow_cursor # use -> instead of hiliting the whole line +#set ascii_chars # use ASCII instead of ACS chars for threads +#set askbcc +#set askcc +#set attribution="On %d, %n wrote:" # how to attribute replies +set autoedit # go to the editor right away when composing +#set auto_tag # always operate on tagged messages +#set charset="iso-8859-1" # character set for your terminal +set noconfirmappend # don't ask me if i want to append to mailboxes +#set confirmcreate # prompt when creating new files +set copy=yes # always save a copy of outgoing messages +set delete=yes # purge deleted messages without asking +set edit_headers # let me edit the message header when composing +#set editor="emacs -nw" # editor to use when composing messages +#set bounce=yes # don't ask about bouncing messages, just do it +#set fast_reply # skip initial prompts when replying +#set fcc_attach # keep attachments in copies of sent messages? +#set force_name # fcc by recipient, create if mailbox doesn't exist +#set forward_decode # weed and MIME decode forwaded messages +#set forward_format="[%a: %s]" # subject to use when forwarding messages +#set forward_quote # quote the header and body of forward msgs +#set index_format="%4C %Z %{%m/%d} [%2N] %-15.15F (%4c) %s" +set index_format="%4C %Z %{%m/%d} %-15.15F (%4c) %s" # format of the index +#set hdrs # include `my_hdr' lines in outgoing messages +#set header # include message header when replying +set help # show the help lines +#set history=20 # number of lines of history to remember +#set hostname="mutt.org" # my DNS domain +set include # always include messages when replying +#set indent_string="> " # how to quote replied text +#set locale="C" # locale to use for printing time +#set mailcap_path="~/.mailcap:/usr/local/share/mailcap" +set nomark_old # i don't care about whether a message is old +set mail_check=10 # how often to poll for new mail +set mbox=+mbox # where to store read messages +#set menu_scroll # no implicit next-page/prev-page +#set metoo # remove my address when replying +set mime_forward # use message/rfc822 type to forward messages +set move=yes # don't ask about moving messages, just do it +#set pager=less # some people prefer an external pager +#set pager_context=3 # no. of lines of context to give when scrolling +#set pager_format="-%S- %-20.20f %s" # format of the pager status bar +set pager_index_lines=6 # how many index lines to show in the pager +#set pager_stop # don't move to the next message on next-page +#set pgp_strict_enc # use Q-P encoding when needed for PGP +set postponed=+postponed # mailbox to store postponed messages in +#set post_indent_string='---end quoted text---' +#set print=ask-yes # ask me if I really want to print messages +set print_command=/bin/false # how to print things (I like to save trees) +set noprompt_after # ask me for a command after the external pager exits +#set quote_regexp="^ *[a-zA-Z]*[>:#}]" # how to catch quoted text +set read_inc=25 # show progress when reading a mailbox +#set recall # prompt to recall postponed messages +set record=+outbox # default location to save outgoing mail +set reply_to # always use reply-to if present +#set reply_regexp="^(re:[ \t]*)+"# how to identify replies in the subject: +#set resolve # move to the next message when an action is performed +#set reverse_alias # attempt to look up my names for people +set reverse_name # use my address as it appears in the message + # i am replying to +set nosave_empty # remove files when no messages are left +#set save_name # save outgoing messages by recipient, if the +#set sendmail="/usr/lib/sendmail -oi -oem" # how to deliver mail +#set shell="/bin/zsh" # program to use for shell escapes +#set signature="~/.signature" # file which contains my signature + +# I subscribe to a lot of mailing lists, so this is _very_ useful. This +# groups messages on the same subject to make it easier to follow a +# discussion. Mutt will draw a nice tree showing how the discussion flows. +set sort=threads # primary sorting method + +#set sort_aux=reverse-date-received # how to sort subthreads +#set sort_aux=last-date # date of the last message in thread +set sort_browser=reverse-date # how to sort files in the dir browser +set spoolfile='~/mailbox' # where my new mail is located +#set status_format="-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b? %l]---(%s)-%>-(%P)---" +#set status_on_top # some people prefer the status bar on top +#set strict_threads # don't thread by subject +set tilde # virtual lines to pad blank lines in the pager +#set timeout=0 # timeout for prompt in the index menu +#set tmpdir=~/tmp # where to store temp files +#set to_chars=" +TCF" +#set use_8bitmime # enable the -B8BITMIME sendmail flag +set nouse_domain # don't qualify local addresses with $domain +#set use_from # always generate the `From:' header field +set implicit_autoview=yes # pager shows parts having a mailcap viewer +set pgp_verify_sig=no # don't automatically verify message signatures +#set visual=vim # editor invoked by ~v in the builtin editor +#set nowait_key # prompt when a pipe returns normal status +set write_inc=25 # show progress while writing mailboxes + +# only enable the following IFF you have sendmail 8.8.x or you will not +# be able to send mail!!! +#set dsn_notify='failure,delay' # when to return an error message +#set dsn_return=hdrs # what to return in the error message + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Header fields I don't normally want to see +# +ignore * # this means "ignore all lines by default" + +# I do want to see these fields, though! +unignore from: subject to cc mail-followup-to \ + date x-mailer x-url # this shows how nicely wrap long lines + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Color definitions +# + +#color normal white default +color hdrdefault red default +color quoted brightblue default +color signature red default +color indicator brightyellow red +color error brightred default +color status yellow blue +color tree magenta default # the thread tree in the index menu +color tilde magenta default +color message brightcyan default +color markers brightcyan default +color attachment brightmagenta default +color search default green # how to hilite search patterns in the pager + +color header brightred default ^(From|Subject): +color body magenta default "(ftp|http|https)://[^ ]+" # point out URLs +color body magenta default [-a-z_0-9.]+@[-a-z_0-9.]+ # e-mail addresses +color underline brightgreen default + +# attributes when using a mono terminal +#mono header underline ^(From|Subject): +mono quoted bold + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Key bindings +# +# maps: +# alias alias menu +# attach attachment menu +# browser directory browser +# compose compose menu +# index message index +# pgp pgp menu +# postpone postponed message recall menu +# generic generic keymap for all of the above +# editor line editor +# pager text viewer +# + +bind generic "\e<" first-entry # emacs-like bindings for moving to top/bottom +bind generic \e> last-entry +bind generic { top-page +bind generic } bottom-page +bind generic \177 last-entry + +macro index \cb "<pipe-message> urlview<Enter>" # simulate the old browse-url function + +macro index S "<save-message>+spam<Enter>" +macro pager S "<save-message>+spam<Enter>" + +#macro index \# "<search>bug<Enter>" # search for bugs +#macro index "\"" "<enter-command> set realname=\"real hairy macro\" ?realname<Enter>" # and a comment to boot! +#macro index f1 "<enter-command>woohoo!" + +bind pager G bottom # just like vi and less +#macro pager \Ck "<pipe-message> pgp -kaf<Enter>" # a comment is valid here +#macro pager X "<pipe-message> morepgp<Enter>" # pipe PGP message to a script + +#bind editor \cy eol # make ^Y jump to the end of the line + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# User Defined Headers +# + +#my_hdr X-Useless-Header: Look ma, it's a \# sign! # real comment +#my_hdr X-Operating-System: `uname -a` + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Specify default filename when saving messages +# +# save-hook [!]<pattern> <mailbox> +# +# <mailbox> is provided as default when saving messages from <pattern> + +#save-hook mutt- =mutt-mail +#save-hook aol\\.com$ +spam +save-hook ^judge +diplomacy + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Multiple spool mailboxes +# +# mbox-hook [!]<pattern> <mbox-mailbox> +# +# Read mail in <pattern> is moved to <mbox-mailbox> when <pattern> is +# closed. + +#mbox-hook =mutt-users.in =mutt-users +#mbox-hook +TEST +inbox + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Change settings based upon message recipient +# +# send-hook [!]<pattern> <command> +# +# <command> is executed when sending mail to an address matching <pattern> + +#send-hook mutt- 'set signature=~/.sigmutt; my_hdr From: Mutt User <user@example.com>' + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Specify where to save composed messages +# +# fcc-hook [!]<pattern> <mailbox> +# +# <pattern> is recipient(s), <mailbox> is where to save a copy + +#fcc-hook joe +joe +#fcc-hook bob +bob + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Change settings based on mailbox +# +# folder-hook [!]<pattern> <command> +# +# <command> is executed when opening a mailbox matching <pattern> + +#folder-hook . 'set sort=date-sent' +#folder-hook mutt 'set index_format="%4C %Z %02m/%02N %-20.20F (%4l) %s"' +#folder-hook =mutt my_hdr Revolution: \#9 # real comment + +#folder-hook . 'set reply_regexp="^re:[ \t]*"' + +# this mailing list prepends "[WM]" to all non reply subjects, so set +# $reply_regexp to ignore it +# Warning: May break threads for other people. +#folder-hook +wmaker 'set reply_regexp="^(re:[ \t]*)?\[WM\][ \t]*"' + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Aliases +# +# alias <name> <address> [ , <address> ... ] + +#alias exam "\# to annoy michael" <user@host> +#alias me Michael Elkins <me@mutt.org> # me! +alias mutt-dev Mutt Development List <mutt-dev@mutt.org> # power users +alias mutt-users Mutt User List <mutt-users@mutt.org> +alias mutt-announce Mutt Announcement List <mutt-announce@mutt.org> +alias wmaker WindowMaker Mailing List <wmaker@eosys.com> + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Mailboxes to watch for new mail +# +# mailboxes <path1> [ <path2> ... ] +# + +mailboxes ! +mutt-dev +mutt-users +open-pgp +wmaker +hurricane +vim +ietf \ + +drums +#mailboxes `echo $HOME/Mail/*` + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Specify the order of the headers to appear when displaying a message +# +# hdr_order <hdr1> [ <hdr2> ... ] +# + +unhdr_order * # forget the previous settings +hdr_order date from subject to cc + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Identify mailing lists I subscribe to +# +# lists <list-name> [ <list-name> ... ] + +lists ^mutt-dev@mutt\\.org$ ^mutt-users@mutt\\.org$ + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Automatically use entries from ~/.mailcap to view these MIME types +# +# auto_view <type> [ <type> ... ] + +auto_view application/x-gunzip +auto_view application/x-gzip + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Scoring +# +# score <pattern> <value> +# +# 9999 and -9999 are special values which cause processing of hooks to stop +# at that entry. If you prefix the score with an equal sign (=), the score +# is assigned to the message and processing stops. + +#score '~f ^me@cs\.hmc\.edu$' 1000 +#score '~t mutt | ~c mutt' =500 +#score '~f aol\.com$' -9999 + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# I use Mutt on several different machines, so I put local config commands +# in a separate file so I can have the rest of the settings the same on all +# machines. +# + +source ~/.muttrc-local # config commands local to this site + +# EOF diff --git a/.mutt/zh b/.mutt/zh new file mode 100644 index 0000000..e773420 --- /dev/null +++ b/.mutt/zh @@ -0,0 +1,54 @@ +# +# mutt zh settings +# + +## Ref: http://forum.ubuntu.org.cn/viewtopic.php?f=73&t=322014 +#set send_charset="us-ascii:iso-8859-1:gb2312:utf-8" +set send_charset="gb2312" +set assumed_charset="utf-8:gb2312:gb18030:gbk" +set locale="zh_CN.UTF-8" +charset-hook ^us-ascii$ GB2312 +charset-hook !UTF-8 GB2312 +auto_view text/html +set rfc2047_parameters=yes + +## Ref: http://leeon.me/a/mutt-muttrc-chinese-configuration-note +#当 Mutt 用 thread 方式显示时,是否用纯 ascii 表示树状列表。 +set ascii_chars=yes +#回信的引文之前插入那个符号? +set indent_str="> " +#打分 +#新信件+4分,主题包含“通知”的+2,主题包含 “Circulation” +3, 已经标记删除的 -5,上次没有读的 +1,包含 “believe”的 -10(垃圾广告!)。 +score "~N" +4 +score "~s 通知" +2 +score "~s Circulation" +3 +score "~D" -5 +score "~O" +1 +score "~s believe" -10 +#排序方式。 +set sort=score +#当用 thread 排序方式时,我们对各个 thread 的相对排序顺序。 +set sort_aux=date +#你的终端支持哪一种编码的显示?这个必须和你的终端编码一样。推荐用utf8 +set charset="utf8" +#send_charset +#set send_charset="us-ascii:iso-8859-1:gb2312:utf-8" +set send_charset="us-ascii:iso-8859-1:gb2312:utf-8" +#外部程序退出时,是否要求用户按一个键才返回。这在察看某些shell命令输出时是比要的, +#否则它们一下就消失了。 +set wait_key=yes +#mutt显示日期为中文 +set locale="zh_CN" +#有些没有设置字符编码时 +charset-hook ^us-ascii$ gb2312 +#Chinaren 等服务器发出来的信件使用了 quoted-printable 的 subject, +#而且设置编码为 "iso8859-1",这显然是错误的。 +#对付这个错误的办法是把 iso-8859-1 变成 gb2312 的别名 +charset-hook ^iso-8859-1$ gb2312 +# evolution 发过来的 subject 为 utf-8 编码的邮件标题乱码! +#那就把不是 utf-8 的编码都映射到 gb2312 +charset-hook !utf-8 gb2312 +charset-hook .* gb2312 + + +# vim: filetype=muttrc |