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.

migrating from mbox to maildir format

Discussion in 'E-mail Discussions' started by Chriz1977, May 8, 2007.

  1. Chriz1977

    Chriz1977 Well-Known Member

    Joined:
    Sep 18, 2006
    Messages:
    191
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    Can anyone explain how to do this? Is there a script in the /scripts directory to do it automatically?

    Cheers
    Chriz
     
  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
    /scripts/convert2maildir :)
     
  3. Chriz1977

    Chriz1977 Well-Known Member

    Joined:
    Sep 18, 2006
    Messages:
    191
    Likes Received:
    0
    Trophy Points:
    16
    Is there anything i should consider before doing this? (IE will it effect the mail in the current queue?)

    Cheers
     
  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
    It won't affect the email in the queue. While the migration is in progress all in or outbound email is queued until the process completes. Clients won't be able to POP their email or use IMAP until their account has been migrated during the process (they'll get an error).

    The only thing to check is that your OS update procedure works correctly, e.g. yum or up2date. Also, bear in mind that it can take some time to run, anything from a few minutes to several hours depending on the amount of email within the mail accounts.
     
  5. cyanide

    cyanide Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Toronto, Canada
    I'm about to do this as well.
    I heard that email sitting on the server in someone's account may be lost during the conversion.
    Is this true?

    Also, are there any impacts involved, when transferring accounts from a server with mbox to a server with maildir?
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Never heard of or seen that happen.
    They should automatically be converted. If not, you can simply run the conversion script again and it will convert those emails to maildir.
     
  7. tweakservers

    tweakservers Well-Known Member

    Joined:
    Mar 30, 2006
    Messages:
    379
    Likes Received:
    0
    Trophy Points:
    16
    usually I will run it for 2 or 3 times for the convert scripts to make sure all the email account is fully converted.It's better than later user's email account fail to work and you realize their email account is not fully converted ;)
     
  8. cyanide

    cyanide Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Toronto, Canada
    Thanks for the reply, chirpy...
    I must've mis-read about emails disappearing.

    We did a test run on a client who volunteered to be a guinea pig.
    He had about 2,000 emails in webmail and we transferred his account from a server with mbox to one that had maildir and wouldn't you know the emails transferred nicely.
    Actually, watching the transfer occur, we saw it saying mail conversion. - nice!
     
  9. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    The most common problem we see is people with tons of accounts killing the conversion in mid process because they didn't realize it would take four hours (because they have SOOO MANY mailboxes). Generally this results in a 1/2 converted disaster.

    In short, after you start it, don't kill it midway though.
     
  10. cyanide

    cyanide Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Toronto, Canada
    Ahhh, maybe that's what I was reading.

    thanks for that, Nick
     
  11. ebizindia

    ebizindia Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    72
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Kolkata, India
    cPanel Access Level:
    Root Administrator
    How to getmails from maildir format to mbox?

    I converted my server to maildir format and all hell broke loose. People are complaining about lost mails, not being able to access the POP mails where as Horde is working Ok etc.

    I ran convert2maildir again and again, everytime it showed me an option to convert the rest of the accounts and I went ahead. finding that it will never finish, I gave up and wanted to revert back to mbox format, thinking that I may not be ready for prime time yet.

    Now I find that we have lost all the mails in all the accounts. Maildir to mbox format transfer does not recover the mails.

    Please help - what is the way out? I need to get the emails in the various directories (cur, new etc) back to the regular mailbox. Can this be done for all or at least for some domains?

    One more question: There is an option to restore mails in convert2maildir (I had backed upthe mails before the conversion). Can I restore this backup for a few domains and not the full server?

    Thanks in advance
     
  12. judosensei

    judosensei Member

    Joined:
    May 31, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Arlington VA
    Is it recommended?

    Is it recommended? (migrating from mbox to maildir format)

    Where can I learn more about the reasons to do it?
     
  13. Cristian99

    Cristian99 Active Member

    Joined:
    Jun 17, 2005
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    i don't like convert from MBOX to maildir for these problems

    1) with maildir, customer will have 1/2 space free (mbox= 10 mb maildir=20 Mb)
    2) into webmail customer will have a lot of file and not simply a single page with email
    3) cutomer will have a lot of dir and subdir
     
  14. erick_paper

    erick_paper Well-Known Member

    Joined:
    Apr 19, 2005
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    Sorry for the dense question but why do people migrate from mbox to maildir formats? What're the pros and cons? I did search (e.g., http://en.wikipedia.org/wiki/Maildir) and it's not a very non-technical introduction. For my laymen ears, it would be good to hear adjectives such as faster, better, more secure, less troublesome, less spammable...etc etc. Not just that it's technically superb. Thanks for any thoughts!
     
  15. 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
    Well for starters, mbox will be phased out by cPanel 12. Better to bite the bullet now and just convert. I know that in itself is a weak reason, so here's a strong reason: maildir is much faster and less troublesome than mbox!

    Downsides to converting though include no longer being able to use mail clients that rely on mbox format (such as Pine on shell or NeoMail/OpenWebmail for Webmail). However, if neither of these affect you, by all means please convert to maildir :).
     
  16. 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
    Maildir stores each individual message in its own file. Whereas mbox stores all messages in a single file.

    Imagine a situation where you have a mail account, it has 5000 messages in it and is very large. Say you want to read message #4991. With mbox, because all of the messages are stored in a single file (an mbox file) the e-mail client would have to seek through and read practically the entire mbox mail file to get to message #4991. This results in a lot of resources being used and a lot of load put on the server, just to read one message.

    With maildir, if you want to read message #4991. The mail client doesn't have to load a huge mbox mail file and seek through it to find the message. Instead the client just has to find the file associated with message #4991, open it and there you go. Much less resource usage and much less load put on the server.

    That's a laymens term definition. On top of that, I think Courier (the IMAP and POP3 service used when you use Maildir) is just a lot more efficient than the cppop and imapd server that is used when using mbox.
     
  17. erick_paper

    erick_paper Well-Known Member

    Joined:
    Apr 19, 2005
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    Thanks. Just above your message is a frantic cry for help or someone who has tried to switch. Is it safe to move? I have a pretty standard thing, but I really cannot afford to lose emails or get involved with client hassles. So just want to confirm.


    I don't use these clients. I use Squirrelmail for everything online, and all my clients (49 domains) are used to being forced into it. Horde was just too bloated, and Neomail butt-ugly. Squirrelmail has been customized to look fairly pleasing. I presume SQMail should work with Maildir as well?

    As for client-side email software, I need to support Eudora, Outlook, OE, and whatever it is that Mac folks use. These would work?
     
  18. erick_paper

    erick_paper Well-Known Member

    Joined:
    Apr 19, 2005
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16

    Yes, but isn't this relevant mostly with IMAP type stuff, or if the mail has been left on the server? What if my clients almost always download their email into their own computers?
     
  19. 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
    During the Training Seminar this past week, the techs and developers explained that the most common issue with failed conversions is people get impatient and then try to halt the process, leaving a half-converted server. This conversion process can be incredibly slow, especially if there's many e-mails on the server. If you are patient and let the process take as long as it needs (a bare minimum of several hours - on a server with many accounts with thousands of messages in them, this can easily take over a day) then you likely wont encounter any issues.

    Of course, if you do encounter any issues, our techs will be glad to assist you with those issues.


    Client-side isn't an issue as the maildir/mbox format is irrelevant, clients instead rely on POP/IMAP which we support on both maildir and mbox (though it seems many prefer our implementation on maildir).

    Regarding SQMail, it would be logical that it works with Maildir as well, but I'm not certain about that.
     
  20. 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
    Incoming mail will be queued until the conversion is complete, at which time it will be delivered.
     
Loading...

Share This Page