summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2015-07-19 16:47:31 +0200
committerTharre <tharre3@gmail.com>2016-10-07 20:13:35 +0000
commit8c7a495fc164f358daaf8688dd22ac63ccc31e7c (patch)
tree46051ed77b895da9a859c6b18babfd7462e81ab5
parent3198ee4d4c23f9b5303cd16babbe4830e71bb37e (diff)
downloaddotfiles-8c7a495fc164f358daaf8688dd22ac63ccc31e7c.tar.gz
dotfiles-8c7a495fc164f358daaf8688dd22ac63ccc31e7c.tar.xz
dotfiles-8c7a495fc164f358daaf8688dd22ac63ccc31e7c.zip
Add mutt configuration (unfinished)
-rw-r--r--email/_msmtprc12
-rw-r--r--email/_mutt/Equifax_Secure_CA.cert17
-rw-r--r--email/_mutt/colors.muttrc42
-rw-r--r--email/_mutt/muttrc139
-rw-r--r--email/_mutt/offlineimap.py5
-rw-r--r--email/_mutt/sig1
-rw-r--r--email/_mutt/temp/.gitignore4
-rw-r--r--email/_offlineimaprc43
-rwxr-xr-xinstall.sh6
9 files changed, 269 insertions, 0 deletions
diff --git a/email/_msmtprc b/email/_msmtprc
new file mode 100644
index 0000000..3887133
--- /dev/null
+++ b/email/_msmtprc
@@ -0,0 +1,12 @@
+account gmail
+host smtp.gmail.com
+port 587
+protocol smtp
+auth on
+from tharre3@gmail.com
+user tharre3@gmail.com
+passwordeval "pass email/tharre3@gmail.com"
+tls on
+tls_trust_file ~/.mutt/Equifax_Secure_CA.cert
+
+account default : gmail
diff --git a/email/_mutt/Equifax_Secure_CA.cert b/email/_mutt/Equifax_Secure_CA.cert
new file mode 100644
index 0000000..c3e1112
--- /dev/null
+++ b/email/_mutt/Equifax_Secure_CA.cert
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJVUzEQMA4GA1UE
+ChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5
+MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoT
+B0VxdWlmYXgxLTArBgNVBAsTJEVxdWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCB
+nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPR
+fM6fBeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+AcJkVV5MW
+8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kCAwEAAaOCAQkwggEFMHAG
+A1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UE
+CxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoG
+A1UdEAQTMBGBDzIwMTgwODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvS
+spXXR9gjIBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQFMAMB
+Af8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAFjOKer89961
+zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y7qj/WsjTVbJmcVfewCHrPSqnI0kB
+BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95
+70+sB3c4
+-----END CERTIFICATE----- \ No newline at end of file
diff --git a/email/_mutt/colors.muttrc b/email/_mutt/colors.muttrc
new file mode 100644
index 0000000..0baa91b
--- /dev/null
+++ b/email/_mutt/colors.muttrc
@@ -0,0 +1,42 @@
+# general-doesn't-fit stuff
+color normal color252 color233
+color error color193 color124
+color markers color142 color233
+color tilde color142 color233
+color status color172 color233
+
+# index stuff
+color tree color244 color233
+color indicator color255 color235
+color index color117 color233 ~N
+color index color124 color233 ~D
+
+# header stuff
+color hdrdefault color248 color233
+color header color226 color233 "^Subject"
+
+# url, email and web stuff
+color body color68 color233 "(finger|ftp|http|https|news|telnet)://[^ >]*"
+color body color111 color233 "<URL:[^ ]*>"
+color body color111 color233 "www\\.[-.a-z0-9]+\\.[a-z][a-z][a-z]?([-_./~a-z0-9]+)?"
+color body color111 color233 "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
+color body brightred color233 "^-.*"
+color body green color233 "^[+].*"
+color body brightwhite color233 "^diff .*"
+color body brightyellow color233 "^@@.*"
+
+# misc body stuff
+color attachment color111 color233
+color signature color244 color233
+
+# quote levels
+color quoted color34 color233
+color quoted1 color142 color233
+color quoted2 color34 color233
+color quoted3 color142 color233
+color quoted4 color34 color233
+color quoted5 color142 color233
+color quoted6 color34 color233
+color quoted7 color142 color233
+color quoted8 color34 color233
+color quoted9 color142 color233
diff --git a/email/_mutt/muttrc b/email/_mutt/muttrc
new file mode 100644
index 0000000..fad0886
--- /dev/null
+++ b/email/_mutt/muttrc
@@ -0,0 +1,139 @@
+# Paths ----------------------------------------------
+set folder = ~/.mail # mailbox location
+set alias_file = ~/.mutt/alias # where to store aliases
+set header_cache = ~/.mutt/cache/headers # where to store headers
+set message_cachedir = ~/.mutt/cache/bodies # where to store bodies
+set certificate_file = ~/.mutt/certificates # where to store certs
+set mailcap_path = ~/.mutt/mailcap # entries for filetypes
+set tmpdir = ~/.mutt/temp # where to keep temp files
+set signature = ~/.mutt/sig # my signature file
+
+# Basic Options --------------------------------------
+set wait_key = no # shut up, mutt
+set mbox_type = Maildir # mailbox type
+set timeout = 3 # idle time before scanning
+set mail_check = 0 # minimum time between scans
+unset move # gmail does that
+set delete # don't ask, just do
+unset confirmappend # don't ask, just do!
+set quit # don't ask, just do!!
+unset mark_old # read/new is good enough for me
+set beep_new # bell on new mails
+set pipe_decode # strip headers and eval mimes when piping
+set thorough_search # strip headers and eval mimes before searching
+
+# Sidebar Patch --------------------------------------
+set sidebar_delim = ' │'
+set sidebar_visible = yes
+set sidebar_width = 24
+color sidebar_new color221 color233
+
+# Status Bar -----------------------------------------
+set status_chars = " *%A"
+set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───"
+
+# Header Options -------------------------------------
+ignore * # ignore all headers
+unignore from: to: cc: date: subject: # show only these
+unhdr_order * # some distros order things by default
+hdr_order from: to: cc: date: subject: # and in this order
+
+# Account Settings -----------------------------------
+
+# Default inbox.
+set spoolfile = "+tharre3@gmail.com/INBOX"
+
+# Alternate email addresses.
+#alternates sjl@pculture.org still\.?life@gmail.com steve@ladyluckblues.com steve@pculture.org
+
+# Mailboxes to show in the sidebar.
+mailboxes +tharre3@gmail.com/INBOX \
+ +tharre3@gmail.com/archive \
+ +tharre3@gmail.com/sent \
+ +tharre3@gmail.com/drafts \
+
+# Other special folders.
+set mbox = "+tharre3@gmail.com/archive"
+set postponed = "+tharre3@gmail.com/drafts"
+
+# Index View Options ---------------------------------
+set date_format = "%m/%d"
+set index_format = "[%Z] %D %-20.20F %s"
+set sort = threads # like gmail
+set sort_aux = reverse-last-date-received # like gmail
+set uncollapse_jump # don't collapse on an unread message
+set sort_re # thread based on regex
+set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
+
+# Index Key Bindings ---------------------------------
+bind index gg first-entry
+bind index G last-entry
+
+bind index R group-reply
+bind index <tab> sync-mailbox
+bind index <space> collapse-thread
+
+# Ctrl-R to mark all as read
+macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
+
+# Sync email
+macro index O "<shell-escape>offlineimap<enter>" "run offlineimap to sync all mail"
+macro index o "<shell-escape>offlineimap -qf INBOX<enter>" "run offlineimap to sync inbox"
+
+# Saner copy/move dialogs
+macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
+macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
+
+# Sidebar Navigation ---------------------------------
+bind index,pager <down> sidebar-next
+bind index,pager <up> sidebar-prev
+bind index,pager <right> sidebar-open
+
+# Pager View Options ---------------------------------
+set pager_index_lines = 10 # number of index lines to show
+set pager_context = 3 # number of context lines to show
+set pager_stop # don't go to next message automatically
+set menu_scroll # scroll in menus
+set tilde # show tildes like in vim
+unset markers # no ugly plus signs
+
+set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
+alternative_order text/plain text/enriched text/html
+
+# Pager Key Bindings ---------------------------------
+bind pager k previous-line
+bind pager j next-line
+bind pager gg top
+bind pager G bottom
+
+bind pager R group-reply
+
+# View attachments properly.
+bind attach <return> view-mailcap
+
+# Compose View Options -------------------------------
+set realname = "Unkown" # who am i?
+set envelope_from # which from?
+set sig_dashes # dashes before sig
+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
+unset mime_forward # forward attachments as part of body
+set forward_format = "Fwd: %s" # format of subject when forwarding
+set forward_decode # decode when forwarding
+set attribution = "On %d, %n wrote:" # format of quoting header
+set reply_to # reply to Reply to: field
+set reverse_name # reply as whomever it was to
+set include # include message in replies
+set forward_quote # include message in forwards
+
+# vim FTW
+set editor='vim + -c "set textwidth=72 expandtab"'
+
+set from = "tharre3@gmail.com"
+set sendmail = "/usr/bin/msmtp -a gmail"
+set sendmail_wait = 0
+unset record
+
+source ~/.mutt/colors.muttrc
diff --git a/email/_mutt/offlineimap.py b/email/_mutt/offlineimap.py
new file mode 100644
index 0000000..c358caa
--- /dev/null
+++ b/email/_mutt/offlineimap.py
@@ -0,0 +1,5 @@
+#!/bin/python
+from subprocess import check_output
+
+def get_pass(account):
+ return check_output("pass email/"+account, shell=True).rstrip()
diff --git a/email/_mutt/sig b/email/_mutt/sig
new file mode 100644
index 0000000..255bdcb
--- /dev/null
+++ b/email/_mutt/sig
@@ -0,0 +1 @@
+PGP ID: 0xC8F0B2F4
diff --git a/email/_mutt/temp/.gitignore b/email/_mutt/temp/.gitignore
new file mode 100644
index 0000000..5e7d273
--- /dev/null
+++ b/email/_mutt/temp/.gitignore
@@ -0,0 +1,4 @@
+# Ignore everything in this directory
+*
+# Except this file
+!.gitignore
diff --git a/email/_offlineimaprc b/email/_offlineimaprc
new file mode 100644
index 0000000..b74910b
--- /dev/null
+++ b/email/_offlineimaprc
@@ -0,0 +1,43 @@
+[general]
+ui = TTY.TTYUI
+accounts = Tharre
+pythonfile=~/.mutt/offlineimap.py
+fsync = False
+
+[Account Tharre]
+localrepository = Tharre-Local
+remoterepository = Tharre-Remote
+status_backend = sqlite
+postsynchook = notmuch new
+
+[Repository Tharre-Local]
+type = Maildir
+localfolders = ~/.mail/tharre3@gmail.com
+nametrans = lambda folder: {'drafts': '[Gmail]/Drafts',
+ 'sent': '[Gmail]/Sent Mail',
+ 'flagged': '[Gmail]/Starred',
+ 'trash': '[Gmail]/Trash',
+ 'archive': '[Gmail]/All Mail',
+ }.get(folder, folder)
+
+[Repository Tharre-Remote]
+maxconnections = 8
+type = Gmail
+remoteuser = tharre3@gmail.com
+remotepasseval = get_pass("tharre3@gmail.com")
+realdelete = no
+# Necessary as of OfflineIMAP 6.5.4
+sslcacertfile = /etc/ssl/certs/ca-certificates.crt
+nametrans = lambda folder: {'[Gmail]/Drafts': 'drafts',
+ '[Gmail]/Sent Mail': 'sent',
+ '[Gmail]/Starred': 'flagged',
+ '[Gmail]/Trash': 'trash',
+ '[Gmail]/All Mail': 'archive',
+ }.get(folder, folder)
+folderfilter = lambda folder: folder not in ['[Gmail]/Trash',
+ 'Nagios',
+ 'Django',
+ 'Flask',
+ '[Gmail]/Important',
+ '[Gmail]/Spam',
+ ]
diff --git a/install.sh b/install.sh
index df9de5b..c81c474 100755
--- a/install.sh
+++ b/install.sh
@@ -29,6 +29,12 @@ if [ "$1" = "arch" ]; then
# [arch linux]
ln -sf "$dotfiles/shell/_makepkg.conf" "$HOME/.makepkg.conf"
+
+ # [email]
+ ln -sfT "$dotfiles/email/_mutt" "$HOME/.mutt"
+ ln -sf "$dotfiles/email/_offlineimaprc" "$HOME/.offlineimaprc"
+ ln -sf "$dotfiles/email/_msmtprc" "$HOME/.msmtprc"
+ mkdir ~/.mail
fi
echo "Finished installing dotfiles"