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 09-30-2008, 05:51 AM
New Member
 
Posts: 4
Default Successful Migration from Courier-MTA

Hi.

I have been running a small ISP service (1000 users, 200 domains, 500 aliases) with Courier on Debian x86 with MySQL authentication for many years and although this was quite stable for me I decided that the old Dual server was about ready for the scrapheap.

I had already installed a test zimbra server and I liked it so I decided to get a new Quad Core server with lots of RAM and disk. We have standardized on Debian and I decided to install Debian AMD64. As there was no binary package, I also thought it would be good experience to compile from source (what an experience that was!). You might tell by now that I don't like making things easy for myself!

Once I had zimbra up and running I turned my attention to migrating users. This was all stored in a MySQL but over the years was migrated from various sources and ages of machines. The oldest was a circa 1993 /etc/passwd file from SCO Unix! (and yes I also installed that one).

This meant that the passwd table was a mixture of DES/SHA and clear text passwords. All of the scripts are ones I found and modified, I have kept any copyright etc intact if applicable. First is a simple script to export the users to a zmprov format file (called mysql2zmprov.pl). I tried various ways to import encrypted passwords but prefixing these with {crypt} didn't work for me. I ended up using a direct ldap password change but more about this later!

I also grabbed the aliases2zmprov.pl file and modified it for the courier aliases format. This wasn't 100 percent but it managed to get a fairly usable import. this created all domains, aliases and distribution lists (some of the disribution list membership was screwed-up but a quick skim of the file fixed that).

I then decided that the easiest way to get the users with encrypted passwords over was to change their password temporarilly to a known value and then run imapsync on them. I modified to mysql2zmprov.pl script to create setPassword commands for users with encrypted passwords.

Once I had run imapsync after much head-scratching, I managed to create an ldif file (see script import.php) which takes a csv file of the format username,crypt-password and then import it into zimbra with the following command:

/opt/zimbra/openldap/bin/ldapmodify -x -H ldap://servername:389 -D "uid=zimbra,cn=admins,cn=zimbra" -W < exported.ldif

Once I had restarted zimbra then all users could login fine (I am still not sure why zmprov setPassword user@domain.com "{crypt}encrypted-password" didn't work for me?????

As I said by using an unsupported platform (Debian AMD64) I probably made this quite a lot more difficult for myself but I certainly learnt a lot about zimbra in the process!!!!

Cheers

phil
Attached Files
File Type: zip mysql2zmprov.zip (3.3 KB, 15 views)
Reply With Quote
  #2 (permalink)  
Old 09-30-2008, 09:01 AM
Moderator
 
Posts: 6,237
Default

Glad you made the switch - someone created a Installing Zimbra 5.0 on Debian 4.0 Etch AMD64 - Zimbra :: Wiki (tricking 32-bit packages) but if you'd like to document the process from source in Building FRANKLIN on Debian - Zimbra :: Wiki (empty at the moment) I'm sure others will appreciate it!
Reply With Quote
  #3 (permalink)  
Old 09-30-2008, 09:44 AM
New Member
 
Posts: 4
Default

Hi thanks for the welcome....

Yes I saw the wiki about AMD64 installation but I didn't want to use a 32 bit zimbra on a 64 bit O/S. I will try to remember what I did to get it working.....

Unfortunately I appear to have broken access to the wiki from my main PC??? It is fine from any other machine but I guess I must have a dodgy cookie or something as whenever I try to access it from this PC I get "HTTP 500 Internal Server Error". I assumed that it was down until I was able to access if from another machine....

Cheers

Phil
Reply With Quote
  #4 (permalink)  
Old 09-30-2008, 12:03 PM
New Member
 
Posts: 4
Default

I have added the wiki page as suggested, hopefully it was fresh enough in my mind!

Please take a look and let me know what you think.

Thanks

Phil
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.