summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.msmtprc20
-rw-r--r--.mutt/id_gmail2
-rw-r--r--.mutt/id_imperial5
-rw-r--r--.mutt/id_informal7
-rw-r--r--.mutt/id_main7
-rw-r--r--.mutt/id_openmailbox2
-rw-r--r--.mutt/id_private7
-rw-r--r--.mutt/mailboxes2
-rw-r--r--.mutt/muttrc44
-rw-r--r--.mutt/signature1
-rw-r--r--.offlineimap/offlineimap.py4
-rw-r--r--.offlineimap/offlineimaprc68
12 files changed, 98 insertions, 71 deletions
diff --git a/.msmtprc b/.msmtprc
index 8af8add..f1bbecb 100644
--- a/.msmtprc
+++ b/.msmtprc
@@ -4,26 +4,32 @@ tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/.msmtp.log
-account gmail
+account main
host smtp.gmail.com
port 587
from urbain.p.vaes@gmail.com
user urbain.p.vaes
passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.password-store/gmail/urbain.p.vaes@gmail.com.gpg"
+account informal
+host smtp.gmail.com
+port 587
+from urbainvaes90@gmail.com
+user urbainvaes90
+passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.password-store/gmail/urbainvaes90@gmail.com.gpg"
+
account imperial
host outlook.office365.com
from u.vaes13@imperial.ac.uk
user uv113@ic.ac.uk
-passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.password-store/Mail/imperial.gpg"
+passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.password-store/imperial/u.vaes13@imperial.ac.uk.gpg"
port 587
-account openmailbox
+account private
host smtp.openmailbox.org
from urbain.p.vaes@openmailbox.org
-user urbain.p.vaes
-passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.password-store/Mail/openmailbox.gpg"
+user urbain.p.vaes@openmailbox.org
+passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.password-store/openmailbox/urbain.p.vaes@openmailbox.org.gpg"
port 587
-# Set a default account
-account default : gmail
+account default : main
diff --git a/.mutt/id_gmail b/.mutt/id_gmail
deleted file mode 100644
index af1f334..0000000
--- a/.mutt/id_gmail
+++ /dev/null
@@ -1,2 +0,0 @@
-set from = "urbain.p.vaes@gmail.com"
-set sendmail="/usr/bin/msmtp -a gmail"
diff --git a/.mutt/id_imperial b/.mutt/id_imperial
index e4df7f5..55311a4 100644
--- a/.mutt/id_imperial
+++ b/.mutt/id_imperial
@@ -1,2 +1,7 @@
set from = "u.vaes13@imperial.ac.uk"
set sendmail="/usr/bin/msmtp -a imperial"
+
+set spoolfile = "+Imperial/Imperial"
+set record = "+Imperial/Imperial.sent"
+set postponed = "+Imperial/Imperial.drafts"
+set trash = "+Imperial/Imperial.bin"
diff --git a/.mutt/id_informal b/.mutt/id_informal
new file mode 100644
index 0000000..41e5ed7
--- /dev/null
+++ b/.mutt/id_informal
@@ -0,0 +1,7 @@
+set from = "urbainvaes90@gmail.com"
+set sendmail="/usr/bin/msmtp -a informal"
+
+set spoolfile = "+Informal/Informal"
+set record = "+Informal/Informal.sent"
+set postponed = "+Informal/Informal.drafts"
+set trash = "+Informal/Informal.bin"
diff --git a/.mutt/id_main b/.mutt/id_main
new file mode 100644
index 0000000..9e854bc
--- /dev/null
+++ b/.mutt/id_main
@@ -0,0 +1,7 @@
+set from = "urbain.p.vaes@gmail.com"
+set sendmail="/usr/bin/msmtp -a main"
+
+set spoolfile = "+Main/Main"
+set record = "+Main/Main.sent"
+set postponed = "+Main/Main.drafts"
+set trash = "+Main/Main.bin"
diff --git a/.mutt/id_openmailbox b/.mutt/id_openmailbox
deleted file mode 100644
index 99518a1..0000000
--- a/.mutt/id_openmailbox
+++ /dev/null
@@ -1,2 +0,0 @@
-set from = "urbain.p.vaes@openmailbox.org"
-set sendmail="/usr/bin/msmtp -a openmailbox"
diff --git a/.mutt/id_private b/.mutt/id_private
new file mode 100644
index 0000000..74bf064
--- /dev/null
+++ b/.mutt/id_private
@@ -0,0 +1,7 @@
+set from = "urbain.p.vaes@openmailbox.org"
+set sendmail="/usr/bin/msmtp -a private"
+
+set spoolfile = "+Private/Private"
+set record = "+Private/Private.sent"
+set postponed = "+Private/Private.drafts"
+set trash = "+Private/Private.bin"
diff --git a/.mutt/mailboxes b/.mutt/mailboxes
index 53a640f..5fda20c 100644
--- a/.mutt/mailboxes
+++ b/.mutt/mailboxes
@@ -1 +1 @@
-mailboxes "+openmailbox/Free" "+Main/Main" "+Gmail/Gmail" "+Imperial/Imperial" "+Main/Sent" "+Main/Drafts" "+Main/Bin"
+mailboxes "+Imperial/Imperial" "+Imperial/Imperial.bin" "+Imperial/Imperial.drafts" "+Imperial/Imperial.sent" "+Informal/Informal" "+Informal/Informal.bin" "+Informal/Informal.drafts" "+Informal/Informal.sent" "+Main/Main" "+Main/Main.bin" "+Main/Main.drafts" "+Main/Main.sent" "+Private/Private" "+Private/Private.bin" "+Private/Private.drafts" "+Private/Private.sent"
diff --git a/.mutt/muttrc b/.mutt/muttrc
index 3918c3a..d9f1bc8 100644
--- a/.mutt/muttrc
+++ b/.mutt/muttrc
@@ -12,11 +12,14 @@ set tmpdir = ~/.mutt/temp
source ~/.mutt/crypto
source ~/.mutt/alias
source ~/.mutt/mailboxes
+source ~/.mutt/id_main
# General information
-set from = "urbain.p.vaes@gmail.com"
set realname = "Urbain Vaes"
+set reverse_alias
+set sort = reverse-date
set weed
+unset markers
# Encryption
set crypt_autosign = no
@@ -27,13 +30,6 @@ set pgp_sign_as = 716064C0
set pgp_use_gpg_agent = yes
set pgp_timeout = 3600
-
-# Maildirs
-set spoolfile = "+Main/Main"
-set record = "+Main/Sent"
-set postponed = "+Main/Drafts"
-set trash = "+Main/Bin"
-
# Sidebar
set sidebar_width=26
set sidebar_visible = yes
@@ -50,11 +46,6 @@ set quit = yes
set pager_stop
set pager_index_lines = 10
-# Misc
-unset markers
-set reverse_alias
-set sort = reverse-date
-
# HTML messages
auto_view text/html
alternative_order text/plain text/enriched text/html
@@ -63,13 +54,21 @@ alternative_order text/plain text/enriched text/html
set editor="vim --noplugin"
set include=yes
-# Program to send mails
-set sendmail="/usr/bin/msmtp"
+# Macros
+macro index gm "<change-folder> +Main/Main<enter>"
+macro index gp "<change-folder> +Private/Private<enter>"
+macro index gi "<change-folder> +Informal/Informal<enter>"
+macro index gw "<change-folder> +Imperial/Imperial<enter>"
+macro index gs "<change-folder> $record<enter>"
+macro index gd "<change-folder> $postponed<enter>"
+macro index gb "<change-folder> $trash<enter>"
# Key bindings
bind index,pager \Cf next-page
bind index,pager \Cb previous-page
+bind index,pager \Cu next-unread-mailbox
+
bind index gg first-entry
bind index G last-entry
bind index i flag-message
@@ -80,13 +79,16 @@ bind pager j next-entry
bind pager k previous-entry
bind pager R group-reply
+# Hooks
+send-hook '~t .*@imperial\.ac\.uk$' 'source ~/.mutt/id_imperial'
+reply-hook '~t .*@imperial\.ac\.uk$' 'source ~/.mutt/id_imperial'
+
+folder-hook 'Main*' 'source ~/.mutt/id_main'
+folder-hook 'Informal*' 'source ~/.mutt/id_informal'
+folder-hook 'Private*' 'source ~/.mutt/id_private'
+folder-hook 'Imperial*' 'source ~/.mutt/id_imperial'
+
# Source mutt solarized
`[ "$COLORSCHEME" = "light" ] && echo source $HOME/.mutt/solarized/mutt-colors-solarized-light-16.muttrc || echo set`
`[ "$COLORSCHEME" = "dark" ] && echo source $HOME/.mutt/solarized/mutt-colors-solarized-dark-16.muttrc || echo set`
`[ "$COLORSCHEME" = "default" ] && echo source $HOME/.mutt/solarized/mutt-colors-solarized-dark-16.muttrc || echo set`
-
-# Hooks
-reply-hook . 'source ~/.mutt/id_gmail'
-send-hook . 'source ~/.mutt/id_gmail'
-send-hook '~t .*@imperial\.ac\.uk$' 'source ~/.mutt/id_imperial'
-reply-hook '~t .*@imperial\.ac\.uk$' 'source ~/.mutt/id_imperial'
diff --git a/.mutt/signature b/.mutt/signature
index 1b04db1..eb52bfb 100644
--- a/.mutt/signature
+++ b/.mutt/signature
@@ -1,2 +1 @@
Urbain Vaes
-urbain.p.vaes@gmail.com
diff --git a/.offlineimap/offlineimap.py b/.offlineimap/offlineimap.py
index 7d2b481..023f418 100644
--- a/.offlineimap/offlineimap.py
+++ b/.offlineimap/offlineimap.py
@@ -3,10 +3,8 @@
import os
import subprocess
-
def mailpasswd(acct):
- acct = os.path.basename(acct)
- path = "/home/urbain/.password-store/Mail/%s.gpg" % acct
+ path = "/home/urbain/.password-store/%s.gpg" % acct
args = ["gpg2", "--use-agent", "--quiet", "--batch", "-d", path]
try:
return subprocess.check_output(args).strip()
diff --git a/.offlineimap/offlineimaprc b/.offlineimap/offlineimaprc
index 87b517a..154eb8a 100644
--- a/.offlineimap/offlineimaprc
+++ b/.offlineimap/offlineimaprc
@@ -1,7 +1,7 @@
[general]
ui = ttyui
pythonfile = /home/urbain/.offlineimap.py
-accounts = Imperial, Main, Gmail, openmailbox
+accounts = Imperial, Main, Informal, Private
maxsyncaccounts = 4
[Account Imperial]
@@ -13,18 +13,18 @@ autorefresh = 10
type = Maildir
localfolders = ~/.mail/Imperial
status_backend = sqlite
-nametrans = lambda folder : {'Imperial' : 'INBOX'}.get(folder, folder)
+nametrans = lambda folder : {'Imperial' : 'INBOX', 'Imperial/sent' : 'Sent Items', 'Imperial/drafts' : 'Drafts', 'Imperial/bin' : 'Deleted Items'}.get(folder, folder)
[Repository Imperial-Remote]
type = IMAP
remotehost = outlook.office365.com
remoteuser = uv113@ic.ac.uk
-remotepasseval = mailpasswd("imperial")
-ssl = yes
-port = 993
-nametrans = lambda folder : {'INBOX' : 'Imperial'}.get(folder, folder)
-folderfilter = lambda folder: folder in ['INBOX']
+remotepasseval = mailpasswd('imperial/u.vaes13@imperial.ac.uk')
+nametrans = lambda folder : {'INBOX' : 'Imperial', 'Sent Items' : 'Imperial/sent', 'Drafts' : 'Imperial/drafts', 'Deleted Items' : 'Imperial/bin'}.get(folder, folder)
+folderfilter = lambda folder: folder in ['INBOX', 'Sent Items', 'Drafts', 'Deleted Items']
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
+realdelete = no
+maxconnections = 3
[Account Main]
localrepository = Main-Local
@@ -35,60 +35,60 @@ autorefresh = 10
type = Maildir
localfolders = ~/.mail/Main
status_backend = sqlite
-nametrans = lambda folder : {'Main' : 'INBOX', 'Sent' : '[Gmail]/Sent Mail', 'Drafts' : '[Gmail]/Drafts'}.get(folder, folder)
+nametrans = lambda folder : {'Main' : 'INBOX', 'Main/sent' : '[Gmail]/Sent Mail', 'Main/drafts' : '[Gmail]/Drafts', 'Main/bin' : '[Gmail]/Bin'}.get(folder, folder)
[Repository Main-Remote]
type = Gmail
remoteuser = urbain.p.vaes
-remotepasseval = mailpasswd("main")
-realdelete = no
-maxconnections = 3
-nametrans = lambda folder : {'INBOX' : 'Main', '[Gmail]/Sent Mail' : 'Sent', '[Gmail]/Drafts' : 'Drafts', '[Gmail]/Bin' : 'Bin'}.get(folder, folder)
+remotepasseval = mailpasswd("gmail/urbain.p.vaes@gmail.com")
+nametrans = lambda folder : {'INBOX' : 'Main', '[Gmail]/Sent Mail' : 'Main/sent', '[Gmail]/Drafts' : 'Main/drafts', '[Gmail]/Bin' : 'Main/bin'}.get(folder, folder)
folderfilter = lambda folder: folder in ['INBOX', '[Gmail]/Sent Mail', '[Gmail]/Drafts', '[Gmail]/Bin']
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
+realdelete = no
+maxconnections = 3
-[Account Gmail]
-localrepository = Gmail-Local
-remoterepository = Gmail-Remote
+[Account Informal]
+localrepository = Informal-Local
+remoterepository = Informal-Remote
autorefresh = 10
-[Repository Gmail-Local]
+[Repository Informal-Local]
type = Maildir
-localfolders = ~/.mail/Gmail
+localfolders = ~/.mail/Informal
status_backend = sqlite
-nametrans = lambda folder : {'Gmail' : 'INBOX'}.get(folder, folder)
+nametrans = lambda folder : {'Informal' : 'INBOX', 'Informal/sent' : '[Gmail]/Sent Mail', 'Informal/drafts' : '[Gmail]/Drafts', 'Informal/bin' : '[Gmail]/Bin'}.get(folder, folder)
-[Repository Gmail-Remote]
+[Repository Informal-Remote]
type = Gmail
remoteuser = urbainvaes90
-remotepasseval = mailpasswd("gmail")
+remotepasseval = mailpasswd("gmail/urbainvaes90@gmail.com")
+nametrans = lambda folder : {'INBOX' : 'Informal', '[Gmail]/Sent Mail' : 'Informal/sent', '[Gmail]/Drafts' : 'Informal/drafts', '[Gmail]/Bin' : 'Informal/bin'}.get(folder, folder)
+folderfilter = lambda folder: folder in ['INBOX', '[Gmail]/Sent Mail', '[Gmail]/Drafts', '[Gmail]/Bin']
+sslcacertfile = /etc/ssl/certs/ca-certificates.crt
realdelete = no
maxconnections = 3
-nametrans = lambda folder: {'INBOX' : 'Gmail'}.get(folder, folder)
-folderfilter = lambda folder: folder in ['INBOX']
-sslcacertfile = /etc/ssl/certs/ca-certificates.crt
-[Account openmailbox]
-localrepository = openmailbox-Local
-remoterepository = openmailbox-Remote
+[Account Private]
+localrepository = Private-Local
+remoterepository = Private-Remote
autorefresh = 10
-[Repository openmailbox-Local]
+[Repository Private-Local]
type = Maildir
-localfolders = ~/.mail/openmailbox
+localfolders = ~/.mail/Private
status_backend = sqlite
-nametrans = lambda folder : {'Free' : 'INBOX'}.get(folder, folder)
+nametrans = lambda folder : {'Private' : 'INBOX', 'Private/sent' : 'Sent', 'Private/drafts' : 'Drafts', 'Private/bin' : 'Trash'}.get(folder, folder)
-
-[Repository openmailbox-Remote]
+[Repository Private-Remote]
type = IMAP
remotehost = imap.openmailbox.org
remoteuser = urbain.p.vaes@openmailbox.org
-remotepasseval = mailpasswd("openmailbox")
-nametrans = lambda folder: {'INBOX' : 'Free'}.get(folder, folder)
-folderfilter = lambda folder: folder in ['INBOX']
+remotepasseval = mailpasswd("openmailbox/urbain.p.vaes@openmailbox.org")
+nametrans = lambda folder : {'INBOX' : 'Private', 'Sent' : 'Private/sent', 'Drafts' : 'Private/drafts', 'Trash' : 'Private/bin'}.get(folder, folder)
+folderfilter = lambda folder: folder in ['INBOX', 'Sent', 'Drafts', 'Trash']
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
realdelete = no
+maxconnections = 3
[mbnames]
enabled = yes