More details on folder translator function

Philippe LeCavalier support at plecavalier.com
Fri Jan 14 14:47:28 GMT 2011


Hi. I hope you don't mind me cc'ing the list on this. I think it could
useful.

After working with your guide for a day or so I think I may have a few
'misconceptions'. If I have this right...
> import re
> def oimaptransfolder_acc1(foldername):
>     if(foldername == "INBOX"):
>         retval = "acc1"
this part is simply stating to olimap replace INBOX with acc1? When I
change acc1 to what I want(an existing folder within my Maildir) it
doesn't bring in mail from the INBOX on the IMAP server to the specified
folder. There's a slight chance this might be an MUA issue since
Evolution requires the user to point to the Maildir root and names that
folder Inbox. But I would think that despite that offlineimap would
still bring the mail into that folder nonetheless and I would see it.

>     else:
>         retval = "acc1." + foldername
this part tells it that for every subfolder of acc1 add a prefix of
'acc1.'
>     retval = re.sub("/", ".", retval)
and this is for swapping Cyrus separator from / to . ?
In my case I'm using Evo so if the above is correct I would need to do
the exact opposite because Evo want a forward slash as the separator.
What's confusing me in this case is that my mail is being pulled from a
Courier server and the other account is on Cyrus so I think I might need
to state this separately maybe?

>     return retval
> 
> 
> 
> I hope this helps a little, I have quickly copied it from my guide on
> offlineimap, mutt, etc. to be found here:
> 
> http://dev.gentoo.org/~tomka/mail.html
> 
> Cheers,
> Thomas

I'm confused about how your storing the mail in your maildir. In the
guide you show the folder structure as follows:

~/Mail
  -> acc1
    -> acc1 
    -> acc1.folder1
    -> acc1.folder2
    ...
  -> acc2
    -> acc2 
    -> acc2.folder1
    -> acc2.folder2
  -> mairix-search

However in your olimap setup for your local repo you have the mail stored in the same folder as follows:

[Repository acc1local]
type = Maildir
localfolders = ~/Mail/acc2

[Repository acc2local]
type = Maildir
localfolders = ~/Mail/acc2

Is acc2local suppose to read ~/Mail/acc1 by any chance? Or is it because mutt can make separate folders appear in the same hierarchy...I don't understand.

Thanks,
Phil







More information about the OfflineIMAP-project mailing list