summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2016-01-20 14:57:24 +0000
committerUrbain Vaes <urbain@vaes.uk>2016-01-20 14:57:24 +0000
commit5ed0ddfdfe8087f9f46a3419b5aa4d9b574e89e1 (patch)
tree1b7ebe20670e699a8cb8267b6f6d46425d511f9b
parentbc4befd997912eecf83b24bd5ef20e527b562a67 (diff)
Switch to isync instead of offlineimap
-rw-r--r--.mbsyncrc118
-rw-r--r--.offlineimap/offlineimap.py12
-rw-r--r--.offlineimap/offlineimaprc104
-rw-r--r--install.yaml3
4 files changed, 119 insertions, 118 deletions
diff --git a/.mbsyncrc b/.mbsyncrc
new file mode 100644
index 0000000..ac61e81
--- /dev/null
+++ b/.mbsyncrc
@@ -0,0 +1,118 @@
+Create Both
+SyncState *
+
+IMAPAccount Main
+Host imap.gmail.com
+User urbain.p.vaes@gmail.com
+PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.password-store/gmail/urbain.p.vaes@gmail.com.gpg"
+SSLType IMAPS
+CertificateFile /etc/ssl/certs/ca-certificates.crt
+
+IMAPAccount Informal
+Host imap.gmail.com
+User urbainvaes90@gmail.com
+PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.password-store/gmail/urbainvaes90@gmail.com.gpg"
+SSLType IMAPS
+CertificateFile /etc/ssl/certs/ca-certificates.crt
+
+IMAPAccount Work
+Host outlook.office365.com
+User uv113@ic.ac.uk
+PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.password-store/imperial/u.vaes13@imperial.ac.uk.gpg"
+SSLType IMAPS
+CertificateFile /etc/ssl/certs/ca-certificates.crt
+
+IMAPAccount Personal
+Host imap.openmailbox.org
+User urbain.p.vaes@openmailbox.org
+PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.password-store/openmailbox/urbain.p.vaes@openmailbox.org.gpg"
+SSLType IMAPS
+CertificateFile /etc/ssl/certs/ca-certificates.crt
+
+IMAPStore Main-remote
+Account Main
+
+IMAPStore Informal-remote
+Account Informal
+
+IMAPStore Work-remote
+Account Work
+
+IMAPStore Personal-remote
+Account Personal
+
+MaildirStore Main-local
+Path ~/.mail/Main/
+
+MaildirStore Informal-local
+Path ~/.mail/Informal/
+
+MaildirStore Work-local
+Path ~/.mail/Work/
+
+MaildirStore Personal-local
+Path ~/.mail/Personal/
+
+Channel Main-inbox
+Master :Main-remote:"INBOX"
+Slave :Main-local:"Main"
+
+Channel Main-draft
+Master :Main-remote:"[Gmail]/Drafts"
+Slave :Main-local:"Main.drafts"
+
+Channel Main-sent
+Master :Main-remote:"[Gmail]/Sent Mail"
+Slave :Main-local:"Main.sent"
+
+Channel Main-bin
+Master :Main-remote:"[Gmail]/Bin"
+Slave :Main-local:"Main.bin"
+
+Channel Informal-inbox
+Master :Informal-remote:"INBOX"
+Slave :Informal-local:"Informal"
+
+Channel Informal-draft
+Master :Informal-remote:"[Gmail]/Drafts"
+Slave :Informal-local:"Informal.drafts"
+
+Channel Informal-sent
+Master :Informal-remote:"[Gmail]/Sent Mail"
+Slave :Informal-local:"Informal.sent"
+
+Channel Informal-bin
+Master :Informal-remote:"[Gmail]/Bin"
+Slave :Informal-local:"Informal.bin"
+
+Channel Work-inbox
+Master :Work-remote:"INBOX"
+Slave :Work-local:"Work"
+
+Channel Work-draft
+Master :Work-remote:"Drafts"
+Slave :Work-local:"Work.drafts"
+
+Channel Work-sent
+Master :Work-remote:"Sent Items"
+Slave :Work-local:"Work.sent"
+
+Channel Work-bin
+Master :Work-remote:"Deleted Items"
+Slave :Work-local:"Work.bin"
+
+Channel Personal-inbox
+Master :Personal-remote:"INBOX"
+Slave :Personal-local:"Personal"
+
+Channel Personal-draft
+Master :Personal-remote:"Drafts"
+Slave :Personal-local:"Personal.drafts"
+
+Channel Personal-sent
+Master :Personal-remote:"Sent"
+Slave :Personal-local:"Personal.sent"
+
+Channel Personal-bin
+Master :Personal-remote:"Trash"
+Slave :Personal-local:"Personal.bin"
diff --git a/.offlineimap/offlineimap.py b/.offlineimap/offlineimap.py
deleted file mode 100644
index 023f418..0000000
--- a/.offlineimap/offlineimap.py
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import subprocess
-
-def mailpasswd(acct):
- path = "/home/urbain/.password-store/%s.gpg" % acct
- args = ["gpg2", "--use-agent", "--quiet", "--batch", "-d", path]
- try:
- return subprocess.check_output(args).strip()
- except subprocess.CalledProcessError:
- return ""
diff --git a/.offlineimap/offlineimaprc b/.offlineimap/offlineimaprc
deleted file mode 100644
index 0be202e..0000000
--- a/.offlineimap/offlineimaprc
+++ /dev/null
@@ -1,104 +0,0 @@
-[general]
-ui = ttyui
-pythonfile = /home/urbain/.offlineimap.py
-accounts = Work, Main, Informal, Personal
-maxsyncaccounts = 4
-
-[Account Work]
-localrepository = Work-Local
-remoterepository = Work-Remote
-autorefresh = 10
-
-[Repository Work-Local]
-type = Maildir
-localfolders = ~/.mail/Work
-status_backend = sqlite
-nametrans = lambda folder : {'Work' : 'INBOX', 'Work/sent' : 'Sent Items', 'Work/drafts' : 'Drafts', 'Work/bin' : 'Deleted Items'}.get(folder, folder)
-
-[Repository Work-Remote]
-type = IMAP
-remotehost = outlook.office365.com
-remoteuser = uv113@ic.ac.uk
-remotepasseval = mailpasswd('imperial/u.vaes13@imperial.ac.uk')
-nametrans = lambda folder : {'INBOX' : 'Work', 'Sent Items' : 'Work/sent', 'Drafts' : 'Work/drafts', 'Deleted Items' : 'Work/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
-auth_mechanisms = LOGIN
-
-
-[Account Main]
-localrepository = Main-Local
-remoterepository = Main-Remote
-autorefresh = 10
-
-[Repository Main-Local]
-type = Maildir
-localfolders = ~/.mail/Main
-status_backend = sqlite
-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("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
-auth_mechanisms = LOGIN
-
-[Account Informal]
-localrepository = Informal-Local
-remoterepository = Informal-Remote
-autorefresh = 10
-
-[Repository Informal-Local]
-type = Maildir
-localfolders = ~/.mail/Informal
-status_backend = sqlite
-nametrans = lambda folder : {'Informal' : 'INBOX', 'Informal/sent' : '[Gmail]/Sent Mail', 'Informal/drafts' : '[Gmail]/Drafts', 'Informal/bin' : '[Gmail]/Bin'}.get(folder, folder)
-
-[Repository Informal-Remote]
-type = Gmail
-remoteuser = urbainvaes90
-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
-auth_mechanisms = LOGIN
-
-[Account Personal]
-localrepository = Personal-Local
-remoterepository = Personal-Remote
-autorefresh = 10
-
-[Repository Personal-Local]
-type = Maildir
-localfolders = ~/.mail/Personal
-status_backend = sqlite
-nametrans = lambda folder : {'Personal' : 'INBOX', 'Personal/sent' : 'Sent', 'Personal/drafts' : 'Drafts', 'Personal/bin' : 'Trash'}.get(folder, folder)
-
-[Repository Personal-Remote]
-type = IMAP
-remotehost = imap.openmailbox.org
-remoteuser = urbain.p.vaes@openmailbox.org
-remotepasseval = mailpasswd("openmailbox/urbain.p.vaes@openmailbox.org")
-nametrans = lambda folder : {'INBOX' : 'Personal', 'Sent' : 'Personal/sent', 'Drafts' : 'Personal/drafts', 'Trash' : 'Personal/bin'}.get(folder, folder)
-folderfilter = lambda folder: folder in ['INBOX', 'Sent', 'Drafts', 'Trash']
-sslcacertfile = /etc/ssl/certs/ca-certificates.crt
-realdelete = no
-maxconnections = 3
-auth_mechanisms = LOGIN
-
-[mbnames]
-enabled = yes
-filename = ~/.mutt/mailboxes.offlineimap
-header = "mailboxes "
-peritem = "+%(accountname)s/%(foldername)s"
-sep = " "
-footer = "\n"
diff --git a/install.yaml b/install.yaml
index d29820c..fa93411 100644
--- a/install.yaml
+++ b/install.yaml
@@ -12,6 +12,7 @@ default:
- .git_template
- .inputrc
- .latexmkrc
+ - .mbsyncrc
- .ncmpcpp
- .surfraw.bookmarks
- .urxvt
@@ -28,8 +29,6 @@ special:
.mr/mrconfig: ~/.mrconfig
.mr/mrtrust: ~/.mrtrust
.msmtprc: ~/.msmptprc
- .offlineimap/offlineimaprc: ~/.offlineimaprc
- .offlineimap/offlineimap.py: ~/.offlineimap.py
.tmux.conf: ~/.tmux.conf
.vim/vimrc: ~/.vimrc
.uzbl: ~/.config/uzbl