summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2017-03-09 04:12:03 +0100
committerTharre <tharre3@gmail.com>2017-03-09 04:12:03 +0100
commit3606e4bb11cad0505d2ec85fb6090064829dbde9 (patch)
treeb8475758e4e88819e3d64de2341fe97579ddc72b
parentc42046dddd4cd23b5ecf6b1022fda4c5b4b7c39e (diff)
downloaddotfiles-3606e4bb11cad0505d2ec85fb6090064829dbde9.tar.gz
dotfiles-3606e4bb11cad0505d2ec85fb6090064829dbde9.tar.xz
dotfiles-3606e4bb11cad0505d2ec85fb6090064829dbde9.zip
Replace offlineimap with isync (mbsync)
-rw-r--r--.mbsyncrc48
-rw-r--r--.mutt/offlineimap.py5
-rw-r--r--.offlineimaprc43
-rwxr-xr-xinstall.sh2
4 files changed, 49 insertions, 49 deletions
diff --git a/.mbsyncrc b/.mbsyncrc
new file mode 100644
index 0000000..3b0adc6
--- /dev/null
+++ b/.mbsyncrc
@@ -0,0 +1,48 @@
+IMAPAccount tharre3@gmail.com
+Host imap.gmail.com
+User tharre3@gmail.com
+PassCmd "pass email/tharre3@gmail.com"
+SSLType IMAPS
+CertificateFile /etc/ssl/certs/ca-certificates.crt
+
+IMAPStore tharre3@gmail.com-remote
+Account tharre3@gmail.com
+
+MaildirStore tharre3@gmail.com-local
+# The trailing "/" is important
+Path ~/.mail/tharre3@gmail.com/
+Inbox ~/.mail/tharre3@gmail.com/INBOX
+
+Channel tharre3@gmail.com-default
+Master :tharre3@gmail.com-remote:
+Slave :tharre3@gmail.com-local:
+Patterns * ![Gmail]* !sent !drafts !trash
+# Automatically create missing mailboxes, both locally and on the server
+Create Both
+# Save the synchronization state files in the relevant directory
+SyncState *
+
+Channel tharre3@gmail.com-sent
+Master :tharre3@gmail.com-remote:"[Gmail]/Sent Mail"
+Slave :tharre3@gmail.com-local:sent
+Create Slave
+SyncState *
+
+Channel tharre3@gmail.com-drafts
+Master :tharre3@gmail.com-remote:"[Gmail]/Drafts"
+Slave :tharre3@gmail.com-local:drafts
+Create Slave
+SyncState *
+
+Channel tharre3@gmail.com-trash
+Master :tharre3@gmail.com-remote:"[Gmail]/Bin"
+Slave :tharre3@gmail.com-local:trash
+Create Slave
+SyncState *
+
+# Get all the channels together into a group.
+Group tharre3@gmail.com
+Channel tharre3@gmail.com-default
+Channel tharre3@gmail.com-sent
+Channel tharre3@gmail.com-drafts
+Channel tharre3@gmail.com-trash
diff --git a/.mutt/offlineimap.py b/.mutt/offlineimap.py
deleted file mode 100644
index c358caa..0000000
--- a/.mutt/offlineimap.py
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/python
-from subprocess import check_output
-
-def get_pass(account):
- return check_output("pass email/"+account, shell=True).rstrip()
diff --git a/.offlineimaprc b/.offlineimaprc
deleted file mode 100644
index b74910b..0000000
--- a/.offlineimaprc
+++ /dev/null
@@ -1,43 +0,0 @@
-[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 d4d168a..f7c0ef6 100755
--- a/install.sh
+++ b/install.sh
@@ -5,7 +5,7 @@ if [ "$#" -ne 1 ]; then
git submodule update --init --recursive
# ensure mail directory exists
- mkdir -p ~/.mail
+ mkdir -p ~/.mail/tharre3@gmail.com
find . -maxdepth 1 ! -path . ! -name .git ! -name .gitmodules \
! -name .gitignore ! -name .updated -name '.*' -exec "$0" {} \;