summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.offlineimaprc13
1 files changed, 11 insertions, 2 deletions
diff --git a/.offlineimaprc b/.offlineimaprc
index 0f4cc78..319593c 100644
--- a/.offlineimaprc
+++ b/.offlineimaprc
@@ -1,3 +1,4 @@
+# -*- Mode: Conf -*-
[general]
accounts = LukeShu
@@ -8,13 +9,21 @@ remoterepository = Remote
[Repository Local]
type = Maildir
localfolders = ~/Maildir
-nametrans = lambda foldername: re.sub('^$', 'Inbox', re.sub('^/', '', foldername.replace('.', '/')))
+sep = .
folderfilter = lambda foldername: not re.search('(Trash|Del|-old|Draft)', foldername)
+# transforms local -> remote
+nametrans = lambda foldername: re.sub('^$', 'Inbox', re.sub('^'+re.escape('%(sep)s'), '', foldername))
+
+
[Repository Remote]
type = IMAP
ssl = yes
+cert_fingerprint = 700d84baa7e852240178dc2de18e7e528a2854df
remotehost = imap.mail.yahoo.com
remoteuser = lukeshu@sbcglobal.net
-nametrans = lambda foldername: re.sub('^\.Inbox$', '', "."+foldername.replace('/', '.'))
folderfilter = lambda foldername: not re.search('(Trash|Del)', foldername)
+
+# transforms remote -> local
+# we must assume that sep=/ on the remote IMAP server.
+nametrans = lambda foldername: '/'+re.sub('^Inbox$', '', foldername)