dotfiles

Mahdi's dotfiles
git clone git://mahdi.pw/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

muttrc (8078B)


      1 # Multiple accounts
      2 macro index,pager <f1> '<sync-mailbox><enter-command>source ~/.config/mutt/muttrc<enter><change-folder>!<enter>'
      3 macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.config/mutt/personal<enter><change-folder>!<enter>'
      4 macro index,pager <f3> '<sync-mailbox><enter-command>source ~/.config/mutt/work<enter><change-folder>!<enter>'
      5 
      6 # Personal Details
      7 set realname="Mahdi Mirzade"
      8 set from="[email protected]"
      9 set signature="~/.config/mutt/signature"
     10 set use_from=yes
     11 set use_envelope_from=yes
     12 set reverse_name=yes
     13 
     14 # Mail Server
     15 set mbox_type=Maildir
     16 set ssl_force_tls = yes
     17 
     18 # Syntax: imaps://user@domain@imap_domain:port
     19 #set folder="imaps://[email protected]@mail.mahdi.pw:993"
     20 #set imap_pass = `pash s email`
     21 set folder="~/.local/share/mail/acct0"
     22 
     23 # Syntax: smtps://user@domain@smtp_domain:port
     24 set smtp_url = "smtps://[email protected]@mail.mahdi.pw:465"
     25 set smtp_pass = `pash s email`
     26 
     27 # Mailboxes
     28 set spoolfile="+Inbox"
     29 set postponed="+Drafts"
     30 set record="+Sent"
     31 set trash="+Trash"
     32 mailboxes "+-- $realname -----------"
     33 mailboxes =Inbox =Drafts =Sent =Junk =Trash
     34 
     35 # Settings
     36 set mailcap_path="~/.config/mutt/mailcap"
     37 macro attach s <save-entry><bol>~/Downloads/<eol>
     38 macro index V "!email -sn^M" "Update through mbsync"
     39 set date_format="%y/%m/%d %I:%M%p"
     40 set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)"
     41 set sort = 'reverse-date'
     42 set help = no           # Disable help bar
     43 set sleep_time = 0      # Pause 0 seconds for informational messages
     44 set markers = no        # Disables the `+` displayed at line wraps
     45 set mark_old = no       # Unread mail stay unread until read
     46 set mime_forward = yes  # attachments are forwarded with mail
     47 set wait_key = no       # mutt won't ask "press key to continue"
     48 set fast_reply          # skip to compose when replying
     49 set fcc_attach          # save attachments with the body
     50 set forward_format = "Fwd: %s"  # format of subject when forwarding
     51 set forward_quote       # include message in forwards
     52 set reverse_name        # reply as whomever it was to
     53 set include             # include message in replies
     54 auto_view text/html     # automatically show html (mailcap uses lynx)
     55 auto_view application/pgp-encrypted
     56 alternative_order text/plain text/enriched text/html
     57 
     58 bind index,pager i noop
     59 bind index,pager g noop
     60 bind index \Cf noop
     61 bind index,pager M noop
     62 bind index,pager C noop
     63 
     64 # Bindings
     65 bind index gg first-entry
     66 bind index j next-entry
     67 bind index k previous-entry
     68 bind attach <return> view-mailcap
     69 bind attach l view-mailcap
     70 bind editor <space> noop
     71 bind index G last-entry
     72 bind index gg first-entry
     73 bind pager,attach h exit
     74 bind pager j next-line
     75 bind pager k previous-line
     76 bind pager l view-attachments
     77 bind index D delete-message
     78 bind index U undelete-message
     79 bind index L limit
     80 bind index h noop
     81 bind index l display-message
     82 bind index,query <space> tag-entry
     83 #bind browser h goto-parent
     84 macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder"
     85 bind browser l select-entry
     86 bind index,pager,browser d half-down
     87 bind index,pager,browser u half-up
     88 bind index,pager S sync-mailbox
     89 bind index,pager R group-reply
     90 bind index \031 previous-undeleted # Mouse wheel
     91 bind index \005 next-undeleted     # Mouse wheel
     92 bind pager \031 previous-line      # Mouse wheel
     93 bind pager \005 next-line      # Mouse wheel
     94 bind editor <Tab> complete-query
     95 
     96 macro index,pager gi "<change-folder>=Inbox<enter>" "go to inbox"
     97 macro index,pager Mi ";<save-message>=Inbox<enter>" "move mail to inbox"
     98 macro index,pager Ci ";<copy-message>=Inbox<enter>" "copy mail to inbox"
     99 macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts"
    100 macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts"
    101 macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts"
    102 macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
    103 macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent"
    104 macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent"
    105 macro index,pager gt "<change-folder>=Trash<enter>" "go to trash"
    106 macro index,pager Mt ";<save-message>=Trash<enter>" "move mail to trash"
    107 macro index,pager Ct ";<copy-message>=Trash<enter>" "copy mail to trash"
    108 macro index,pager gj "<change-folder>=Junk<enter>" "go to junk"
    109 macro index,pager Mj ";<save-message>=Junk<enter>" "move mail to junk"
    110 macro index,pager Cj ";<copy-message>=Junk<enter>" "copy mail to junk"
    111 
    112 macro index O "<shell-escape>sync-mail<enter>" "run sync-mail to sync all mails"
    113 
    114 # Sidebar mappings
    115 set mail_check_stats
    116 set sidebar_visible = yes
    117 set sidebar_width = 23
    118 set sidebar_short_path = yes
    119 set sidebar_next_new_wrap = yes
    120 set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%?S?%S?'
    121 set sidebar_divider_char = ' │ '
    122 bind index,pager \Ck sidebar-prev
    123 bind index,pager \Cj sidebar-next
    124 bind index,pager \Co sidebar-open
    125 bind index,pager \Cp sidebar-prev-new
    126 bind index,pager \Cn sidebar-next-new
    127 bind index,pager B sidebar-toggle-visible
    128 
    129 set fcc_clear=yes
    130 
    131 set pgp_use_gpg_agent = yes
    132 set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f"
    133 set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f"
    134 set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f"
    135 set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
    136 set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
    137 set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0x2C2Cd561 -- -r %r -- %f"
    138 set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0x2C2Cd561 -- -r %r -- %f"
    139 set pgp_import_command="gpg --no-verbose --import -v %f"
    140 set pgp_export_command="gpg --no-verbose --export --armor %r"
    141 set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"
    142 set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r" 
    143 set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r" 
    144 
    145 set pgp_autosign     = no
    146 set pgp_good_sign    = "^gpg: Good signature from"
    147 set pgp_default_key  = "[email protected]"
    148 #set pgp_sign_as      = "[email protected]"
    149 set pgp_self_encrypt = yes
    150 set pgp_replyencrypt = yes
    151 set pgp_timeout      = 3600
    152 
    153 # Colors
    154 color normal brightblue default
    155 color indicator black brightblue
    156 color tree brightred default
    157 color status brightgreen black
    158 
    159 mono bold bold 
    160 
    161 # Index
    162 color index brightmagenta default "~U" # Unread messages
    163 color index	brightyellow default ~N     # New messages
    164 color index brightblue default "~R"    # Read messages
    165 color index	blue default ~Q            # Replied messages
    166 
    167 # URL
    168 color body brightgreen default "[a-zA-Z]+://[^ \"\t\r\n]*"
    169 color body brightgreen default "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
    170 color body brightgreen default "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
    171 mono body bold "[a-zA-Z]+://[^ \"\t\r\n]*"
    172 mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
    173 mono body bold "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
    174 
    175 # Header
    176 color hdrdefault blue default
    177 color header white default "^(From)"
    178 color header yellow default "^(Subject)"
    179 color header brightgreen default "^(User-*)"
    180 color header red default "^(Envelope-To)"
    181 color header red default "^(To)"
    182 color header white default "^(Return-Path)"
    183 color header brightmagenta default "^(Date)"
    184 
    185 # PGP
    186 color body red default "(BAD signature)"
    187 color body cyan default "(Good signature)"
    188 color body brightblack default "^gpg: Good signature .*"
    189 color body brightyellow default "^gpg: "
    190 color body brightyellow red "^gpg: BAD signature from.*"
    191 mono body bold "^gpg: Good signature"
    192 mono body bold "^gpg: BAD signature from.*"
    193 
    194 # Quoted text
    195 color quoted cyan default
    196 color quoted1 yellow black
    197 color quoted2 red black
    198 color quoted3 green black
    199 color quoted4 cyan black
    200 color quoted5 yellow black
    201 color quoted6 red black
    202 color quoted7 green black