From 8a47cc4f5a12900cb56d61ed96ca3c35c3001eb8 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Tue, 4 Aug 2020 19:32:40 +0000 Subject: [PATCH] Added functionality for multiple external accounts per one local account --- skel-etc/.offlineimaprc | 48 +++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/skel-etc/.offlineimaprc b/skel-etc/.offlineimaprc index c3131fe..deb6070 100644 --- a/skel-etc/.offlineimaprc +++ b/skel-etc/.offlineimaprc @@ -1,21 +1,25 @@ [general] -# List of accounts to be synced, separated by a comma. -accounts = sync +##use for one mailboxes per local acount +accounts = sync1 +##Use for multiple mailboxes per local acount +#accounts = sync1,sync2 + -[Account sync] -# Identifier for the local repository; e.g. the maildir to be synced via IMAP. -localrepository = local -# Identifier for the remote rpository; i.e. the actual IMAP, usually non-local. -remoterepository = remote [Repository local] -# OfflineIMAP supports Maildir, GmailMaildir, and IMAP for local repositories. type = Maildir -# Where should the mail be placed? +## Where should the mail be placed? localfolders = /mail/ nametrans = lambda name: re.sub('^\.', '', name) -[Repository remote] + +[Account sync1] +# Identifier for the local repository; e.g. the maildir to be synced via IMAP. +localrepository = local +# Identifier for the remote rpository; i.e. the actual IMAP, usually non-local. +remoterepository = remote1 + +[Repository remote1] # Remote repos can be IMAP or Gmail, the latter being a preconfigured IMAP. type = IMAP remotehost = @@ -25,10 +29,26 @@ readonly = True ssl = yes sslcacertfile = /etc/ssl/certs/ca-certificates.crt ssl_version = tls1_2 - -# Need to exclude '' otherwise it complains about infinite naming loop? folderfilter = lambda foldername: foldername not in [''] -# For Dovecot to see the folders right I want them starting with a dot, -# and dovecot set to look for .INBOX as the toplevel Maildir +#use for one mailboxes per local acount nametrans = lambda name: '.' + name +#use for multiple mailboxes per local acount +#nametrans = lambda name: '..' + name + +#configure for multiple mailboxes per local acount +[Account sync2] +localrepository = local +remoterepository = remote2 + +[Repository remote2] +type = IMAP +remotehost = +remoteuser = +remotepass = +readonly = True +ssl = yes +sslcacertfile = /etc/ssl/certs/ca-certificates.crt +ssl_version = tls1_2 +folderfilter = lambda foldername: foldername not in [''] +nametrans = lambda name: '..' + name \ No newline at end of file