commit dd397fc2c55f30c4f092ff6df68cd0167020fab2
parent eaa934a0e5a38134899fbef3bb91b7c2f819f1ce
Author: pyratebeard <root@pyratebeard.net>
Date: Tue, 14 Jul 2020 21:15:56 +0100
use pass to pull secret info (passwd,smtp_url). change to view maildir instead of imap. include offlineimap config and octotech muttrc
Diffstat:
4 files changed, 152 insertions(+), 4 deletions(-)
diff --git a/mutt/.mutt/muttrc b/mutt/.mutt/muttrc
@@ -2,15 +2,18 @@
# ░█░█░█░█░░█░░░█░░░
# ░▀░▀░▀▀▀░░▀░░░▀░░░
+# set password
+set my_pass = "`pass email/pyratebeard/passwd`"
+set my_smtp_url = "`pass email/pyratebeard/smtp_url`"
+
# imap
-set imap_user = ""
-set imap_pass = ""
unset imap_passive
set imap_keepalive = 300
# smtp
-set smtp_url = ""
+set smtp_url = $my_smtp_url
set smtp_authenticators=”login”
+set smtp_pass = $my_pass
# user details
set from = ""
@@ -20,7 +23,8 @@ set realname = "pyratebeard"
set header_cache = "~/.mutt/cache/headers"
set message_cachedir = "~/.mutt/cache/"
set certificate_file = "~/.mutt/certificates"
-set folder = imaps://imap.domain
+set mbox_type = Maildir
+set folder = "~/lib/doc/email/pyratebeard"
set spoolfile = +INBOX
set record = "~/.mutt/sent"
mailboxes = =INBOX
@@ -43,6 +47,7 @@ set askcc = yes
set askbcc = yes
set autoedit = yes
set edit_headers = yes
+set text_flowed
# display
set index_format = "%4C %Z %-30.30L %M %s"
@@ -50,6 +55,7 @@ folder-hook . "push <collapse-all>\n"
bind index - collapse-thread
set sort=reverse-threads
set sort_aux=date-received
+unset markers
# handling for multi-part and html messages
auto_view text/html
diff --git a/mutt/.mutt/octotech b/mutt/.mutt/octotech
@@ -0,0 +1,99 @@
+# ░█▄█░█░█░▀█▀░▀█▀░░
+# ░█░█░█░█░░█░░░█░░░
+# ░▀░▀░▀▀▀░░▀░░░▀░░░
+
+# set password
+set my_pass = "`pass email/octotech/passwd`"
+set my_smtp_url = "`pass email/octotech/smtp_url`"
+
+# imap
+unset imap_passive
+set imap_keepalive = 300
+
+# smtp
+set smtp_url = $my_smtp_url
+set smtp_authenticators=”login”
+set smtp_pass = $my_pass
+
+# user details
+set from = "dudley@octo.tech"
+set realname = "Dudley Burrows"
+
+# mailbox
+set header_cache = "~/.mutt/cache/headers"
+set message_cachedir = "~/.mutt/cache/"
+set certificate_file = "~/.mutt/certificates"
+set mbox_type = Maildir
+set folder = "~/lib/doc/email/octotech"
+set spoolfile = +INBOX
+set record = "~/.mutt/sent"
+mailboxes = =INBOX
+set mail_check = 120
+
+# colours
+color normal default default
+color indicator cyan black
+color tree default default
+color status white black
+
+# pgp
+source "~/.mutt/gpg.rc"
+set pgp_autosign = no
+set pgp_use_gpg_agent = yes
+
+# compose
+set editor = vim
+set askcc = yes
+set askbcc = yes
+set autoedit = yes
+set edit_headers = yes
+set text_flowed
+
+# display
+set index_format = "%4C %Z %-30.30L %M %s"
+folder-hook . "push <collapse-all>\n"
+bind index - collapse-thread
+set sort=reverse-threads
+set sort_aux=date-received
+unset markers
+
+# handling for multi-part and html messages
+auto_view text/html
+alternative_order text/plain text/html
+
+# sidebar
+set sidebar_visible = no
+set sidebar_folder_indent = yes
+set sidebar_indent_string = ".."
+set sidebar_short_path = yes
+bind index,pager B sidebar-toggle-visible
+
+# move the highlight to the previous mailbox
+bind index,pager \Cp sidebar-prev
+
+# move the highlight to the next mailbox
+bind index,pager \Cn sidebar-next
+
+# open the highlighted mailbox
+bind index,pager \Co sidebar-open
+
+# move the highlight to the previous page
+# this is useful if you have a LOT of mailboxes.
+bind index,pager <F3> sidebar-page-up
+
+# move the highlight to the next page
+# this is useful if you have a LOT of mailboxes.
+bind index,pager <F4> sidebar-page-down
+
+# move the highlight to the previous mailbox containing new, or flagged,
+# mail.
+bind index,pager <F5> sidebar-prev-new
+
+# move the highlight to the next mailbox containing new, or flagged, mail.
+bind index,pager <F6> sidebar-next-new
+
+# toggle the visibility of the sidebar.
+bind index,pager B sidebar-toggle-visible
+
+# macros
+macro attach W "<save-entry><bol>~/tmp/<eol>"
diff --git a/offlineimap/.offlineimap.py b/offlineimap/.offlineimap.py
@@ -0,0 +1,8 @@
+#!/usr/bin/env python
+from subprocess import check_output
+
+def get_pass(account):
+ return check_output("pass email/" + account + "/passwd", shell=True).splitlines()[0]
+
+def get_imap(account):
+ return check_output("pass email/" + account + "/imap_url", shell=True).splitlines()[0]
diff --git a/offlineimap/.offlineimaprc b/offlineimap/.offlineimaprc
@@ -0,0 +1,35 @@
+[general]
+accounts = pyratebeard,octotech
+pythonfile = ~/.offlineimap.py
+
+[Account pyratebeard]
+localrepository = pyratebeard-local
+remoterepository = pyratebeard-remote
+
+[Repository pyratebeard-local]
+type = Maildir
+localfolders = ~/lib/doc/email/pyratebeard
+
+[Repository pyratebeard-remote]
+type = IMAP
+remotehosteval = get_imap("pyratebeard")
+remoteuser = root@pyratebeard.net
+remotepasseval = get_pass("pyratebeard")
+ssl = yes
+sslcacertfile = /etc/ssl/certs/ca-bundle.crt
+
+[Account octotech]
+localrepository = octotech-local
+remoterepository = octotech-remote
+
+[Repository octotech-local]
+type = Maildir
+localfolders = ~/lib/doc/email/octotech
+
+[Repository octotech-remote]
+type = IMAP
+remotehosteval = get_imap("octotech")
+remoteuser = dudley@octo.tech
+remotepasseval = get_pass("octotech")
+ssl = yes
+sslcacertfile = /etc/ssl/certs/ca-bundle.crt