Double nametrans required in a imap-imap-Sync?
Sebastian at SSpaeth.de
Wed May 4 19:34:57 BST 2011
On Wed, 04 May 2011 20:11:45 +0200, Johannes Kastl <ojkastl at gmx.de> wrote:
> As the 1blu-imap-server does not allow subfolders of the INBOX, I put a
> nametrans-rule into the offlineimaprc, that puts all the folders from
> the GMX account into a folder "GMX" on the 1blu server. Seems to work...
> nametrans = lambda foldername: \
> re.sub('^', 'GMX/', foldername)
I am not sure this works if 1blu doesn't allow Subfolders. What you are
doing here is to just prefix "GMX/" to all your folders (make sure that
your hierarchy separator is actually "/" and not "."). You will still
get subfolders, ie
INBOX -> GMX/INBOX
INBOX.Trash -> GMX/INBOX.Trash
(as I said, most servers will use "." as folder separator).
nametrans rules cannot "merge" several folders into one folder, they can
merely transpose each folder to a different name. What you can do is to
transpose a subfolder hierarchy into a flat hierarchy, e.g.
nametrans = lambda name: 'GMX-' + name.replace('.','-')
(or similar, untested)
I am not sure I have understood if this is what you are actually trying
> Im not sure if I need to put another nametrans-rule into the
> 1blu-repo-section, to avoid syncing the 1blu-INBOX into the GMX INBOX.
No, you only need the nametrans option in the remote repository.
> Where do the mails from the 1blu-server end up? I just put some there to
> test it, and I'd just like to know.
Err, in the GMX folders ? :-). In your example of
re.sub('^', 'GMX/', foldername)
it would sync all emails in "GMX/blahh" to "blahh" (given that "blahh"
already exists on GMX, it won't sync the folder if it doesn't exist yet
on the remote server).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the OfflineIMAP-project