diff options
Diffstat (limited to '.offlineimap')
-rw-r--r-- | .offlineimap/offlineimap.py | 12 | ||||
-rw-r--r-- | .offlineimap/offlineimaprc | 76 |
2 files changed, 88 insertions, 0 deletions
diff --git a/.offlineimap/offlineimap.py b/.offlineimap/offlineimap.py new file mode 100644 index 0000000..c63b82d --- /dev/null +++ b/.offlineimap/offlineimap.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +import os +import subprocess +def mailpasswd(acct): + acct = os.path.basename(acct) + path = "/home/urbain/.passwords/%s.asc" % acct + args = ["gpg", "--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 new file mode 100644 index 0000000..4dc46f1 --- /dev/null +++ b/.offlineimap/offlineimaprc @@ -0,0 +1,76 @@ +[general] +ui = ttyui +pythonfile = /home/urbain/.offlineimap.py +accounts = Imperial, Main, Gmail +maxsyncaccounts = 4 + +[Account Imperial] +localrepository = Imperial-Local +remoterepository = Imperial-Remote +autorefresh = 10 + +[Repository Imperial-Local] +type = Maildir +localfolders = ~/.mail/Imperial +status_backend = sqlite +nametrans = lambda folder : {'Imperial' : 'INBOX'}.get(folder, folder) + +[Repository Imperial-Remote] +type = IMAP +remotehost = exchange.imperial.ac.uk +remoteuser = uv113 +remotepasseval = mailpasswd("imperial") +ssl = yes +nametrans = lambda folder : {'INBOX' : 'Imperial'}.get(folder, folder) +folderfilter = lambda folder: folder in ['INBOX'] +Sslcacertfile = /etc/ssl/certs/ca-certificates.crt + +[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', 'Sent' : '[Gmail]/Sent Mail', 'Drafts' : '[Gmail]/Drafts'}.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'}.get(folder, folder) +folderfilter = lambda folder: folder in ['INBOX', '[Gmail]/Sent Mail', '[Gmail]/Drafts'] +sslcacertfile = /etc/ssl/certs/ca-certificates.crt + +[Account Gmail] +localrepository = Gmail-Local +remoterepository = Gmail-Remote +autorefresh = 10 + +[Repository Gmail-Local] +type = Maildir +localfolders = ~/.mail/Gmail +status_backend = sqlite +nametrans = lambda folder : {'Gmail' : 'INBOX'}.get(folder, folder) + +[Repository Gmail-Remote] +type = Gmail +remoteuser = urbainvaes90 +remotepasseval = mailpasswd("gmail") +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 + +[mbnames] +enabled = yes +filename = ~/.mutt/mailboxes +header = "mailboxes " +peritem = "+%(accountname)s/%(foldername)s" +sep = " " +footer = "\n" |