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.

mbox to maildir - questions

Discussion in 'E-mail Discussions' started by Kheldin, Dec 11, 2007.

  1. Kheldin

    Kheldin Member

    Joined:
    Dec 5, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hello all!

    I currently have a Fedora 6 server running Sendmail and Dovecot using the mbox format. I probably have about 300+ email accounts, totaling about 2GB (just the email). I am about to migrate to a CentOS + cPanel server using Exim and Courier.

    I've already read through the forums here on how to convert from mbox to maildir, but it seems all the info suggests that I am doing this on the same server... that is simply converting an already setup cPanel install using mbox to a maildir. This isn't my case as you can see.

    Basically, this is a fresh server setup with cPanel, and I need to migrate all the mail (mbox format) from my Fedora server over to this. My questions are..

    Do I need to add all the email accounts FIRST in cPanel before uploading all the mbox mail files and attempting to convert them?

    Which script would I use in this scenario.. the convert2maildir or the mb2md one? Does it matter?

    Thanks in advance for any advice and help.

    Cheers!
     
  2. 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
    The script /scripts/convert2maildir will use the mb2md script as part of the conversion process.

    At this time, you don't need to convert prior to moving the mail over. However, you should convert shortly after the mail has been migrated.

    Note that cPanel 11 still has support for mbox, though it is highly recommended you use maildir instead. However, you can migrate the mbox files to their appropriate locations on a cPanel server (mail is typically stored in ~/mail/ and ~/mail/email@address.com/). Then you can run /scripts/convert2maildir to convert things to maildir.

    With 2GB of mail, the process can take a while. There's a few FAQs about the conversion process on these forums. However, the main thing to remember is that even if the process appears to be stuck/frozen, just let it do its thing. Do not terminate the script until it has finished processing everything, as this tends to be the cause of the vast majority of conversion issues.

    Just a head's up about a few things during the process: mail will be queued rather than delivered while the conversion is in progress, users will be unable to access their email during the conversion process and after the conversion process, POP3 users will likely need to re-download all their email.
     
  3. Kheldin

    Kheldin Member

    Joined:
    Dec 5, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the respone!

    Another quick question regarding this.

    Do I need to set these email addresses up first on the new server running cPanel? Or can I simply copy all the old /var/spool/mail/username (from my Fedora server) files into the same directory on the new server running cPanel.. then run the conversion?

    My Fedora setup is using system accounts for email addresses, so although everyone has a /home directory, there is no mail folder within them. The inbox is the raw /var/spool/mail file. I ask because it seems that cPanel creates email addresses within the domain owners home directory mail/ folder.

    I'm sure the script is really slick, I just wonder how is it going to know that /var/spool/mail/joeblow needs to be converted and moved to /home/domainXowner/mail and not /home/domainYowner/mail ??

    ** Reading your reply again, are you saying that I have to move the mbox file from my old server, to the appropriate ~/mail folder on the new server first, then run the conversion? I assume this is what you mean which means I WILL have to create all the email accounts first, copy the mbox file for joeblow@domainX.com into the mail/joeblow@domainX.com directory, then run the conversion?

    Sorry for all the questions and confusion. I just want to make sure I have all the bases covered before I attempt a mail conversion like this.

    Thanks again!
     
  4. 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
    Correct, essentially you want it to be a cPanel system using mbox (as this is what /scripts/convert2maildir expects).
     
  5. Kheldin

    Kheldin Member

    Joined:
    Dec 5, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    OK.. One last question then.

    I stuck the spool file in the mail/ directory, and after the conversion, it pretty much changed the mbox file to a directory with all the mail inside. Thats great, but instead of putting it in the mail/cur folder (the inbox) it just made a folder inside the mail/ one called .username with all the mail in there. It wasn't a big deal cuz I simply copied what was in that direcorty to the mail/cur one and viola, now it's all in my inbox.

    But when I have over 300+ users, I really don't want to have to move all that mail. So my last question is, where exactely do I place this mbox file in the mail/ folder in order for it to put it in the inbox?

    I guess since I've never ran a cPanel setup with mbox, I really don't know where the mbox inbox is located.. I tried putting the mbox file in the mail/cur folder, then converting, but it left it alone and didnt do anything to it.
     
  6. 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
    Mbox was before my time (of helping people manage email formats), so I'm not sure on the precise naming scheme. Perhaps some of the more experienced individuals here may have some insight on that for you :).
     
  7. Kheldin

    Kheldin Member

    Joined:
    Dec 5, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Is there anyone that has a cPanel setup using mbox that could tell me where the inbox (mbox) file resides?
     
  8. koolcards

    koolcards Well-Known Member

    Joined:
    Oct 8, 2003
    Messages:
    146
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Tampa, Fl

    /home/<user name>/mail/inbox (default account)

    /home/<user name>/mail/inbox/<domain name>/<2nd email account>/inbox

    /home/<user name>/mail/inbox/<domain name>/<3rd email account>/inbox

    /home/<user name>/mail/inbox/<2nd domain name>/<another email account>/inbox
     
  9. Kheldin

    Kheldin Member

    Joined:
    Dec 5, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    That's exactly what I needed.

    Thank you so much!
     
Loading...

Share This Page