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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
# .neomuttrc
set config_charset = "utf-8"
set send_charset = "utf-8"
set charset = "utf-8"
set assumed_charset = "utf-8"
set attach_charset = "utf-8"
set rfc2047_parameters = yes
set header_cache = ~/neomutt/cache/headers
set certificate_file = ~/neomutt/certificates
set message_cachedir = ~/neomutt/cache/bodies
set alias_file = ~/neomutt/aliases
set mailcap_path = ~/neomutt/mailcap
set tmpdir = /tmp
# mail settings
set mail_check = 30
set timeout = 600 # time to wait until abort waiting for input.
set mail_check_stats # periodically calculate message statistics
set xterm_set_titles = yes
set sleep_time = 0 # Don't pause
# mailcap
auto_view text/html text/plain
# Sidebar
set sidebar_visible = yes
set sidebar_short_path # Shorten mailbox names
set sidebar_delim_chars = "/." # Delete everything up to the last / character
set sidebar_folder_indent = yes # Indent folders whose names we've shortened
set sidebar_indent_string = "▸"
set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S"
set sidebar_width = 30
set sidebar_sort_method = "unsorted"
set sidebar_divider_char ="│"
# Folder hooks
folder-hook . `rm -f /neomutt/tmp/*` # empty tmp folder
folder-hook "~/.mail/philip/*" "source ~/neomutt/accounts/philip.rc"
# Printing
set print = ask-no
set print_command = "~/neomutt/bin/print_unicode.sh"
# index display
set sort = threads
set sort_aux = last-date-received
set delete = yes # just delete don't ask
# pager display
set pager = "builtin"
set smart_wrap = yes # lines wrapped at word boundary at screen edge.
set markers = no # don't add "+" at wrapped lines
set pager_stop = yes # don't continue to next message
set display_filter = "~/neomutt/bin/display_filter.sh"
# message display
ignore *
unhdr_order *
unignore Date: From: To: Cc: Bcc: X-Mailer: User-Agent: X-Spam-Flag: Subject:
hdr_order Date: From: To: Cc: Bcc: X-Mailer: User-Agent: X-Spam-Flag: Subject:
set quote_regex = "^([ \t]*[|>:}#])+"
set smileys = "(>From )|(:[-^]?[][)(><}{|/DP])" # catch some common false positives of $quote_regex
set pipe_decode = "yes" # weed headers and attempt to decode the messages first.
# attachments
attachments +A */.* # Give all MIME parts an "attachment" disposition
set attach_save_dir = "~/Documents"
set attach_save_without_prompting
set abort_noattach = ask-yes
# French & English regex
set abort_noattach_regex = "\\<(attach|attached|attaché|attachés|attache|attachons|joint|jointe|joints|jointes|joins|joignons)\\>"
# editor
set text_flowed = yes # don't cut lines
#set editor = "~/.neomutt/bin/mutt-trim %s; joe -nobackups %s"
set editor = "~/neomutt/bin/mutt-trim %s; micro %s"
# Replies
set attribution = "* %n <%a> [%(%y%m%d %H:%M)]:"
set fast_reply # do not ask for to, subject,... when replying.
set include = yes # include message
# Forwards
set forward_format = "[Tr: %s]"
set forward_quote
# Abook
set query_command = "abook --mutt-query '%s'"
macro index,pager a "<pipe-message>abook --add-email-quiet<return>" "Add this sender to Abook"
macro generic,index,pager \ca "<shell-escape>abook<return>" "launch abook"
# Header Compression
set header_cache_compress_method = "zlib"
set header_cache_compress_level = 1
# PGP commands
set pgp_decode_command = "gpg2 %?p?--passphrase- 0? --no-verbose --batch --output - %f"
set pgp_verify_command = "gpg2 --no-verbose --batch --output - --verify %s %f"
set pgp_decrypt_command = "gpg2 --passphrase- 0 --no-verbose --batch --output - %f"
set pgp_sign_command = "gpg2 --no-verbose --batch --output - --passphrase- 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command = "gpg2 --no-verbose --batch --output - --passphrase- 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command = "/usr/lib/neomutt/pgpewrap gpg2 --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to $pgp_sign_as -- -r %r -- %f"
set pgp_encrypt_sign_command = "/usr/lib/neomutt/pgpewrap gpg2 --passphrase- 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to $pgp_sign_as -- -r %r -- %f"
set pgp_import_command = "gpg2 --no-verbose --import %f"
set pgp_export_command = "gpg2 --no-verbose --export --armor %r"
set pgp_verify_key_command = "gpg2 --no-verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command = "gpg2 --no-verbose --batch --with-colons --list-keys %r"
set pgp_list_secring_command = "gpg2 --no-verbose --batch --with-colons --list-secret-keys %r"
# other settings
#unset quit
# Spam flag
# spam "X-Spam-Flag: YES" ""
# This pushes spam lines to right and it's ugly
# so instead I colour the line that contains X-Spam-Flag using
# color index color197 color233 ~hX-Spam-Flag
# in the colour theme
# add my_hdr $mutt_version - $os_version
my_hdr User-Agent: `neomutt -v | head -1` - `uname -r` Linux
# file browser
set sort_browser=reverse-date
#### Key bindings
# sidebar
bind index,pager <C-up> sidebar-prev # Previous Mailbox
bind index,pager <C-down> sidebar-next # Next Mailbox
bind index,pager * sidebar-open # Open Highlighted Mailbox
#
bind pager <down> next-line # pager down one line
bind pager <up> previous-line # pager up one line
bind editor <Tab> complete-query # Abook completion
#### Macros
# account swap
unset wait_key #don't wait for user input
macro index,pager <F2> "<sync-mailbox><enter-command>source ~/neomutt/accounts/philip.rc<enter><change-folder>!<enter><redraw-screen>"
# toggle sidebar
macro index,pager <F5> "<enter-command>toggle sidebar_visible <enter><redraw-screen>"
# F6 in index runs mbsync, see philip.rc
macro pager <F6> "<pipe-message>~/neomutt/bin/translate.sh<enter>"
# urlscan
macro index,pager \cb "<pipe-message>urlscan -c -d<Enter>" "call urlscan to extract URLs out of a message"
macro attach,compose \cb "<pipe-entry>urlscan -c -d<Enter>" "call urlscan to extract URLs out of a message"
# reload config
macro index,browser,pager \cr "<enter-command>source ~/neomutt/.neomuttrc<enter>"
# View in graphic browser
macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/neomutt/tmp/mail.html<enter><shell-escape>floorp ~/.neomutt/tmp/mail.html<enter>"
# SPAM
# Mark as not spam and move mail to inbox
macro index,pager n "<tag-prefix><pipe-entry>bogofilter -Mn<enter>\
<tag-prefix><save-message>=Inbox<enter><enter><sync-mailbox>" "Mark as non spam & move to Inbox"
# Mark as not spam and do nothing else
macro index . "<tag-prefix><pipe-entry>bogofilter -Mn<enter>" "Mark as not spam in index"
macro pager . "<pipe-entry>bogofilter -Mn<enter>" "Mark as not spam in pager"
# Mark as spam and delete
macro index x "<tag-prefix><pipe-entry>bogofilter -MNs<enter><tag-prefix><save-message>=Junk<enter><enter><sync-mailbox>"
macro pager x "<pipe-entry>bogofilter -MNs<enter><save-message>=Junk<enter><enter><sync-mailbox>"
#### more config files
source ~/neomutt/accounts/philip.rc # default account
source ~/neomutt/themes/venelles.rc # my color theme
|