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 conversion

Discussion in 'E-mail Discussions' started by netrix37, Nov 29, 2006.

  1. netrix37

    netrix37 Member

    Joined:
    Jul 13, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Does CPanel provide any scripts to convert individual accounts from mbox to maildir? (They are moving from another host) It looks like /scripts/convert2maildir is only system wide. I've played with mb2md-3.20.pl available at http://batleth.sapienti-sat.org/projects/mb2md/ abd while this works it requires a lot of manual intervention. Taking into consideration the number of email accounts I'm trying to convert mb2md would not be optimal.
     
  2. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    I think the reason why the /scripts/convert2maildir is system wide, is that it not only converts the mailboxes, but also changes the POP3 server from the old cppop, to Courier. I think this is a (convert) all or nothing situation.
     
  3. 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
    I think Stefaans is correct, except maybe more so on the MTA, exim. How is the MTA (thats the SMTP service, exim on cpanel) suppose to know what mail format a particular account is using? If an account is using maildir and the MTA is set up for mailbox, then it won't create new message files correctly. Likewise, if an account is using mailbox and the MTA is set up to use maildir, then it won't append to the mailbox file correctly.

    This is probably also true for the POP3 service as well. I'm not sure if cppop will handle maildir or not. I believe Courier will handle mailbox and maildir, although cPanel may have it configured to only handle maildir.
     
  4. netrix37

    netrix37 Member

    Joined:
    Jul 13, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Thanks guys but I'm not sure I explained thoroughly. All the accounts are already in maildir format. What I'm trying to do is take a website backup from another host altogether (that uses mbox) and convert it to use the maildir format so the users will not lose their email. The system wide conversion has already happened so I was hoping there was a method for converting individual accounts via a cpanel script. mb2md works it would just be a *huge* pain to make it work across all the email accounts that particular user has.
     
  5. 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
    If an account is on a cpanel server with mbox, when it is transferred over to a different cpanel server with maildir, I believe the mail is automatically converted to maildir.
     
  6. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    Oh, I understand now ;) If it was me, I would use fetchmail in the shell to move the messages over.
     
  7. netrix37

    netrix37 Member

    Joined:
    Jul 13, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    sparek-3 - Can you give me an example of what you mean by transfered over? Originally I used the full site backup (that only root can install) which seemed to do a really sloppy job of converting as some of the mail was available (usually the root inbox) but specifically folders were almost always broken in some form or another.

    Stefaans - Can you elaborate a little?


    My problem is more than likely going to be these folders which unfortunately have all sorts of hideous names like "Angel's Files" or "MyFolder (Secret)" which I'm sure is not going to make things any easier. The clients are using SquirrelMail which apparently every user created folder has to have a file telling SM that the folder has been "subscribed" to before they can even view the folder/email which is just one more step.
     
  8. 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
    In my experience this has been done by the restorepkg process on the new server that converts everything over. If you use the Transfer Account feature in the WHM from the old (mbox) server and transfer to the new (maildir) server, the conversion process should go through.

    If you copy a backup from cpanel's daily backup process from the old server to the new server, then restore the account, the conversion should take place.

    If you have any cPanel backup (daily backup, cpmove file, user's backup file) and restore it on the new server, the conversion should take place.
     
  9. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    I would use fetchmail on the server where the mailboxes are being imported to. Fetchmail can then create a POP3 session with a mailbox on the remote server and deliver all messages to the new mailbox on the local server. I woudl then schedule fetchmail with cron so that it keeps on transferring messages for a few days until the domain transfer has propagated.

    For more info on fetchmail:
    * Wikipedia description: http://en.wikipedia.org/wiki/Fetchmail
    * Manual: http://www.fetchmail.info/fetchmail-man.html

    Good luck ;)
     
  10. fcsnc

    fcsnc Well-Known Member

    Joined:
    Mar 19, 2002
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    North Carolina
    netrix,
    I would be interested in knowing how this turned out. In particular, what kind(s) of MUA's (Outlook Express, Thunderbird, Outlook, Eudora, etc.) does the client use, and were the users able to figure out how to retrieve/store/find their email after the conversion?
     
Loading...

Share This Page