|
From: Tim C. <ful...@do...> - 2002-09-16 14:12:12
|
On Fri, 13 Sep 2002 no...@so... wrote:
> I have extremely complex archives with subfolders and sub-subfolders. I've
> as yet been unable to craft a .mailsync file that does the right thing.
>
> The current rev has the interesting and annoying behavior:
>
> For each new subfolder, copy messages from remote to local.
> Then copy all messages seen for all folders up to this point
> from local to remote.
>
> So:
>
> Remote:
>
> Able
> 1 able
> 2 able
> Baker
> 1 baker
> 2 baker
>
> Will mutilate Remote to become:
>
> Able
> 1 able
> 2 able
> Baker
> 1 baker
> 2 baker
> 1 able
> 2 able
>
> ----
>
> Is recursion SUPPOSED to work? Or must I create separate
> non-recursing store entries for each subfolder?
Recursion is supposed to work. It has the following limitations, though:
* It must be supported by your imap server.
* You do it by ending your pattern with % instead of *. This is the
syntax for local files; some imap servers use the same convention, but it
isn't part of the spec, so you have to find the server docs or experiment.
* Config file syntax limitations mean that you have to choose one root
directory and synchronize all subfolders of that directory (per channel).
I don't understand your able/baker example. I do notice some interesting
spacing; if this means you have spaces in your mailbox names, then that
could be your problem. More likely, the problem is that mailsync is not
getting the mailbox names exactly right. For this, mailsync has a "list
mode" which you get by specifying a store on the command line (instead of
a channel). So you could try:
% mailsync Testing
able
able/baker
% mailsync l-Testing
able
able/baker
If there is any difference at all in these two results, you will get lots
of duplicate messages.
If the only difference is the delimiter character, and this is what's
causing problems, then I'm very sad because I thought I fixed that bug.
:-(
> The relevant lines from my .mailsync are:
>
> store Testing {
> server {po12.mit.edu/user=wdc}
> ref {po12.mit.edu}
> pat INBOX.Testing.*
> prefix INBOX.Testing.
> }
>
> store l-Testing {
> pat MESSAGE_ARCHIVE/local-Testing/*
> prefix MESSAGE_ARCHIVE/local-Testing/
> }
>
> channel save-Testing Testing l-Testing {
> msinfo MESSAGE_ARCHIVE/local-Testing/msinfo
> }
This looks correct to me, except you need to use % instead of * for
recursion.
Tim
|