Results 1 to 3 of 3

Thread: IDs for the system folders?

Hybrid View

  1. #1
    Join Date
    Nov 2011
    Posts
    5
    Rep Power
    4

    Default [Solved] IDs for the system folders?

    Hi!

    I would like to know if there is a way to identify system folders (ex: inbox, sent items, etc.) in Zimbra. After having a closer look, it seems to me that they have an ID lower or equal to 16? Are the IDs always the same for system folders, regardless of language (ex: Japanese mailbox)? If IDs cannot be relied upon, how can we reliably identify which folders are system folder.

    Thanks in advance for your answer,
    Ralf
    Last edited by Ralf.Smith; 11-02-2011 at 10:58 AM.

  2. #2
    Join Date
    Dec 2006
    Location
    Minneapolis MN
    Posts
    777
    Rep Power
    9

    Default

    These are the folder id's that are defined in the source code:

    Code:
    public static final int ID_FOLDER_USER_ROOT = 1;
        public static final int ID_FOLDER_INBOX     = 2;
        public static final int ID_FOLDER_TRASH     = 3;
        public static final int ID_FOLDER_SPAM      = 4;
        public static final int ID_FOLDER_SENT      = 5;
        public static final int ID_FOLDER_DRAFTS    = 6;
        public static final int ID_FOLDER_CONTACTS  = 7;
        public static final int ID_FOLDER_TAGS      = 8;
        public static final int ID_FOLDER_CONVERSATIONS = 9;
        public static final int ID_FOLDER_CALENDAR  = 10;
        public static final int ID_FOLDER_ROOT      = 11;
        public static final int ID_FOLDER_NOTEBOOK  = 12;      // no longer created in new mailboxes since Helix (bug 39647).  old mailboxes may still contain a system folder with id 12
        public static final int ID_FOLDER_AUTO_CONTACTS = 13;
        public static final int ID_FOLDER_IM_LOGS   = 14;
        public static final int ID_FOLDER_TASKS     = 15;
        public static final int ID_FOLDER_BRIEFCASE = 16;
    and the code where they are created, showing their names:

    Code:
    Folder root = Folder.create(ID_FOLDER_ROOT, this, null, "ROOT",     hidden, MailItem.TYPE_UNKNOWN,      0, MailItem.DEFAULT_COLOR_RGB, null, null);
            Folder.create(ID_FOLDER_TAGS,          this, root, "Tags",          hidden, MailItem.TYPE_TAG,          0, MailItem.DEFAULT_COLOR_RGB, null, null);
            Folder.create(ID_FOLDER_CONVERSATIONS, this, root, "Conversations", hidden, MailItem.TYPE_CONVERSATION, 0, MailItem.DEFAULT_COLOR_RGB, null, null);
    
            byte system = Folder.FOLDER_IS_IMMUTABLE;
            Folder userRoot = Folder.create(ID_FOLDER_USER_ROOT, this, root, "USER_ROOT", system, MailItem.TYPE_UNKNOWN, 0, MailItem.DEFAULT_COLOR_RGB, null, null);
            Folder.create(ID_FOLDER_INBOX,    this, userRoot, "Inbox",    system, MailItem.TYPE_MESSAGE, 0, MailItem.DEFAULT_COLOR_RGB, null, null);
            Folder.create(ID_FOLDER_TRASH,    this, userRoot, "Trash",    system, MailItem.TYPE_UNKNOWN, 0, MailItem.DEFAULT_COLOR_RGB, null, null);
            Folder.create(ID_FOLDER_SPAM,     this, userRoot, "Junk",     system, MailItem.TYPE_MESSAGE, 0, MailItem.DEFAULT_COLOR_RGB, null, null);
            Folder.create(ID_FOLDER_SENT,     this, userRoot, "Sent",     system, MailItem.TYPE_MESSAGE, 0, MailItem.DEFAULT_COLOR_RGB, null, null);
            Folder.create(ID_FOLDER_DRAFTS,   this, userRoot, "Drafts",   system, MailItem.TYPE_MESSAGE, 0, MailItem.DEFAULT_COLOR_RGB, null, null);
            Folder.create(ID_FOLDER_CONTACTS, this, userRoot, "Contacts", system, MailItem.TYPE_CONTACT, 0, MailItem.DEFAULT_COLOR_RGB, null, null);
            Folder.create(ID_FOLDER_CALENDAR, this, userRoot, "Calendar", system, MailItem.TYPE_APPOINTMENT, Flag.BITMASK_CHECKED, MailItem.DEFAULT_COLOR_RGB, null, null);
            Folder.create(ID_FOLDER_TASKS,    this, userRoot, "Tasks",    system, MailItem.TYPE_TASK,        Flag.BITMASK_CHECKED, MailItem.DEFAULT_COLOR_RGB, null, null);
            Folder.create(ID_FOLDER_AUTO_CONTACTS, this, userRoot, "Emailed Contacts", system, MailItem.TYPE_CONTACT, 0, MailItem.DEFAULT_COLOR_RGB, null, null);
            Folder.create(ID_FOLDER_IM_LOGS,  this, userRoot, "Chats",    system, MailItem.TYPE_MESSAGE, 0, MailItem.DEFAULT_COLOR_RGB, null, null);
            Folder.create(ID_FOLDER_BRIEFCASE, this, userRoot, "Briefcase", system, MailItem.TYPE_DOCUMENT, 0, MailItem.DEFAULT_COLOR_RGB, null, null);
    So that being said, I don't think they are likely to just decide to change things around.
    01 Networks, LLC / Cybernetik.net
    Zimbra NE and OSS Cloud Hosting
    Shared Web Hosting
    Consulting Services

  3. #3
    Join Date
    Nov 2011
    Posts
    5
    Rep Power
    4

    Default

    Awsome!
    Thank you for your quick answer.

Similar Threads

  1. Replies: 7
    Last Post: 02-13-2013, 02:36 AM
  2. Replies: 0
    Last Post: 10-31-2011, 08:20 AM
  3. .pst migration issues
    By jimklein in forum Migration
    Replies: 13
    Last Post: 02-16-2009, 01:55 AM
  4. [SOLVED] Mailserver down when send file attach of 50Mb
    By ZMilton in forum Administrators
    Replies: 20
    Last Post: 04-10-2008, 12:44 PM
  5. system failure: getDirectContext
    By avisser in forum Installation
    Replies: 3
    Last Post: 10-12-2005, 06:32 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •