INSERT organizational_units VALUES (1, 'foobar', 'com');
INSERT organizational_units VALUES (2, 'foobar', 'net');
INSERT servers VALUES (1, 1, 1, 402);
INSERT servers VALUES (2, 2, 1, 402);
INSERT public_folders VALUES (1, 1, 'c4898b91-da9d-4f3e-9ae4-8a8bd5051b89');
INSERT public_folders VALUES (2, 1, 'd4898b91-da9d-4f3e-9ae4-8a8bd5051b89');

INSERT mailboxes VALUES (1, 1, 17438782182108692481, 'user1@foobar.com', '13c54881-02f6-4ade-ba7d-8b28c5f638c6', 'd87292c1-1bc3-4370-a734-98b559b69a52', 1, 1, NULL, 'en_US');
INSERT mailboxes_properties VALUES (1, 'PidTagDisplayName', 'OpenChange Mailbox: user1@foobar.com'), (1, 'PidTagAccess', '63'), (1, 'PidTagCreationTime', '130268260180000000'),(1, 'PidTagFolderType', '1'),(1, 'PidTagLastModificationTime', '130268260180000000'),(1, 'PidTagRights', '2043'),(1, 'PidTagSubFolders', 'TRUE'),(1, 'PidTagMessageClass', 'IPC'),(1, 'PidTagIpmDraftsEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABoAAA=='),(1, 'PidTagIpmAppointmentEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABsAAA=='),(1, 'PidTagIpmContactEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABwAAA=='),(1, 'PidTagIpmTaskEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAAB0AAA=='),(1, 'PidTagIpmNoteEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAAB4AAA=='),(1, 'PidTagIpmJournalEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAAB8AAA=='),(1, 'PidTagRemindersOnlineEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABIAAA=='),(1, 'PidTagChangeNumber', '4683743612465315841');
INSERT mailboxes VALUES (2, 2, 17438782182108692481, 'user1@foobar.net', '23c54881-02f6-4ade-ba7d-8b28c5f638c6', 'f87292c1-1bc3-4370-a734-98b559b69a52', 1, 1, NULL, 'en_US');
INSERT mailboxes_properties VALUES (2, 'PidTagDisplayName', 'OpenChange Mailbox: user1@foobar.net'), (2, 'PidTagAccess', '63'), (2, 'PidTagCreationTime', '130268260180000000'),(2, 'PidTagFolderType', '1'),(2, 'PidTagLastModificationTime', '130268260180000000'),(2, 'PidTagRights', '2043'),(2, 'PidTagSubFolders', 'TRUE'),(2, 'PidTagMessageClass', 'IPC'),(2, 'PidTagIpmDraftsEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABoAAA=='),(2, 'PidTagIpmAppointmentEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABsAAA=='),(2, 'PidTagIpmContactEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABwAAA=='),(2, 'PidTagIpmTaskEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAAB0AAA=='),(2, 'PidTagIpmNoteEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAAB4AAA=='),(2, 'PidTagIpmJournalEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAAB8AAA=='),(2, 'PidTagRemindersOnlineEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABIAAA=='),(2, 'PidTagChangeNumber', '4683743612465315841');

INSERT INTO folders VALUES (0, 1, 72057594037927937, 'publicfolder', NULL, NULL, NULL, 1, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Public Folder Root');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '2');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '72057594037927937');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'TRUE');
INSERT INTO folders VALUES (0, 2, 72057594037927937, 'publicfolder', NULL, NULL, NULL, 1, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Public Folder Root');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '2');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '72057594037927937');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'TRUE');

INSERT INTO folders VALUES (0, 1, 18087300528450043905, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 17438782182108692481) as t), 1, 10, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'To-Do');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '2017612633061982209');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Task');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '2');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 18087300528450043905, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 17438782182108692481) as t), 1, 10, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'To-Do');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '2017612633061982209');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Task');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '2');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 17871127746336260097, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 17438782182108692481) as t), 1, 7, 'sogo://user1%40foobar.com@fallback/0x1000000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Views');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1585267068834414593');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 17871127746336260097, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 17438782182108692481) as t), 1, 7, 'sogo://user1%40foobar.net@fallback/0x1000000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Views');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1585267068834414593');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 18015242934412115969, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 17438782182108692481) as t), 1, 9, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Reminders');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1873497444986126337');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'Outlook.Reminder');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '2');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 18015242934412115969, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 17438782182108692481) as t), 1, 9, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Reminders');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1873497444986126337');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'Outlook.Reminder');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '2');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 649644246248194049, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 17438782182108692481) as t), 1, NULL, 'sogo://user1%40foobar.com@fallback/0x2100000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Freebusy Data');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '4971973988617027585');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '5044031582654955521');
INSERT INTO folders VALUES (0, 2, 649644246248194049, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 17438782182108692481) as t), 1, NULL, 'sogo://user1%40foobar.net@fallback/0x2100000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Freebusy Data');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '4971973988617027585');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '5044031582654955521');

INSERT INTO folders VALUES (0, 1, 17727012558260404225, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 17438782182108692481) as t), 1, 5, 'sogo://user1%40foobar.com@fallback/0xe00000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Schedule');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1297036692682702849');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 17727012558260404225, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 17438782182108692481) as t), 1, 5, 'sogo://user1%40foobar.net@fallback/0xe00000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Schedule');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1297036692682702849');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 17582897370184548353, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 17438782182108692481) as t), 1, 3, 'sogo://user1%40foobar.com@fallback/0xc00000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Spooler Queue');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1008806316530991105');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 17582897370184548353, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 17438782182108692481) as t), 1, 3, 'sogo://user1%40foobar.net@fallback/0xc00000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Spooler Queue');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1008806316530991105');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 17510839776146620417, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 17438782182108692481) as t), 1, 2, 'sogo://user1%40foobar.com@fallback/0xb00000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Deferred Action');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '864691128455135233');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 17510839776146620417, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 17438782182108692481) as t), 1, 2, 'sogo://user1%40foobar.net@fallback/0xb00000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Deferred Action');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '864691128455135233');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 18231415716525899777, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 17438782182108692481) as t), 1, 12, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Top of Information Store');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '2305843009213693953');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubfolders', 'TRUE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 18231415716525899777, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 17438782182108692481) as t), 1, 12, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Top of Information Store');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '2305843009213693953');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubfolders', 'TRUE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 18303473310563827713, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, 13, 'sogo://user1%40foobar.com:user1%40foobar.com@mail/folderINBOX/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagIpmContactEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABwAAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRemindersOnlineEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABIAAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagIpmJournalEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAAB8AAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagIpmAppointmentEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABsAAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'INBOX');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '4755801206503243777');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagIpmDraftsEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABoAAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagIpmTaskEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAAB0AAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagIpmNoteEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAAB4AAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagMessageClass', 'All');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagMessageClass', 'IPM');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagMessageClass', 'Report.IPM');
INSERT INTO folders VALUES (0, 2, 18303473310563827713, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, 13, 'sogo://user1%40foobar.net:user1%40foobar.net@mail/folderINBOX/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagIpmContactEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABwAAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRemindersOnlineEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABIAAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagIpmJournalEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAAB8AAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagIpmAppointmentEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABsAAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'INBOX');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '4755801206503243777');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagIpmDraftsEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAABoAAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagIpmTaskEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAAB0AAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagIpmNoteEntryId', 'AAAAAIFIxRP2At5Kun2LKMX2OMYBAMGSctjDG3BDpzSYtVm2mlIAAAAAAB4AAA==');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagMessageClass', 'All');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagMessageClass', 'IPM');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagMessageClass', 'Report.IPM');

INSERT INTO folders VALUES (0, 1, 10233304253292609537, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, NULL, 'sogo://user1%40foobar.com:user1%40foobar.com@mail/folderFUCK/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'FUCK');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130282261650000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '14843864371813154817');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130282261650000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 10233304253292609537, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, NULL, 'sogo://user1%40foobar.net:user1%40foobar.net@mail/folderFUCK/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'FUCK');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130282261650000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '14843864371813154817');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130282261650000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 17799070152298332161, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 17438782182108692481) as t), 1, 6, 'sogo://user1%40foobar.com@fallback/0xf00000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Finder');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1441151880758558721');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 17799070152298332161, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 17438782182108692481) as t), 1, 6, 'sogo://user1%40foobar.net@fallback/0xf00000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Finder');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1441151880758558721');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 216172782113783809, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 72057594037927937) as t), 1, 3, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'NON_IPM_SUBTREE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '4');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '216172782113783809');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'TRUE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 216172782113783809, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 72057594037927937) as t), 1, 3, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'NON_IPM_SUBTREE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '4');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '216172782113783809');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'TRUE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 433471464134410241, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, 4, 'sogo://user1%40foobar.com@notes/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.StickyNote');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Notes');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '4179340454199820289');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT INTO folders VALUES (0, 2, 433471464134410241, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, 4, 'sogo://user1%40foobar.net@notes/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.StickyNote');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Notes');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '4179340454199820289');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');

INSERT INTO folders VALUES (0, 1, 648518346341351425, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 216172782113783809) as t), 1, -1, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Events Root');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '648518346341351425');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'FALSE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 648518346341351425, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 216172782113783809) as t), 1, -1, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Events Root');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '648518346341351425');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'FALSE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 288230376151711745, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 216172782113783809) as t), 1, 4, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'EFORMS REGISTRY');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '288230376151711745');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'FALSE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 288230376151711745, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 216172782113783809) as t), 1, 4, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'EFORMS REGISTRY');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '288230376151711745');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'FALSE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 17654954964222476289, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 17438782182108692481) as t), 1, 4, 'sogo://user1%40foobar.com@fallback/0xd00000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Common Views');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1152921504606846977');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 17654954964222476289, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 17438782182108692481) as t), 1, 4, 'sogo://user1%40foobar.net@fallback/0xd00000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Common Views');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1152921504606846977');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 289356276058554369, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, 2, 'sogo://user1%40foobar.com@contacts/personal/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Contact');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Personal Address Book');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '3602879701896396801');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT INTO folders VALUES (0, 2, 289356276058554369, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, 2, 'sogo://user1%40foobar.net@contacts/personal/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Contact');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Personal Address Book');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '3602879701896396801');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');

INSERT INTO folders VALUES (0, 1, 144115188075855873, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 72057594037927937) as t), 1, 2, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'IPM_SUBTREE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '144115188075855873');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'FALSE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 144115188075855873, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 72057594037927937) as t), 1, 2, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'IPM_SUBTREE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '144115188075855873');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'FALSE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 17943185340374188033, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 17438782182108692481) as t), 1, 8, 'sogo://user1%40foobar.com@fallback/0x1100000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Shortcuts');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1729382256910270465');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 17943185340374188033, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 17438782182108692481) as t), 1, 8, 'sogo://user1%40foobar.net@fallback/0x1100000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Shortcuts');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '1729382256910270465');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 18159358122487971841, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 17438782182108692481) as t), 1, 11, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Tracked Mail Processing');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '2161727821137838081');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '2');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 18159358122487971841, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 17438782182108692481) as t), 1, 11, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Tracked Mail Processing');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '2161727821137838081');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '2');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 361413870096482305, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, 3, 'sogo://user1%40foobar.com@tasks/personal/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Task');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Personal Calendar (t)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '3891110078048108545');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT INTO folders VALUES (0, 2, 361413870096482305, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, 3, 'sogo://user1%40foobar.net@tasks/personal/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Task');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Personal Calendar (t)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '3891110078048108545');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');

INSERT INTO folders VALUES (0, 1, 14124414331340718081, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, NULL, 'sogo://user1%40foobar.com:user1%40foobar.com@mail/folderA3/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'A3');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130282287560000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '576742227280134145');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130282287560000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 14124414331340718081, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, NULL, 'sogo://user1%40foobar.net:user1%40foobar.net@mail/folderA3/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'A3');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130282287560000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '576742227280134145');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130282287560000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 18375530904601755649, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, 14, 'sogo://user1%40foobar.com:user1%40foobar.com@outbox/folderDrafts/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Outbox');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '2594073385365405697');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT INTO folders VALUES (0, 2, 18375530904601755649, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, 14, 'sogo://user1%40foobar.net:user1%40foobar.net@outbox/folderDrafts/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Outbox');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '2594073385365405697');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');

INSERT INTO folders VALUES (0, 1, 13980299143264862209, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, NULL, 'sogo://user1%40foobar.com:user1%40foobar.com@mail/folderA1/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'A1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130282287560000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '288511851128422401');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130282287560000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 13980299143264862209, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, NULL, 'sogo://user1%40foobar.net:user1%40foobar.net@mail/folderA1/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'A1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130282287560000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '288511851128422401');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130282287560000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 505529058172338177, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, 5, 'sogo://user1%40foobar.com@fallback/0x1f00000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Journal');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Journal');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '4467570830351532033');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT INTO folders VALUES (0, 2, 605529058172338177, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, 5, 'sogo://user1%40foobar.net@fallback/0x1f00000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Journal');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Journal');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '4467570830351532033');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');

INSERT INTO folders VALUES (0, 1, 73183493944770561, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, 16, 'sogo://user1%40foobar.com@fallback/0x1900000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Deleted Items');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '2882303761517117441');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT INTO folders VALUES (0, 2, 73183493944770561, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, 16, 'sogo://user1%40foobar.net@fallback/0x1900000000000001/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Deleted Items');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '2882303761517117441');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');

INSERT INTO folders VALUES (0, 1, 14052356737302790145, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, NULL, 'sogo://user1%40foobar.com:user1%40foobar.com@mail/folderA2/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'A2');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130282287560000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '432627039204278273');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130282287560000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 14052356737302790145, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, NULL, 'sogo://user1%40foobar.net:user1%40foobar.net@mail/folderA2/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'A2');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130282287560000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '432627039204278273');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130282287560000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 1125899906842625, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, 15, 'sogo://user1%40foobar.com:user1%40foobar.com@mail/folderSent/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Sent');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '2738188573441261569');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT INTO folders VALUES (0, 2, 2125899906842625, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, 15, 'sogo://user1%40foobar.net:user1%40foobar.net@mail/folderSent/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Sent');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '2738188573441261569');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');

INSERT INTO folders VALUES (0, 1, 577586652210266113, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, NULL, 'sogo://user1%40foobar.com:user1%40foobar.com@mail/folderSpam/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Spam');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '4899916394579099649');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 577586652210266113, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, NULL, 'sogo://user1%40foobar.net:user1%40foobar.net@mail/folderSpam/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Spam');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '4899916394579099649');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 145241087982698497, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, 0, 'sogo://user1%40foobar.com:user1%40foobar.com@mail/folderDrafts/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Drafts');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '3026418949592973313');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT INTO folders VALUES (0, 2, 145241087982698497, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, 0, 'sogo://user1%40foobar.net:user1%40foobar.net@mail/folderDrafts/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Drafts');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '3026418949592973313');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');

INSERT INTO folders VALUES (0, 1, 504403158265495553, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 216172782113783809) as t), 1, 5, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'SCHEDULE+ FREE BUSY');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '504403158265495553');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'TRUE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 720575940379279361, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 216172782113783809) as t), 1, 5, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'SCHEDULE+ FREE BUSY');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '720575940379279361');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'TRUE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 217298682020626433, 'systemfolder', 1, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 18231415716525899777) as t), 1, 1, 'sogo://user1%40foobar.com@calendar/personal/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Appointment');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Personal Calendar (c)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '3314649325744685057');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');
INSERT INTO folders VALUES (0, 2, 217298682020626433, 'systemfolder', 2, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.id = f.mailbox_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 18231415716525899777) as t), 1, 1, 'sogo://user1%40foobar.net@calendar/personal/');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Appointment');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagRights', '2043');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130268260180000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentUnreadCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContentCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAccess', '63');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'Personal Calendar (c)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '3314649325744685057');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderType', '1');

INSERT INTO folders VALUES (0, 1, 360287970189639681, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 216172782113783809) as t), 1, 6, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'OFFLINE ADDRESS BOOK');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '360287970189639681');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'TRUE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 360287970189639681, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 216172782113783809) as t), 1, 6, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'OFFLINE ADDRESS BOOK');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '1');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '360287970189639681');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'TRUE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 576460752303423489, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 504403158265495553) as t), 1, 8, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'EX:/o=first organization/ou=first administrative group');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '576460752303423489');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'FALSE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 576460752303423489, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 720575940379279361) as t), 1, 8, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', 'EX:/o=first organization/ou=first administrative group');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '576460752303423489');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'FALSE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO folders VALUES (0, 1, 432345564227567617, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 360287970189639681) as t), 1, 9, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', '/o=First Organization/cn=addrlists/cn=oabs/cn=Default Offline Address Book');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '432345564227567617');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'FALSE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');
INSERT INTO folders VALUES (0, 2, 432345564227567617, 'publicfolder', NULL, (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 360287970189639681) as t), 1, 9, NULL);
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagDisplayName', '/o=First Organization/cn=addrlists/cn=oabs/cn=Default Offline Address Book');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeHidden', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagFolderChildCount', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagCreationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagChangeNumber', '432345564227567617');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeReadOnly', '0');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagContainerClass', 'IPF.Note (check this)');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagLastModificationTime', '130264095410000000');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagSubFolders', 'FALSE');
INSERT folders_properties VALUES (LAST_INSERT_ID(), 'PidTagAttributeSystem', '0');

INSERT INTO messages VALUES (0, 1, 2522015791327477762, 'systemMessage', (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 145241087982698497) as t), 1, 'Sample message on system folder');
INSERT messages_properties VALUES (LAST_INSERT_ID(), 'PidTagHasNamedProperties', '0');

INSERT INTO messages VALUES (0, 1, 2522015791327477761, 'systemMessage', (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.com' WHERE f.folder_id = 576460752303423489) as t), 1, 'USER-/CN=RECIPIENTS/CN=user1%40foobar.com');
INSERT messages_properties VALUES (LAST_INSERT_ID(), 'PidTagHasNamedProperties', '0');


INSERT INTO messages VALUES (0, 2, 2522015791327477762, 'systemMessage', (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 145241087982698497) as t), 2, 'Another message on system folder');
INSERT messages_properties VALUES (LAST_INSERT_ID(), 'PidTagHasNamedProperties', '0');

INSERT INTO messages VALUES (0, 2, 2522015791327477761, 'systemMessage', (SELECT id FROM (SELECT f.id FROM folders f JOIN mailboxes m ON m.ou_id = f.ou_id AND m.name = 'user1@foobar.net' WHERE f.folder_id = 576460752303423489) as t), 2, 'USER-/CN=RECIPIENTS/CN=user1%40foobar.net');
INSERT messages_properties VALUES (LAST_INSERT_ID(), 'PidTagHasNamedProperties', '0');
