Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Migration

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-22-2010, 07:45 AM
Member
 
Posts: 11
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 03:25 AM..
Reply With Quote
  #2 (permalink)  
Old 01-22-2010, 07:54 AM
Moderator
 
Posts: 2,207
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...
Reply With Quote
  #3 (permalink)  
Old 01-22-2010, 07:58 AM
Zimbra Consultant & Moderator
 
Posts: 20,319
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
Reply With Quote
  #4 (permalink)  
Old 01-22-2010, 07:59 AM
Member
 
Posts: 11
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 ...
Reply With Quote
  #5 (permalink)  
Old 01-22-2010, 07:59 AM
Member
 
Posts: 11
Default

Quote:
Originally Posted by phoenix View Post
By Zimbra, do you mean Zimbra Collaboration Suite or Zimbra Desktop?
Zimbra Collaboration Suite
Reply With Quote
  #6 (permalink)  
Old 01-22-2010, 08:48 AM
Member
 
Posts: 11
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.
Reply With Quote
  #7 (permalink)  
Old 01-23-2010, 03:25 AM
Member
 
Posts: 11
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 03:52 AM..
Reply With Quote
  #8 (permalink)  
Old 01-23-2010, 06:04 AM
Moderator
 
Posts: 2,207
Default

Excellent, this is great!

Did you put it in the wiki too?
Reply With Quote
  #9 (permalink)  
Old 01-24-2010, 09:44 AM
Member
 
Posts: 11
Default

Yes I added this here:
Building Zimbra on Gentoo - Zimbra :: Wiki
Reply With Quote
  #10 (permalink)  
Old 01-24-2010, 09:46 AM
Zimbra Consultant & Moderator
 
Posts: 20,319
Default

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


Bill
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.