need some documentation on folderfilter and nametrans

Sebastian Spaeth Sebastian at
Thu Dec 1 21:08:41 GMT 2011

On Fri, 25 Nov 2011 11:56:56 -0800, Payal <payal at> wrote:
> Hi all,
> I would appreciate some docs on folderfilter and nametrans. Some

> examples will also help. I couldn't understand much from the official
> readme file.
> I have 2 machines - A and B. I want to sync mails currently in A's
> Maildir/ into B's Maildir/old-mails/ and not in INBOX.

? I don't really get that setup, but apparently what you want to do is:

on repoA:
folderfilter = lambda foldername: foldername.startswith('Maildir')
nametrans = lambda foldername: re.sub('^Maildir\.', 'Maildir\old-mail',

(This selects all folders below "Maildir/*" and translates them to

and on repoB:
folderfilter = lambda foldername: foldername.startswith('Maildir/old-mails')

(to make sure, only folders that we want to look at are synchronized).

But offlineimap is so flexible, there will be a hundred ways to achieve
the same solution.

Does this help?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <>

More information about the OfflineIMAP-project mailing list