1 ###############################################################################
2 # mutt rc - xhr () giessen . ccc . de
4 # This file is a collection from various muttrc samples files. Credits belong
5 # to the original authors ;)
6 ###############################################################################
8 ###############################################################################
10 ###############################################################################
12 set folder = ~/.mail/posteo-isync # mailbox location
13 set alias_file = ~/.mutt/alias # where to store aliases
14 set header_cache = ~/.mutt/cache/headers # where to store headers
15 set message_cachedir = ~/.mutt/cache/bodies # where to store bodies
16 set certificate_file = ~/.mutt/certificates # where to store certs
17 set mailcap_path = ~/.mutt/mailcap # entries for filetypes
18 set tmpdir = ~/.mutt/temp # where to keep temp files
20 ###############################################################################
22 ###############################################################################
25 source ~/.mutt/smime.rc
28 source /usr/local/share/examples/mutt/gpg.rc
36 # SMTP server settings
37 source ~/.mutt/smtp.rc
40 source ~/.mutt/imap.rc
43 source ~/.mutt/mailbox.rc
45 ###############################################################################
47 ###############################################################################
49 # GPG passphrase timeout
53 set pgp_use_gpg_agent = yes
55 # Always encrypt GPG MINE and not inline
58 # Reply to GPG msgs inline
61 # Automatically send GPG as MIME if inline fails
64 # Do not Automatically encrypt messages with GPG
65 set pgp_autoencrypt = no
67 #set pgp_encrypt_only_command
68 #set pgp_encrypt_sign_command
72 ###############################################################################
74 ###############################################################################
76 charset-hook us-ascii ISO-8859-15
77 set send_charset="us-ascii:iso-8859-15:utf-8"
79 charset-hook x-unknown ISO-8859-1
81 alternative_order application/pgp text/plain text/html text/enriched
83 ###############################################################################
85 ###############################################################################
87 macro pager "\e1" "<enter-command>set pager_index_lines=1<enter>" # Change PIL size
88 macro pager "\e2" "<enter-command>set pager_index_lines=2<enter>" # Change PIL size
89 macro pager "\e3" "<enter-command>set pager_index_lines=3<enter>" # Change PIL size
90 macro pager "\e4" "<enter-command>set pager_index_lines=4<enter>" # Change PIL size
91 macro pager "\e5" "<enter-command>set pager_index_lines=5<enter>" # Change PIL size
92 macro pager "\e6" "<enter-command>set pager_index_lines=6<enter>" # Change PIL size
93 macro pager "\e7" "<enter-command>set pager_index_lines=7<enter>" # Change PIL size
94 macro pager "\e8" "<enter-command>set pager_index_lines=8<enter>" # Change PIL size
95 macro pager "\e9" "<enter-command>set pager_index_lines=9<enter>" # Change PIL size
96 macro pager "\e0" "<enter-command>set pager_index_lines=0<enter>" # Change PIL size
98 # save a decoded copy in ~/Desktop/
99 macro index P "<pipe-message>cat > ~/Desktop/" "save message as"
101 macro index B "<limit>~b " "search message bodies"
102 macro index I "<change-folder>!<enter>" "go to Inbox"
105 macro index,pager y <change-folder>?<toggle-mailboxes>
107 bind index,pager B background-compose-menu
109 # Unmap arrow keys in index and pager
111 bind index <down> noop
112 bind index <right> noop
113 bind index <left> noop
115 bind pager <down> noop
116 bind pager <right> noop
117 bind pager <left> noop
120 bind index $ sync-mailbox
123 macro index O "<shell-escape>sync && mbsync -qa && sync&<enter>" "run mbsync to sync all mail"
126 bind index <space> collapse-thread
128 # Recall postponed messages when pressing p in index mode
129 bind index p recall-message
131 # Bind a key to limit: all
132 macro index a "<limit>all\n" "show all messages (undo limit)"
134 # Go to the previous match when searching for stuf
135 bind index N search-opposite
136 bind pager N search-opposite
138 # Compose e-mail to sender
139 bind index,pager @ compose-to-sender
141 # Save messages/attachments to the following directory
142 macro attach s <save-message><bol>~/
144 color body brightmagenta default "^\\[---\=[|].*"
147 macro index "\eg" "!$HOME/bin/grepm -q -m -R -h -Y 'X-Status:' 'F' $HOME/mail/" "Run grepm search"
148 macro index "\eG" "<change-folder-readonly>=grepm-search\n" "Switch to grepm search results"
151 macro index,pager "\es" "<change-folder-readonly>/home/xhr/.mail/Search<enter><shell-escape>mairix " "search via mairix"
153 # In compose mode, select one of my From: lines (see .alias)
154 macro compose v "<edit-from>^Uidentity_<Tab>" "Select from"
156 # use <tab> to complete email addresses instead of Ctrl-t add this:
157 #bind editor <Tab> complete-query
159 # Mark all new messages as read
160 macro index \en "<tag-pattern>~N<enter><tag-prefix><clear-flag>N<clear-flag>*" "Catchup all new messages"
161 # Mark all duplicates first and delete them afterwards
162 macro index \ed "<tag-pattern>~=<enter>d" "Delete duplicate messages"
164 # Define extra keys (useless with crippled terminals and OSX)
165 bind browser Home first-entry
166 bind browser End last-entry
167 bind generic End last-entry
168 bind pager End bottom
172 bind index G last-entry
173 bind browser G last-entry
175 # Open mailbox with next unread mail
176 bind index \eo next-unread-mailbox
178 bind pager b previous-page
180 # Collapse ALL threads
181 #bind pager "*" collapse-all
182 bind index "*" collapse-all
184 # Esc-f: muttng forget the GnuPG-passphrase
185 bind index \ef forget-passphrase
186 bind pager \ef forget-passphrase
189 macro pager \e1 '!open /usr/local/share/doc/mutt/manual.html' 'Call Manual'
190 macro index \e1 '!open /usr/local/share/doc/mutt/manual.html' 'Call Manual'
192 # Reload the muttng rc
193 macro index <f5> ":source ~/.muttrc" "Reload the muttrc"
194 macro pager <f5> ":source ~/.muttrc\n" "Reload the muttrc"
195 macro browser <f5> ":source ~/.muttrc\n" "Reload the muttrc"
197 # Esc-a show only NEW messages in the folder/newsgroup
198 #macro index \en "l~N\n" 'Show NEW messages'
200 # Press p instead of y to postpone message
201 #bind compose p postpone-message
203 macro index \Co sort-mailbox
206 macro index \Cn ":set pipe_decode\n|urlview\n:unset pipe_decode\n" \
207 "call urlview to extract URLs out of a message"
209 macro pager \Cn ":set pipe_decode\n|urlview\n:unset pipe_decode\n" \
210 "call urlview to extract URLs out of a message"
212 ###############################################################################
214 ###############################################################################
216 # When unset, Mutt will notify you if any new mail exists
217 # in the mailbox, regardless of whether you have visited it recently.
218 unset mail_check_recent
220 # Fix b0rken AW:AW:AW:Re lines automatically
221 set reply_regexp="^((re([\[^-][0-9]+\]?)*|aw|AW|Aw|antwort|antw|wg|Re|RE):[ \t]*)+"
223 # Reply with the email address in the From: line (NOTE: overwritten by a my_hdr line)
225 # If unset, always set the real name in From: field to $realname
226 unset reverse_realname
228 set connect_timeout=30 # Causes Mutt to timeout a network connection (for IMAP
229 # or POP) after this many seconds if the connection
230 # is not able to be established.
231 set timeout=3 # mutt 'presses' (like) a key for you (while you're idle)
232 # each x sec to trigger the thing below
233 set mail_check=0 # This variable configures how often (in seconds) mutt
234 # should look for new mail.
236 #set dotlock_program = "/usr/local/bin/mutt_dotlock"
238 # If set, all operations (eg delete) apply to all tagged messages
244 # Set aspell to new german
245 set ispell = "/usr/bin/aspell -d de -e -c"
246 #set ispell = "/usr/local/bin/ispell -d ndeutsch"
248 # Dont sleep during folder changes
251 # Make trees narrower
254 # When viewing next page of info, retain last line of previous page
255 set pager_context = 1
257 # ask before quitting
260 # mail's stay on "New" status
263 # don't go to the next message after paging thru the current
266 # I don't want to mark wrapped lines with +'es.
269 # I want to wrap by words, not by a character at the screen edge
272 # Maximum line length, no matter how big the terminal width is
273 #set max_line_length = 80
276 set smileys="(>From )|(>?[;:][-^]?[][)(><}{|/DP][)}]*)"
278 # Set envelope sender after From:
279 set use_envelope_from
281 # Speed up opening mail boxes for read
288 set pager_index_lines=15
290 # Dont wait for sendmail finish mail delivery
291 set sendmail_wait="-1"
293 # If an external pager is closed, muttng goes right away in the index.
296 # External shell for |, !, ...
299 # A regular expression used in the internal-pager to determine quoted
300 # sections of text in the mailbody.
301 set quote_regexp="^( {0,4}[>|:%]| {0,4}[a-z0-9]+[>|]+)+"
305 # Locale for date settings
306 set abort_nosubject=no
307 set abort_unmodified=no
313 set attribution="* %n wrote:"
315 # Skip the initial send menu
325 # Save a copy from all outgoing mails in record
328 # Really delete mails marked for deletion
331 # Edit headers in VIM
334 # My favourite editor
335 set editor='/usr/local/share/examples/mutt/bgedit-screen-tmux.sh vim'
338 set background_edit=yes
340 # dont ask for to, cc, ...
343 # no need to reply to myself, is there?
349 # I want to know when mail ends
352 # Include msg when replying
355 # Indent quotes wit this String
356 set indent_string="> "
358 set status_chars = "UCRA"# *%A"
361 set status_format = "─── [ %f (%r) ] ─── [ Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l? ] ─── [ %s ] ───%>─%?p?( %p postponed )?───"
362 set date_format = "[%d/%m/%y] [%I:%M%P]"
363 set alias_format = "%4n %t %r"
364 set folder_format = "%2C [%N] %-60.60f %-8.8u %d %s"
365 set compose_format="─── Compose [ Approx. msg size: %l Atts: %a ] %>───"
366 set pager_format="───[ %C/%m ] [ %-20.20n ] %s %>───(%P)───"
368 #set index_format="%4.4C [%Z] [%[!%d.%m.%y %H:%M]] %-28.28F [%4.4c] │ %s"
369 set index_format="%4.4C [%Z] [%14@date@] %-24.24F [%4.4c] │ %s"
371 # Adaptive date formatting
372 index-format-hook date "~d<1d" "%[today %H:%M]"
373 index-format-hook date "~d<1w" "%[%a %H:%M]"
374 index-format-hook date "~A" "%[%d.%m.%y %H:%M]"
377 set mime_forward=ask-no
379 # Do not ask to move read messages to mbox folder
382 # Remove my email address if I do a group reply
388 # Set the User-Agent-Header.
391 # Do not wait for a keypress, if I use a commando like "pipe-message".
394 # Use an -> (set) or a BAR (unset)
401 set sort_browser = alpha
403 # Save attachments when sending
409 ###############################################################################
411 ###############################################################################
413 # Complain about missing attachment
414 set abort_noattach = ask-yes
415 set abort_noattach_regexp = "\\<(attach|attachment|anbei|anhängen|angehängt|anhang|anhänge|hängt an)\\>"
417 # Set my print command
418 #set print_command="muttprint"
419 set print_command="a2ps -1 -q -o ~/mail/printmail.ps --portrait --columns=1 --pretty-print=mail --highlight-level=heavy && open ~/mail/printmail.ps"
421 # Do not ask for confirmation
424 # Pass all headers to muttprint. DO NOT enable this if you do not use muttprint!
425 #macro index p "<display-toggle-weed> <print-message> <display-toggle-weed> <exit>"
426 #macro pager p "<display-toggle-weed> <print-message> <display-toggle-weed>"
428 # If printing multiple mails at once, print them piece by pice
432 set mbox_type = Maildir
434 # Auto view the following types
436 auto_view application/zip
437 auto_view application/x-gzip
438 auto_view application/x-gunzip
439 auto_view application/pgp-signature
440 auto_view application/pgp
441 auto_view application/octet-stream
442 auto_view application/x-zip-compressed
443 auto_view application/x-arj-compressed
444 auto_view application/x-tar-gz
445 auto_view application/x-sh
446 auto_view text/x-vcard
447 auto_view text/x-diff
450 # I want to see the following headers
452 hdr_order Old-Return-Path date x-mailer x-editor x-agent user-agent mailer from to cc subject
453 unignore date from: to cc subject x-mailer x-editor x-agent user-agent mailer Old-Return-Path
455 # Handle GPG inline messages
456 message-hook '!~g !~G ~b "^-----BEGIN PGP (SIGNED )?MESSAGE"' 'exec check-traditional-pgp