Multiple IMAP to maildir

Philippe LeCavalier support at plecavalier.com
Sat Jan 8 15:22:24 GMT 2011


Hi.

Thought I'd start a new thread since my issues/questions may differ  
from the original "two accounts one maildir".

To be clear, here's what I'm looking to accomplish.

i) I have 2 IMAP accounts hosted on separate Cyrus IMAP servers that I  
use for a dropbox of sorts for clients to post issues mimicking a kind  
of makeshift ticketing system. In these accounts I have:

INBOX
INBOX.help
INBOX.help.open
INBOX.help.closed

Both IMAP accounts are setup the same way. They contain many other  
folders for other purposes but are no use to me so I only want the  
ones indicated above. -see fodlerfilter below.

ii)I have my personal IMAP account hosted on a third server where I  
wish to sync the above mentioned folders *within an existing mailbox  
on my account* ie

INBOX.Customers.client1.help.open
../client2.help.closed
...etc.

Here's my offlineimaprc I've conceived to accomplish this task with my  
questions below.

[general]
accounts = PLC,client1,client2
maxsyncaccounts = 4

[Account PLC(me)]
localrepository = PLC-Local
remoterepository = PLC-Remote
presynchook = imapfilter -c ~/.imapfilter/config.lua
maxconnections = 4
restoreatime = no
autorefresh = 10
quick = 5


[Account client1]
localrepository = client1-Local
remoterepository = client1-Remote
;presynchook = imapfilter -c ~/.imapfilter/config-help.lua
maxconnections = 4
restoreatime = no
autorefresh = 10
quick = 5

[Account client2]
localrepository = client2-Local
remoterepository = client2-Remote
;presynchook = imapfilter -c ~/.imapfilter/config-help.lua
maxconnections = 4
restoreatime = no
autorefresh = 10
quick = 5

[Repository PLC-Remote]
type = IMAP
remotehost = mail.MYDOMAIN.com
remoteuser = user at MYDOMAIN.com
remotepass = mypass
nametrans = lambda foldername: re.sub('^INBOX\.', '', foldername)

[Repository PLC-Local]
type = Maildir
localfolders = ~/.mail/
sep = /


[Repository client1-Remote]
type = IMAP
remotehost = mail.client1.ca
remoteuser = help
remotepass = hidden
folderfilter = lambda foldername: foldername in ['INBOX', 'Open',  
'Closed', 'Sent']
nametrans = lambda foldername: re.sub('^INBOX\.', 'help', foldername)  
--I'd really like to have the root be the INBOX.Customers.client1.help  
if that's possible. So far I have been able to make that work and end  
up with INBOX.Customers.client1.help.INBOX

[Repository client1-Local]
type = IMAP
remotehost = mail.MYDOMAIN.com
remoteuser = myusername at MYDOMAIN.com
remotepass = hidden
localfolders = Path to help folders? INBOX.Custoemrs.client1.help.open ???

[Repository client2-Remote]
type = IMAP
remotehost = mail.client2.ca
remoteuser = help
remotepass = hidden
folderfilter = lambda foldername: foldername in ['INBOX', 'Open',  
'Closed', 'Sent']
nametrans = lambda foldername: re.sub('^INBOX\.', 'help', foldername)  
--same as above, just trying to make 'root' 'help'

[Repository client2-Local]
type = IMAP
remotehost = mail.MYDOMAIN.com
remoteuser = myusername at MYDOMAIN.com
remotepass = hidden
localfolders = Path to help folders? INBOX.Customers.client2.help.open ???

1) How do I specify to offlineimap that I want the clients mailboxes  
put in subfolders of my mailbox? Can I even use the localfolders  
directive if type is set to IMAP under the local repo?

2) I know offlineimap supports syncing two IMAP accounts but will it  
account for the folderfilter I've set above? Do I need to specify a  
folderfilter directive for the mail syncing in the other direction?

3) Can I assume that when I send mail and move mail in Evo and  
offlineimap syncs to my mail server it will then propagate the changes  
to the two other servers accordingly?

4) What are the hazard in doing this? I'm worried I'm goign to wipeout  
my mailbox ie instead of syncing to the specified subfolders it will  
merge the all the mailboxes at each and...or some other devastating  
scenario.

Bottom line: Is this going to work :) ?

Sorry in advance so such a big post!

Thanks,
Phil




More information about the OfflineIMAP-project mailing list