Hi Preston, Hi all,

I'm still archiving mails (product is out and running), but I got to some
strange trouble.
I use SOAP to query for new mails to be archived and switch to IMAP to
fetch these. To co-relate the folders from SOAP to IMAP I use the ID of
the folders. That works with over 99% of all mailboxes.
Now here's the problem with some mailboxes, the IDs are messed up. here
is an extract of the output of my testing program: ( Users own Folders
removed to protect his data)

Folders seen by SOAP: (foldername folderID foldertype)
<Username> 6.MS1DOM.MS1PO. Root
Checklist 1A.MS1DOM.MS1PO. Checklist
Mailbox 7.MS1DOM.MS1PO. Mailbox
Cabinet C.MS1DOM.MS1PO. Cabinet
Sent Items 19.MS1DOM.MS1PO. SentItems
Calendar A.MS1DOM.MS1PO. Calendar
Contacts 1B.MS1DOM.MS1PO. Contacts
Documents 10.MS1DOM.MS1PO. Documents
Authored 11.MS1DOM.MS1PO. Query
Default Library 12.MS1DOM.MS1PO. Query
Work In Progress D.MS1DOM.MS1PO. Draft
Trash 9.MS1DOM.MS1PO. Trash

RootFolder: 6.MS1DOM.MS1PO.><Username>
Mailboxfolder: 7.MS1DOM.MS1PO.>Mailbox
SentFolder: 19.MS1DOM.MS1PO.>Sent Items
CalendarFolder: A.MS1DOM.MS1PO.>Calendar
JunkFolder: =>

Folders seen by IMAP:
10.MS1DOM.MS1PO. In Progress
44C4BB4B.MS1DOM.MS1PO.100.16B3538.1.E4D.1=Sent Items

Checking correlation
6.MS1DOM.MS1PO. "<Username>" ""
1A.MS1DOM.MS1PO. "Checklist" "Checklist"
7.MS1DOM.MS1PO. "Mailbox" "INBOX"
C.MS1DOM.MS1PO. "Cabinet" "Cabinet"
44C4BB4B.MS1DOM.MS1PO.100.16B3538.1.E4D.1 "Doku" "Sent Items"
1B.MS1DOM.MS1PO. "Contacts" ""
10.MS1DOM.MS1PO. "Documents" "Work In Progress"
11.MS1DOM.MS1PO. "Authored" ""
12.MS1DOM.MS1PO. "Default Library" ""
D.MS1DOM.MS1PO. "Work In Progress" "Trash"
9.MS1DOM.MS1PO. "Trash" ""

The first list was created by getFoldersListRequest (the lines outlining
the systemfolders have been created with the type flag of the entries),
the second by IMAP list with XGWDISPMODE ON that outputs the FolderID
with the folder structure.
The thrird list shows the correlation sorted by ID. You can see that
there is a Problem with the sent Items folder. For SOAP the SentItems
folder has the ID of 19.*, the folder with ID 19.* in IMAP is the
Calendar folder. (I have to use the name to select a folder in IMAP).

I have another example of an mailbox, where all folders and IDs have been
mixed, but I can't publish that here, it would offer to much private data
of my customer (Preston: I can sent it with personal mail if you want).

Remember: These are only a few exceptions, I'm currently archiving around
10000 mailboxes at diffrent customers. My code works for all others.

Thanks for any help