aboutsummaryrefslogtreecommitdiff
path: root/.config/mutt/muttrc
blob: 90b457c782353b65dadfa7e82118e31503609514 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# vi: ft=muttrc
set my_mutt_folder = "$XDG_CONFIG_HOME/mutt"

# Tells Mutt to automatically view files with these mime types
auto_view text/html
# Order to try and show multipart emails
alternative_order text/plain text/enriched text/html

bind index \CR imap-fetch-mail
bind index,pager R group-reply
bind index,pager \CK sidebar-prev
bind index,pager \CJ sidebar-next
bind index,pager \CL sidebar-open
bind index,pager B sidebar-toggle-visible

# settings
set editor="$EDITOR '+set ft=mail'"
set mailcap_path                = "$my_mutt_folder/mailcap" # Mailcap file is used to tell mutt how to open different types of file
set pager_index_lines           = 10
set implicit_auto_view          = yes
set use_from                    = yes
set pager_context               = 3                  # show 3 lines of context
set menu_context                = 5                  # start scrolling 5 items before the end
set move                        = no                 # don't move messages when marking as read
set mail_check                  = 30                 # check for new mail every 30 seconds
set imap_keepalive              = 900                # 15 minutes
set sleep_time                  = 0                  # don't sleep when idle
set wait_key                    = no                 # mutt won't ask "press key to continue"
set forward_format              = "Fwd: %s"          # format of subject when forwarding
set attribution                 = "On %d, %n wrote:" # format of quoting header
set text_flowed                 = yes                # correct indentation for plain text
set crypt_autosign              = yes
set crypt_replysign             = yes
set crypt_replyencrypt          = yes
set crypt_replysignencrypted    = yes
set crypt_opportunistic_encrypt = no
set crypt_use_gpgme             = yes
set crypt_verify_sig            = yes
set pgp_use_gpg_agent           = yes
set tmpdir                      = "$XDG_CACHE_DIR/mutt/tmpdir"
set header_cache                = "$XDG_CACHE_DIR/mutt/header_cache"
set message_cachedir            = "$XDG_CACHE_DIR/mutt/message_cachedir"
set charset                     = "utf-8"
set sort                        = reverse-threads
set sort_aux                    = last-date-received
set reply_regexp                = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
set quote_regexp                = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
set send_charset                = "utf-8:iso-8859-1:us-ascii" # send in utf-8
set assumed_charset             = "iso-8859-1"                # if there is no character set given on incoming messages, it is probably windows
# set sidebar_width               = 12
set sidebar_format              = "%B%?F? [%F]?%* %?N?%N/?%S"
set sidebar_visible
set sidebar_short_path
set sidebar_folder_indent
set tilde                       # use ~ to pad mutt
set pager_stop                  # stop at end of message
set menu_scroll                 # scroll menu
set envelope_from               # which from?
set edit_headers                # show headers when composing
set fast_reply                  # skip to compose when replying
set askcc                       # ask for CC:
set fcc_attach                  # save attachments with the body
set forward_decode              # decode when forwarding
set forward_quote               # include message in forwards
set mime_forward                # forward attachments as part of body
set reply_to                    # reply to Reply to: field
set reverse_name                # reply as whomever it was to
set include                     # include message in replies
set uncollapse_jump
set sort_re                     # Sort by newest conversation first.
set mail_check_stats
unset sig_dashes                # no dashes before sig
unset markers 
unset imap_passive              # Allow Mutt to open a new IMAP connection automatically.

set spoolfile = "+INBOX"
set record    = "+Sent"
set postponed = "+Drafts"
set trash     = "+Trash"

# show spam score (from SpamAssassin only) when reading a message
spam "X-Spam-Score: ([0-9\\.]+).*" "SA: %1"
set pager_format = " %C - %[%H:%M] %.20v, %s%* %?H? [%H] ?"
# https://unix.stackexchange.com/a/516101
set display_filter="exec sed -r \"s/^Date:\\s*(([F-Wa-u]{3},\\s*)?[[:digit:]]{1,2}\\s+[A-Sa-y]{3}\\s+[[:digit:]]{4}\\s+[[:digit:]]{1,2}:[[:digit:]]{1,2}(:[[:digit:]]{1,2})?\\s+[+-][[:digit:]]{4})/date +'Date: %a, %d %b %Y %H:%M:%S %z' -d '\\1'/e\""

# do not show all headers, just a few
ignore          *
unignore        From To Cc Bcc Date Subject X-Spam-Score
# and in this order
unhdr_order     *
hdr_order       From: To: Cc: Bcc: Date: Subject: X-Spam-Score:

source "$my_mutt_folder/mailboxes"
source "$my_mutt_folder/dracula.muttrc"
source "$my_mutt_folder/vim-keys.rc"

# Holds the account credentials
# Such as the following variables
#   folder
#   imap_user
#   imap_pass
#   smtp_pass
#   smtp_url
#   from
#   realname
source "$my_mutt_folder/account"