about summary refs log tree commit diff
path: root/dotfiles/offlineimaprc
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2018-06-06T14·26+0200
committerVincent Ambo <mail@tazj.in>2018-06-06T14·26+0200
commit1239f26e8a771b4040e8ebd557de0738b4d7d24a (patch)
tree1134cc0c0cac7f4867a81f97e03cdb5371e6c79f /dotfiles/offlineimaprc
parent969c0071820b29061d4efe3d230831ae5f7c97b3 (diff)
feat(mail): Import email configuration into Nix
This moves my email configuration into NixOS, including the following
features:

1. Replaced the NixOS-builtin offlineimap user service with a custom
   one that runs notmuch-indexing as part of the systemd unit instead
   of a postsynchook, which is significantly more reliable.
2. Adds configuration for notmuch and its tagging.
3. Adds configuration for OfflineIMAP & MSMTP.

Relevant emacs configuration has also been added to my emacs.d
repository.
Diffstat (limited to 'dotfiles/offlineimaprc')
-rw-r--r--dotfiles/offlineimaprc61
1 files changed, 61 insertions, 0 deletions
diff --git a/dotfiles/offlineimaprc b/dotfiles/offlineimaprc
new file mode 100644
index 0000000000..56840c99d1
--- /dev/null
+++ b/dotfiles/offlineimaprc
@@ -0,0 +1,61 @@
+[general]
+accounts = aprila, tazjin, gmail
+
+[DEFAULT]
+ssl = yes
+sslcacertfile = /etc/ssl/certs/ca-certificates.crt
+
+# Main work account:
+[Account aprila]
+localrepository = aprila-local
+remoterepository = aprila-remote
+
+[Repository aprila-local]
+type = Maildir
+localfolders = ~/mail/aprila
+
+[Repository aprila-remote]
+type = IMAP
+remotehost = outlook.office365.com
+remoteuser = vincent@aprila.no
+remotepassfile = ~/.config/mail/aprila-pass
+# Office365 is a naughty boy when it comes to IMAP. Even worse, they
+# also seem to have decided that they should change IMAP folder names
+# based on the UI language.
+#
+# I can't be bothered to implement the entire (relatively long)
+# blacklist, so I'll instead whitelist relevant folders:
+folderfilter = lambda folder: folder in ['INBOX', 'Arkiv', 'Sende element']
+
+# Private GMail account (old):
+[Account gmail]
+# maxage = 30 # otherwise the volume is too high ...
+localrepository = gmail-local
+remoterepository = gmail-remote
+synclabels = yes
+
+[Repository gmail-local]
+type = GmailMaildir
+localfolders = ~/mail/gmail
+
+[Repository gmail-remote]
+type = Gmail
+remoteuser = tazjin@gmail.com
+remotepassfile = ~/.config/mail/gmail-pass
+folderfilter = lambda folder: folder == 'INBOX'
+
+# Main private account:
+[Account tazjin]
+localrepository = tazjin-local
+remoterepository = tazjin-remote
+
+[Repository tazjin-local]
+type = Maildir
+localfolders = ~/mail/tazjin
+
+[Repository tazjin-remote]
+type = IMAP
+remotehost = mail.runbox.com
+remoteuser = mail@tazj.in
+remotepassfile = ~/.config/mail/tazjin-pass
+auth_mechanisms = LOGIN