[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [imapsync] --prefix2 & --delete2folders


From Gilles LAMIRAL <gilles dot lamiral at laposte dot net>
Subject Re: [imapsync] --prefix2 & --delete2folders
Date Mon, 13 Dec 2010 22:37:53 +0100

Hello,

> imapsync \
>     --delete2 --expunge2 --delete2folders
> 
> to do a kind of "pre-sync" in background to speedup then the real sync at the "d"-day. 
> The problem is that I would like to put everything in a subfolder on Host2, like for instance NEW; for this I added the option --prefix2 NEW. 

Where did you catch this --prefix2 trick? It's no good when there is also a prefix on host2.

The FAQ says (b for you):

2) To sync a complete account in a subfolder called FOO:

  a) Seperator is dot character "." and "INBOX" prefixes every folder

    --regextrans2 's/^INBOX(.*)/INBOX.FOO$1/'

  Or:

  b) Seperator is slash character "/" and there is no prefix

   --regextrans2 's#(.*)#FOO/$1#'

> But now if I sync, all folders on Host2 except the NEW one (incl. subfolders) will be deleted (because of the option --delete2folders).
> 
> Any idea how can solve my problem?

No, except don't use --delete2folders

I put option --delete2foldersonly regex in the TODO file.
In your case:

  --delete2foldersonly /^NEW/


-- 
Au revoir,                             09 51 84 42 42
Gilles Lamiral. France, Baulon (35580) 06 20 79 76 06