The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

what is the difference b/w maildir and mailbox's directory structure

Discussion in 'E-mail Discussions' started by cPanelDavidG, Oct 2, 2008.

  1. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    /scripts/convert2maildir will inform you if you are using maildir or mbox. This script is an interactive script.
     
  2. chuza

    chuza Well-Known Member

    Joined:
    Jul 4, 2008
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    What is the difference between maildir and the old format. How to identify which is currently implemented. Anyone can tell me how to easily identify it from the directory structure. I know mailbox can be converted to /scripts/converttomaildir
     
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Maildir will have each individual e-mail message stored as a file. In each mail account's folder on your file system you will see three directory: new, cur, and tmp.

    As new message arrive at the mail account, the files for those messages are stored in the new folder.

    Mailbox works on a single file structure. All e-mail messages are stored in a single file on the account, usually inbox.

    In terms of IMAP folders, on mailbox these folders are actually new files like inbox but would be named the folder's name and again would contain all of the e-mail messages in that "folder".

    With Maildir new "folders" are subfolders on the mail account, which again have the new, cur, and tmp directories beneath them.

    The advantage with maildir is in the case of a large mail account with many megabytes of messages. Instead of loading up the entire inbox file or mailbox file, each individual message can be opened separately because each individual message is a file on the file system.
     
  4. chuza

    chuza Well-Known Member

    Joined:
    Jul 4, 2008
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Thanks man, will check to see if I can understand it more. However, isnt /scripts/convert2maildir a server level scripts that just runs indiscriminately on all accounts on the server. Can you tell me how to convert one account through this script to maildir while keeping others unaffected in old style. What do you mean by interactive, thats what I also wana know in clearer terms, an example perhaps.
     
    #4 chuza, Oct 5, 2008
    Last edited: Oct 5, 2008
  5. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    You can't convert just one account to Maildir (I suppose you could, but it will mess up mail delivery on the server either for that account or for the other accounts on the server).

    Maildir and Mbox are completely different structures. Exim, the Mail Transport Agent on cPanel has to know how to store messages that come into the server. Think of it as the middle man between receiving e-mail messages and putting those messages in the proper mail account on the server.

    If the server is configured as an Mbox server, then Exim will write the messages into an inbox file on the appropriate mail account.

    If the server is configured as a Maildir server, then Exim will create a file in the appropriate directory structure of the mail account.

    Exim can only work in one of these ways. It can't work for both. It has no way of knowing that Mail Account A is mbox, while Mail Account B is maildir.

    Not to mention that you again run into this same problem with your POP3 and IMAP services. How do they know which structure to read if you are using a mixed set?

    I won't say that its impossible to use a mixture of Maildir and Mbox on a server, but it would be a configuration nightmare, and hugely inefficient. Its not something that cPanel is going to support.
     
Loading...

Share This Page