You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
6.2 KiB

# vim: filetype=neomuttrc
5 years ago
#source "~/.config/mutt/accounts/protonmail"
set header_cache = ~/.cache/mutt
# This file should include
# imap_user, imap_pass, realname and from
source ~/.config/mutt/work-email.secret
# Using davmail to interface with exchange
set folder = "imap://127.0.0.1:1143/"
set spoolfile = +INBOX
mailboxes = +INBOX
set use_from = yes
# Davmail again
set smtp_url="smtp://$imap_user:$imap_pass@127.0.0.1:1025"
# This communication is only between mutt and davmail (all on local computer) so ssl is not necesary
# SSL / TLS is used between davmail and exchange server
set ssl_force_tls = no
set ssl_starttls = no
set sort = threads
set sort_aux = reverse-last-date-received
set date_format="%y/%m/%d %I:%M%p"
set forward_format = "Fwd: %s" # format of subject when forwarding
set forward_quote = yes # include message in forwards
set include = yes # include message in replies
# Use nvim but don't force text width (looks terible if read on a phone)
set editor = "nvim +':set textwidth=0'"
set new_mail_command = "notify-send 'New Email'"
#set sendmail = "/home/jonathan/.bin/emails/send-from-mutt"
# Puts email headers in Vim
set edit_headers=yes
# Go straight to vim when writing an email
# Means that we will not be prompted for to / subject before opening email
set autoedit=yes
# Don't show + on wrapped lines
set markers=no
# Wrap lines at 78 chars
set wrap=78
# Makes escape key cancel inputs. Normally it's ctrl+G (weird)
set abort_key = "<Esc>"
set mailcap_path = "~/.config/mutt/mailcap"
auto_view text/html
auto_view application/pgp-encrypted
alternative_order text/plain text/enriched text/html
macro attach 'V' "<pipe-entry>pipebrowser<enter>"
macro pager U "<enter-command>set pipe_decode = yes<enter><pipe-message>urlscan -dc -r 'linkhandler {}'<enter><enter-command>set pipe_decode = no<enter>" "view URLs"
# Macro to toggle alternates (plain <-> html), based on:
# https://groups.google.com/d/msg/comp.mail.mutt/9I702oMwQQE/JqdLnp3j9WAJ
macro pager ,@aoh= "<enter-command>unalternative_order *; alternative_order text/html text/plain text/enriched; macro pager A ,@aot= 'toggle alternative order'<enter><exit><display-message>"
macro pager ,@aot= "<enter-command>unalternative_order *; alternative_order text/plain text/enriched text/html; macro pager A ,@aoh= 'toggle alternative order'<enter><exit><display-message>"
macro pager A ,@aoh= "toggle alternative order"
#Make R fetch imap emails
bind index R imap-fetch-mail
# Vim like jumping to start and end
bind index,pager g noop
bind index G last-entry
bind index gg first-entry
bind pager G bottom
bind pager gg top
bind pager j next-line
bind pager k previous-line
bind index r group-reply
bind pager r reply
bind pager R group-reply
# Use contact lookup funnction for contacts
set query_command = "/home/jonathan/Contacts/lookup | grep '%s'"
# Formatting
# Default index colors:
color index yellow default '.*'
color index_author red default '.*'
color index_number blue default
color index_subject cyan default '.*'
# New mail is boldened:
color index brightyellow black "~N"
color index_author brightred black "~N"
color index_subject brightcyan black "~N"
# Other colors and aesthetic settings:
mono bold bold
mono underline underline
mono indicator reverse
mono error bold
color normal default default
color indicator brightblack white
color sidebar_highlight red default
color sidebar_divider brightblack black
color sidebar_flagged red black
color sidebar_new green black
color normal brightyellow default
color error red default
color tilde black default
color message cyan default
color markers red white
color attachment white default
color search brightmagenta default
color status brightyellow black
color hdrdefault brightgreen default
color quoted green default
color quoted1 blue default
color quoted2 cyan default
color quoted3 yellow default
color quoted4 red default
color quoted5 brightred default
color signature brightgreen default
color bold black default
color underline black default
color normal default default
# Regex highlighting:
color header blue default ".*"
color header brightmagenta default "^(From)"
color header brightcyan default "^(Subject)"
color header brightwhite default "^(CC|BCC)"
color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
color body green default "\`[^\`]*\`" # Green text between ` and `
color body brightblue default "^# \.*" # Headings as bold blue
color body brightcyan default "^## \.*" # Subheadings as bold cyan
color body brightgreen default "^### \.*" # Subsubheadings as bold green
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
color body brightcyan default "[;:][-o][)/(|]" # emoticons
color body brightcyan default "[;:][)(|]" # emoticons
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
color body red default "(BAD signature)"
color body cyan default "(Good signature)"
color body brightblack default "^gpg: Good signature .*"
color body brightyellow default "^gpg: "
color body brightyellow red "^gpg: BAD signature from.*"
mono body bold "^gpg: Good signature"
mono body bold "^gpg: BAD signature from.*"
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"