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.

Old server- MBOX new server MDIR Should I?

Discussion in 'General Discussion' started by nerdzoll, Dec 29, 2006.

  1. nerdzoll

    nerdzoll Well-Known Member

    Joined:
    Oct 4, 2004
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Hi Guys,
    I have around 5 clients who I am migrating to a new server and I am decomissionning the old server.
    However a couple of these clients have rather large (2GB+) MBOX Imap directories.

    I am thinking this would be a good time to upgrade them to MDIR. However I am wondering, if i set the new server to use MDIR, when I import a cpanel backup will it automatically upgrade the email directories from the old mbox to mdir format. And will ALL the mail come across or is there a chance I might lose some?

    Or is there a better way to do this?
    Regards
    Stuart
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Yes, when restoring cpmove backups, the new server will automatically convert any
    mbox mailbox files to maildir mail folders and corresponding message files.

    If the new server is much faster than the old server, I'd wait to do the conversion
    until after the accounts have been moved to the new server and let the new
    server do all the converting with better performance.

    If there isn't much difference between the server speeds then I would probably
    convert the old server to maildir before moving the accounts to make things easy.

    To answer your question though, the restore backup function does convert mail
    while restoring the backup if you want to just to do it at that time.
     
  3. nerdzoll

    nerdzoll Well-Known Member

    Joined:
    Oct 4, 2004
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Heya

    Hi Spiral,
    Thanks very much for that.
    Oddly enough the new server is actually lower spec (slower cpu) to save money, nowhere near as many people being hosted on it. However as it happens I will probably convert them on there anyway as the speed difference is negligible.

    Is there any chance of email loss doing this? And last question, if I set the server to use MDIR and the backup restore fails, can I change it back, and reload the backup with MBOX (lol yes I am paranoied, I just like my options open).
    Cheers
    Stuart
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If you restore an account that was using mbox to a server with maildir and it isn't converted you can simply run:

    /scripts/convert2maildir

    and there's an option to redo the convert on any mbox files. You shouldn't lose any email using that method.
     
  5. nerdzoll

    nerdzoll Well-Known Member

    Joined:
    Oct 4, 2004
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Heya Chirpy,
    Thanks heaps for that. Greatly appreciated.
    Regards
    Stuart
     
  6. vishwas

    vishwas Well-Known Member

    Joined:
    Feb 9, 2004
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Front of PC
    One query

    Hello,,

    I dont want to convert all clients mails into maildir is it possible to convert only specific user.

    -Regards,
     
  7. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    No. This is because mbox and maildir use different storage methodologies. Exim (MTA) and your POP server (cppop or courier) need to be able to understand these different storage methods.

    The mbox format stores messages in a single file for a mailbox. The maildir format stores files into a specific directory, each message as its own file. The MTA needs to know how to write these files. When mail for domain.com arrives at the server and is delivered to that individual account, does it open a single mbox file or does it create a new file in the mail directory? If you have some accounts as maildir and some accounts as mbox, then the MTA would not know. I suppose you could patch or make special configuration for Exim to handle mail in a particular way based on the domain name that the message is being sent to. But generally speaking, the MTA needs to handle all incoming messages the same.

    The same is also true for the POP3 server (and the IMAP server for that matter). When you connect to the POP3 server, how does it handle the reading of mail? If the set up is maildir then it would read individual files in a specific directory, if its mbox it would read one single file. The cppop server will not read maildir formats (I don't think). Systems that use maildir use Courier as the POP3 server because it can read maildirs. Again, I suppose you could patch the Courier program to act differently based on certain domain names, but you would have to compile Courier yourself and this really goes beyond the scope of cPanel.

    So basically, the entire system needs to be one or the other. It either needs to be a mbox system or a maildir system so that the MTA and POP3/IMAP servers can act accordingly.
     
Loading...

Share This Page