Downloading Sent folder at every sync

Daniel Shahaf d.s at daniel.shahaf.name
Tue Aug 9 15:10:30 BST 2011


Sebastian Spaeth wrote on Tue, Aug 09, 2011 at 15:45:05 +0200:
> On Mon, 8 Aug 2011 21:12:42 -0700, Lucas David-Roesler wrote:
> > > nametrans = lambda folder: re.sub('\s+', '', re.sub('(.+)(\\.)(.+)',
> > >> '\\1_\\3', re.sub('(^.{1})', '.\\1', re.sub('.*Important$', 'Important',
> > >> re.sub('.*Trash$', 'Trash', re.sub('.*Drafts$', 'Drafts', re.sub('.*Sent
> > >> Mail$', 'Sent', re.sub('.*Starred$', 'Starred', re.sub('.*All Mail$',
> > >> 'Archive', re.sub('^(INBOX)', ' ', folder))))))))))
> 
> One thing that seems weird is that you have nametrans
> '.*Sent Mail$' -> 'Sent'
> which could potentially match multiple folders on the remote side. And
> this would IMHO cause problems. If you have 2 folders on the Gmail side
> that end with "Sent Mail", you would sync them one after the other into
> the local "Sent" folder or somesuch
> 
> nametrans does not allow a n:1 mapping of folders (where n>1).
> 

Would an error be raised at runtime if such a (bogus) configuration is
detected?

> Sebastian





More information about the OfflineIMAP-project mailing list