Help with synchronsiation configuration

Thomas Kahle tomka at gentoo.org
Fri Feb 25 21:27:40 GMT 2011


On 16:53 Fri 25 Feb     , HeX wrote:
> Hi again,
> 
> I tried a bit more and I'm still stuck on RESTRICTING the synch to only
> one subfolder of the Gmail account.
> 
> I definetly need something like
> 
> folderfilter = lambda foldername: foldername in  ['LABEL']

Is there no way to use placeholders for foldernames?  Maybe the string
you give there is actually a regexp that gets matched?  I guess you have
to look at the source code or ask more experienced people to find out.

> on the Gmail side. The rewrite sugested by Thomas via python function
> works great but is only useful for the sync NORMAL --> Gmail. I still
> need to express a way to ONLY get the LABEL subfolder synched
> (Gmail/LABEL --> NORMAL). A rewrite would not help since it will simply
> take ALL the subfolders and rewrite them.
> 
> The opposite way (e.g.,:
> folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail',
>                                                      '[Gmail]/Trash']
> )
> works fine but would be very cumbersome since I've got loads of labels
> defined in that Gmail account.
> 
> Is there perhaps a documentation available that explains all the
> configuration options (other than the example configuration file) in a
> bit more detail?

I don't know of any other resource, except of course the mailing list
archive.

Cheers,
Thomas


> 
> Thanks again, HeX
> 
> Den 25. feb. 2011 14:09, skrev HeX:
> > Thanks Thomas,
> > 
> > that definetly helped a lot. Still I'm mainly feeling like poking into a
> > black box with the different configuration settings.
> > 
> > One thing I'm particular curious about is why does the 'folderfilter'
> > statement work on both repos when it is defined only in one specific
> > repo definition. If this is the case should this option not belong into
> > the [Account xxx] section rather then the [Repository xxx] section. At
> > least this is more logically to me.
> > 
> > I just noticed that now that offlineimap is happily running along it is
> > generating duplicates in one of my accounts. But that's probably a bug
> > of version 6.2.0.2ubuntu1 (shipped with Ubuntu 10.10).
> > 
> > /HeX
> > 
> > PS: The other thing I'm still wondering is why I can't have a Gmail type
> > defined as "local". Actually the "local" term might not be the best for
> > synching two IMAPS directly anyway. My first try when setting up was
> > actually defining two remotes in the accounts section. But that failed.
> > 
> > 
> > 
> > Den 24. feb. 2011 18:37, skrev Thomas Kahle:
> >> Hi!
> >>
> >> On 15:58 Thu 24 Feb     , HeX wrote:
> >>> Dear all,
> >>>
> >>> I'm really struggling getting offlineimap to work the way I like it. So
> >>> far I could not really find the right documentation for this so perhaps
> >>> you can help me.
> >>>
> >>> My user case is the following. I like to sync one normal IMAP account
> >>> with a Gmail account. More accurately everything in the 'normal' account
> >>> should be synched to the Gmail account under a certain 'LABEL' (i.e.,
> >>> folder).
> >>>
> >>> My configuration looks like this:
> >>>
> >>> [general]
> >>> accounts = Test
> >>> ui = TTY.TTYUI
> >>>
> >>> [Account Test]
> >>> localrepository = NORMAL
> >>> remoterepository = Gmail
> >>>
> >>> [Repository NORMAL]
> >>> type = IMAP
> >>> remotehost = imap.example.org
> >>> remoteuser = foo
> >>> remotepass = ****
> >>> ssl = yes
> >>>
> >>> [Repository Gmail]
> >>> type = Gmail
> >>> remoteuser = foo
> >>> remotepass = ****
> >>> ssl = yes
> >>> realdelete = no
> >>> folderfilter = lambda foldername: foldername in  ['LABEL']
> >>
> >>
> >> Your usage of folderfilter is not doing what you intend to do, I think.
> >> With your setup offlineimap will ignore every folder except a folder
> >> called "LABEL".  I suppose there is no folder "LABEL" on the "NORMAL"
> >> account, so offlineimap does nothing.  What you are aiming at is a
> >> translation of folder names.  This can be done using auxilliary python
> >> code.
> >>
> >> This old mail might be a starting point for further research:
> >>
> >> http://article.gmane.org/gmane.mail.imap.offlineimap.general/2414/match=tomka
> >>
> >> Hope it helps,
> >> Thomas
> >>
> >>
> >>
> >>>
> >>>
> >>> Offlinemap works along but in the end both mail accounts stay the same.
> >>> I tried already swapping local and remote repository but local does not
> >>> like 'Gmail' as type (bug?). So I must be missing something obvious and
> >>> am more than happy of one could point out where I've failed miserably...
> >>>
> >>> Thanks,
> >>> HeX
> >>>
> >>> _______________________________________________
> >>> OfflineIMAP-project mailing list
> >>> OfflineIMAP-project at lists.alioth.debian.org
> >>> http://lists.alioth.debian.org/mailman/listinfo/offlineimap-project
> >>>
> >>> OfflineIMAP homepage: http://software.complete.org/offlineimap
> >>

-- 
Thomas Kahle
http://dev.gentoo.org/~tomka/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 316 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110225/9d41ace3/attachment-0001.sig>


More information about the OfflineIMAP-project mailing list