myconfig

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

muttrc (5749B)


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