summary refs log tree commit diff stats
path: root/offlineimap
diff options
context:
space:
mode:
authorAlan Pearce2017-08-26 17:59:34 +0200
committerAlan Pearce2017-08-26 17:59:34 +0200
commit9347d36a8bd057ca32837a35d5fa5a94c1c570ec (patch)
tree9d528adc258e2419f10e178dd2e8085703dfd1fc /offlineimap
parent63597f1375e7a70e9aa7405c99c61a602bda72dd (diff)
downloadnixfiles-9347d36a8bd057ca32837a35d5fa5a94c1c570ec.tar.lz
nixfiles-9347d36a8bd057ca32837a35d5fa5a94c1c570ec.tar.zst
nixfiles-9347d36a8bd057ca32837a35d5fa5a94c1c570ec.zip
offlineimap: Add initial configuration
Diffstat (limited to 'offlineimap')
-rwxr-xr-xofflineimap/.offlineimap.py5
-rw-r--r--offlineimap/.offlineimaprc34
2 files changed, 39 insertions, 0 deletions
diff --git a/offlineimap/.offlineimap.py b/offlineimap/.offlineimap.py
new file mode 100755
index 00000000..a21f4224
--- /dev/null
+++ b/offlineimap/.offlineimap.py
@@ -0,0 +1,5 @@
+#! /usr/bin/env python2
+from subprocess import check_output
+
+def get_pass(account):
+    return check_output("pass " + account, shell=True).splitlines()[0]
diff --git a/offlineimap/.offlineimaprc b/offlineimap/.offlineimaprc
new file mode 100644
index 00000000..ea98729f
--- /dev/null
+++ b/offlineimap/.offlineimaprc
@@ -0,0 +1,34 @@
+[general]
+# List of accounts to be synced, separated by a comma.
+accounts = alanpearce.eu
+pythonfile = ~/.offlineimap.py
+
+[Account alanpearce.eu]
+# Identifier for the local repository; e.g. the maildir to be synced via IMAP.
+localrepository = alanpearce.eu-local
+# Identifier for the remote repository; i.e. the actual IMAP, usually non-local.
+remoterepository = alanpearce.eu-remote
+autorefresh = 20
+quick = 2
+postsynchook = mu index --maildir=%(personalmaildir)s --lazy-check --nocleanup --quiet
+ 
+[Repository alanpearce.eu-local]
+# OfflineIMAP supports Maildir, GmailMaildir, and IMAP for local repositories.
+type = Maildir
+# Where should the mail be placed?
+localfolders = %(personalmaildir)s
+
+[Repository alanpearce.eu-remote]
+# Remote repos can be IMAP or Gmail, the latter being a preconfigured IMAP.
+type = IMAP
+remotehost = mail.alanpearce.eu
+remoteuser = alan
+remotepasseval = get_pass("mail/alanpearce.eu")
+sslcacertfile = /etc/ssl/certs/ca-certificates.crt
+keepalive = 1740
+holdconnectionopen = yes
+usecompression = yes
+idlefolders = ['INBOX']
+
+[DEFAULT]
+personalmaildir = ~/mail/alanpearce