Results 1 to 10 of 10

Thread: [SOLVED] qmail (vpopmail) accounts to zimbra

  1. #1
    teamnet is offline Member
    Join Date
    Jan 2010
    Posts
    11
    Rep Power
    5

    Default [SOLVED] qmail (vpopmail) accounts to zimbra

    Hello,

    I just finished installing zimbra on Gentoo. It works great.
    On one other server I have about 300 user accounts with user names and password stored in vpopmail database and table. How to import this user accounts into zimbra? I do not need user messages I just need there passwords and accounts. And one more thing passwords are encrypted.

    I was looking all around wiki and forums and I found imapsync. It is working great for user messages from mailbox from one server to another. BUT THIS IS NOT WHAT I NEED.

    This is what I need: Qmail (vpopmail) acounts --->> Zimbra accounts
    Last edited by teamnet; 01-23-2010 at 04:25 AM.

  2. #2
    Klug's Avatar
    Klug is offline Moderator
    Join Date
    Mar 2006
    Location
    Beaucaire, France
    Posts
    2,316
    Rep Power
    13

    Default

    Did you look at the "migrations" wiki pages ?

    There are several migrations tools (none for vpopmail iirc) that can help you build you own tool...

  3. #3
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,473
    Rep Power
    56

    Default

    Quote Originally Posted by teamnet View Post
    Hello,

    I just finished installing zimbra on Gentoo. It works great.
    On one other server I have about 300 user accounts with user names and password stored in vpopmail database and table. How to import this user accounts into zimbra? I do not need user messages I just need there passwords and accounts. And one more thing passwords are encrypted.

    I was looking all around wiki and forums and I found imapsync. It is working great for user messages from mailbox from one server to another. BUT THIS IS NOT WHAT I NEED.

    This is what I need: Qmail (vpopmail) acounts --->> Zimbra accounts
    By Zimbra, do you mean Zimbra Collaboration Suite or Zimbra Desktop?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  4. #4
    teamnet is offline Member
    Join Date
    Jan 2010
    Posts
    11
    Rep Power
    5

    Default

    I was thing something like
    Migrating from Postfix and MySQL with bash - Zimbra :: Wiki

    I will try with that just to change that mysql tables etc ...

  5. #5
    teamnet is offline Member
    Join Date
    Jan 2010
    Posts
    11
    Rep Power
    5

    Default

    Quote Originally Posted by phoenix View Post
    By Zimbra, do you mean Zimbra Collaboration Suite or Zimbra Desktop?
    Zimbra Collaboration Suite

  6. #6
    teamnet is offline Member
    Join Date
    Jan 2010
    Posts
    11
    Rep Power
    5

    Default

    I like zimbra .... Using this: Migrating from Postfix and MySQL with bash - Zimbra :: Wiki I was able to export vpopmail accounts (user names, password etc). I tested it only for one account and it worked .... Now I have to do that for all accounts.

    Lunch break now ... I will come back soon with more results.

  7. #7
    teamnet is offline Member
    Join Date
    Jan 2010
    Posts
    11
    Rep Power
    5

    Default

    Thanks everyone. I finished this account migration. This is the script:
    PHP Code:
    #!/usr/bin/php

    // http://wiki.zimbra.com/index.php?title=Password_Migration
    // Modified migration script for gentoo+qmail+vpopmail
    //


    <?php
    /////////////////////////////////////////////////////////

    $user="user";
    $pass="password";
    $db="vpopmail";
    $table_mbox="vpopmail";
    $file="exported.sh";

    /////////////////////////////////////////////////////////
    echo "This script generates a bash script called: $file
    The script contains the commands to re-create the mail accounts on zimbra server.\n\n
    "
    ;

    $mydb mysql_connect('localhost',$user$pass) or die ('Error connecting to server');
    mysql_select_db($db);
    mysql_query("SET CHARACTER SET utf8");
    mysql_query("SET NAMES utf8");

    $query "SELECT pw_name,pw_domain,pw_passwd
                    FROM 
    $table_mbox";
    $dane mysql_query($query) or die ('Error during query for '.mysql_error());

    echo 
    "Writing to $file ...\n";
    $fh fopen($file"w");
    $sp '@';
    fwrite($fh"#!/bin/sh -x\n\n");

    while (
    $row mysql_fetch_array($daneMYSQL_NUM))
    {
        
    $data_mbox "zmprov ca ".$row[0]."".$sp."".$row[1]." dsfs123hsdyfgbsdgfbsd displayName '".$row[0]."'\n";
        
    $data_mbox .= "zmprov ma ".$row[0]."".$sp."".$row[1]." userPassword '{crypt}".$row[2]."'"."\n";
        
    fwrite($fh$data_mbox);
    }
    echo 
    "Done.";
    Once again thanks evryone ....
    Last edited by teamnet; 01-23-2010 at 04:52 AM.

  8. #8
    Klug's Avatar
    Klug is offline Moderator
    Join Date
    Mar 2006
    Location
    Beaucaire, France
    Posts
    2,316
    Rep Power
    13

    Default

    Excellent, this is great!

    Did you put it in the wiki too?

  9. #9
    teamnet is offline Member
    Join Date
    Jan 2010
    Posts
    11
    Rep Power
    5

  10. #10
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,473
    Rep Power
    56

    Default

    Quote Originally Posted by teamnet View Post
    Excellent script, thanks for putting it in the wiki.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Recover the mail after the crash HDD
    By MrSnaKe in forum Administrators
    Replies: 3
    Last Post: 12-02-2009, 04:38 AM
  2. Zimbra shutdowns every n hours.
    By Andrewb in forum Administrators
    Replies: 13
    Last Post: 08-14-2007, 08:55 AM
  3. 4.5 Upgrade failure
    By brained in forum Installation
    Replies: 9
    Last Post: 03-03-2007, 03:30 PM
  4. Replies: 8
    Last Post: 02-27-2007, 04:10 AM
  5. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 07:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •