myconfig

my config files
git clone https://a3nm.net/git/myconfig/
Log | Files | Refs | README

muttrc (5903B)


      1 # == Locations ==
      2 
      3 set folder=~/Mail_inbox
      4 set spoolfile="~/Mail_inbox/INBOX"
      5 # sent mail is bcc'd to me, so this is only a backup
      6 set record="~/temp/sent_backup/"
      7 # don't save draft mail in a place that might get cleaned up unexpectedly
      8 set tmpdir="~/temp/mutt/"
      9 # speeds things up sometimes
     10 set header_cache=~/.cache/mutt_header_cache
     11 set message_cachedir=~/.cache/mutt_message_cachedir
     12 set mbox_type="Maildir"
     13 # aliases
     14 set reverse_alias
     15 set use_domain=no
     16 unset signature
     17 set query_command="lbdbq '%s'"
     18 bind editor \cn complete-query
     19 my_hdr User-Agent: Mutt
     20 
     21 # == Editor ==
     22 set editor="vim -c ':so ~/config/vim/vimrc_mail' +1 +/^$/"
     23 
     24 # == GPG ==
     25 set pgp_autosign
     26 set pgp_replyencrypt
     27 set pgp_use_gpg_agent
     28 # set crypt_use_gpgme=no
     29 set crypt_autosmime=no
     30 set crypt_opportunistic_encrypt
     31 message-hook '!(~g|~G) ~b"^-----BEGIN\ PGP\ (SIGNED\ )?MESSAGE"' "exec check-traditional-pgp"
     32 
     33 source ~/config/mutt/fix_998
     34 
     35 # == Personal stuff ==
     36 # undo the effect of some hooks
     37 send-hook . "unmy_hdr From:"
     38 send-hook . "set pgp_autosign"
     39 send-hook . "set crypt_opportunistic_encrypt"
     40 
     41 # use alternates for reversing
     42 set reverse_name=yes
     43 set reverse_realname=no
     44 
     45 source "~/.mutt/perso"
     46 
     47 # == Encoding ==
     48 set charset=utf-8
     49 set send_charset=utf-8
     50 
     51 # == Interface ==
     52 set nohelp
     53 set fast_reply
     54 set norecall
     55 set abort_nosubject
     56 set tilde
     57 set sleep_time=0
     58 set nomarkers
     59 set wait_key
     60 set pager_stop
     61 set pager_index_lines=5
     62 
     63 # check mail frequently
     64 set timeout=10
     65 set mail_check=5
     66 
     67 # sorting and threading
     68 set sort=threads
     69 set sort_aux="last-date"
     70 set strict_threads
     71 set nocollapse_unread
     72 bind index - collapse-thread
     73 bind index _ collapse-all
     74 
     75 # formats
     76 set index_format="%<[y?%<[m?%<[d?%[#%H:%M]&%[%a %d]>&%[%b %d]>&%[%Y%m]> %?X?A& ?%Z %-15.15L %?M?(#%03M)&? %s"
     77 set pager_format="%4c -%Z- %C/%m: %-20.20n %s"
     78 set status_format="%r%f %?l?%l? %?M?%M/?%m:%?n? N%n?%?o? O%o?%?d? D%d?%?F? !%F?%?t? *%t?%>  %h (%s/%S%?V?-%V?)  (%P)"
     79 
     80 # useful with notmuch
     81 unignore Message-Id
     82 unignore In-Reply-To
     83 # useful to figure out why I received something
     84 unignore List-Id X-Original-To
     85 # and to figure out where it was originally filed by sieve
     86 unignore X-Sieve-Destination
     87 
     88 # == Mail composition ==
     89 set edit_headers
     90 set include
     91 
     92 # forward things with mime, i don't care about crappy clients
     93 set mime_forward
     94 set mime_forward_rest
     95 
     96 # == Mailbox handling ==
     97 set nomove
     98 set noconfirmappend
     99 set nomark_old
    100 set delete
    101 
    102 # == Colors ==
    103 source ~/.mutt/colors
    104 
    105 # == Bindings ==
    106 
    107 # more vim-like bindings
    108 macro index G <last-entry> 
    109 bind index < first-entry
    110 bind index > last-entry
    111 # remap <help> to elsewhere than ? and <F1>
    112 macro index,pager <F2> <help>
    113 macro index,pager \cf <next-page> 
    114 macro index,pager \cb <previous-page>
    115 macro index,pager ? <search-reverse> 
    116 macro index,pager <Esc>/ "<search>~b "
    117 macro index,pager <Esc>? "<search-reverse>~b "
    118 
    119 # no NNTP
    120 bind pager i exit
    121 bind index i noop
    122 bind pager,index F flag-message
    123 
    124 # remove unneccessary bindings
    125 bind index,pager p noop
    126 bind index,pager <Esc>b noop
    127 bind index,pager <Down> noop
    128 bind index,pager <Up> noop
    129 bind index,pager <Left> noop
    130 bind index,pager <Right> noop
    131 bind index,pager <Esc>s noop
    132 bind index <End> noop
    133 bind index <Home> noop
    134 bind index M noop
    135 bind index H noop
    136 
    137 # == Bindings ==
    138 
    139 macro index,pager p "s=hand_spam<enter>" "mark as spam"
    140 macro index,pager x "s!<enter>" "save to inbox"
    141 macro index,pager E "C=useful<enter>" "copy to useful"
    142 macro index,pager I "c!<enter><limit>~(! ~D)<enter>G" "inbox"
    143 macro index,pager S "<change-folder-readonly>~/temp/sent_materialized<enter>G" "sent mail"
    144 
    145 set sidebar_on_right
    146 set sidebar_width=10
    147 
    148 #bind index,pager , next-unread-mailbox
    149 bind index,pager . sidebar-toggle-visible
    150 # move to next sidebar folder, no matter if sidebar is visible or not
    151 macro index,pager , \
    152   "<enter-command>set my_old_visible=\$sidebar_visible sidebar_visible<enter><sidebar-next><sidebar-open><enter-command>set sidebar_visible=\$my_old_visible<enter>"
    153 
    154 # == Postponed mail ==
    155 
    156 # save postponed mail in the inbox
    157 set postponed="=INBOX"
    158 # ugly hack to resume the currently highlighted mail
    159 # may fail messily if you do not create =draft_tmp first
    160 macro index,pager R \
    161  "<enter-command>set postponed='=draft_tmp' my_old_maildir_trash=\$maildir_trash nomaildir_trash<enter>\
    162  s=draft_tmp<enter><recall-message><enter-command>set postponed='=INBOX' maildir_trash=\$my_old_maildir_trash<enter>" \
    163  "recall current message"
    164 # unmodified drafts should be saved back to the inbox, not discarded
    165 set noabort_unmodified
    166 
    167 # keep old mail around to complete threads
    168 # set maildir_trash
    169 
    170 # reset default limit
    171 macro index B "l~(! ~D)<enter>"
    172 # apply it on all folders by default
    173 folder-hook . push 'B=*'
    174 
    175 # automatically view html mail using mailcap
    176 auto_view text/html
    177 # still, prefer text if available
    178 alternative_order text/plain text/enriched text/html
    179 # press 'H' on a message to change this setting once and view the HTML part in priority
    180 macro index H \
    181   "<enter-command>unalternative_order *<enter><display-message><enter-command>alternative_order text/plain text/enriched text/html<enter>"
    182 macro pager H \
    183   "<exit>H"
    184 
    185 # http://mutt-users.mutt.narkive.com/t0y58ITT/sort-mailbox-by-spam-tag-score-sorting-strangeness
    186 spam "X-Spam-Status: (Yes|No), score=(-?[[:digit:]]+\.[[:digit:]]+)" "%2"
    187 
    188 folder-hook . push '*'
    189 
    190 # == notmuch ==
    191 bind index,pager z entire-thread
    192 macro index,pager \\ "<vfolder-from-query>"
    193 # dirty hack to ensure that vfolder-from-query is read-only
    194 # at the bottom of the file beacuse it has to be executed first
    195 folder-hook . "set read_only=no"
    196 folder-hook (^notmuch) "set read_only=yes"
    197 
    198 set abort_noattach = ask-yes
    199 set abort_noattach_regex = "^([^>].*)?\\<(attach(|ed|ments?)|(attaché|attachés|attache|attachons|joint|jointe|joints|jointes|joins|joignons))\\>"
    200 
    201 # == Remailback ==
    202 source ~/.mutt/remailback
    203 
    204 #set autocrypt
    205 
    206 set smime_verify_command=""
    207 set smime_verify_opaque_command=""
    208 set smime_decrypt_command=""