On Mon, 24 Feb 2003, Hein Roehrig wrote:

> tomas pospisek <[EMAIL PROTECTED]> writes:
>
> > On Fri, 21 Feb 2003, tomas pospisek wrote:
> >
> >> mailsync's task is to synchronize two mailboxes. There are mail
> >> repositories that support mailboxes with submailboxes *and* messages
> >> (courier IMAP, Maildir) but most not.
> >>
> >> Is there an eays and/or elegant way to find out whether a mailbox
> >> may contain subboxes *and* messages at the same time?
>
> The IMAP LIST response has name attributes \Noinferiors (mailbox
> cannot have submailboxes) and \Noselect (mailbox cannot have
> messages). I don't know how you get to that information from the
> C-Client library.

On Mon, 24 Feb 2003, Mark Crispin wrote:

> On Mon, 24 Feb 2003, tomas pospisek wrote:
> > Since this request hasn't generated a mailstorm, here's a follow up:
> > is there a way to access/find/catch the "Hello" String somewhere in c-client:
> >     "OK Courier-IMAP ready. ..."
>
> The only thing that such a test would be good for would be to determine if
> the server does not comply with IMAP.  Courier is very non-compliant, and
> you should always use the "/loser" flag in the host specification of the
> mailbox name with a Courier server to avoid problems.
>
> > I could filter on that string and check the currently used driver in order
> > to determine whether or not the store I'm accessing has the ability to
> > create submailboxes _and_ messages at the same time inside mailboxes.
> >
> > Comments? Am I heading in a completely wrong direction?
>
> Yes, you are heading in the wrong direction.
>
> Use the mail_list() function which returns the mailbox attributes
> including noselect and noinferiors state.

Very well, thanks. I'm using these now and syncing seems to work pretty
well.

However - since I'm gettin a prefix and pattern from the user that tells
me what he wants to sync - if I deterministically want to find out
whether I can or I can not create a certain hierarchy level ("directory")
I'd need to know about its parent's flags - or if that one doesn't exist
its grand parent's etc. At one point I'll cross the prefix boundary, and
since neither IMAP nor c-client guarantee, that the whole mailstore is a
rooted tree there seems not to be a deterministic way to verify whether I
can or can not create a subdir/hierarchy level except for trying and
checking for failure?

Other than that thanks a lot, I'm amazed how well c-client works.

One other thing - the docu lists MESSAGECACHE.uid as a top-level element,
but it's not - it's "private". Which also makes it inaccessible from C++
(C++ keyword conflict!).
*t

--
                                 will kill for oil

Reply via email to