Anda di halaman 1dari 6

PENGALAMAN MIGRASI DARI MDAEMON 5.0.5 KE ZIMBRA 5.0.

18
- Versi Zimbra yang dipakai (http://appliance.vavai.com/zimbra.html):
Release 5.0.18_GA_3011.openSUSE_10.2_20090709094925 openSUSEUNKNOWN FOSS
edition
- Versi Mdaemon 5.0.5
Untuk migrasi dari Mdaemon 5.0.5 ke Zimbra Mail Server ada beberapa tahap, yaitu :
1. Installasi Zimbra Mail Server
2. Persiapan data akun dari Mdaemon (username, password)
3. Import accounts user
4. Installasi imapsync
5. Sinkronisasi data email
INSTALLASI ZIMBRA
Install zimbra mail server sesuai panduan yang ada di
http://mirror1.opensuse.or.id/addons/zimbra/tutorial-zimbra-appliance-virtualisasi.zip
SELESAI.
PERSIAPAN DATA AKUN MDAEMON
Dari beberapa referensi di web yang saya dapat, Mdaemon menyediakan fasilitas export
data accounts, dari MDConfig Accounts Exporting Export accounts info into comma
delimited file...
Tetapi pada versi 5.0.5 tidak dapat meng-export password dari tiap-tiap accounts.
Sebagai solusinya, saya membuat server Mdaemon baru di komputer lain dengan versi yang
lebih tinggi. Misalnya versi 11.
Daftar user Mdaemon berada di Drive:\Mdaemon\App\userlist.dat
Buka userlist Mdaemon lama dengan notepad atau text editor lain, copy-kan semua list user
ke userlist.dat Mdaemon versi terbaru. Simpan.
Jalankan prosedur Export accounts info into comma delimited file... seperti tertera di atas.
File berupa Accounts.csv berada di Drive:\MDaemon\APP\Accounts.csv
Edit file tersebut (accounts.csv) dengan spreadsheet, delete semua kolom kecuali kolom
username (lengkap dengan domain) dan password. Simpan dengan ekstensi csv.
SELESAI.
IMPORT ACCOUNTS USER
Akses ke zimbra admin https://nomor-ip:7071 kemudian login.
Klik menu account kemudian kita gunakan fasilitas Bulk Provisioning untuk import
accounts-account yang kita export dari Mdaemon tadi.
Jangan lupa pada saat edit accounts.csv ada 3 kolom yang harus ada.
- Username [at] domain
- Display Username
- Password
Import account-account tadi hingga selesai.
Kita sudah dapat login dengan account yang baru kita import, tetapi masih ada ganjalan
bahwa setiap user harus mengganti password pada saat pertama kali login ke Zimbra.
Solusinya, dari menu Account klik nama account edit unchek pada Paasword Must
change password.
Klik Save.

Tetapi jika account yang kita import banyak, maka kita bisa memaksa zimbra untuk uncheck
User Must Change Password tadi dengan perintah (sebagai user zimbra)
for i in `zmprov gaa`
do
zmprov ma $i zimbraPasswordMustChange FALSE
done
sumber : http://www.zimbra.com/forums/administrators/26885-how-uncheck-must-changepassword.html
PERSIAPAN IMPORT DATA EMAIL
INSTALLASI IMAPSYNC

Kita akan menggunakan program imapsync untuk menyinkronkan data email dari Mdaemon
ke Zimbra.
Sumber : http://wiki.zimbra.com/wiki/Guide_to_imapsync
login di mesin zimbra sebagai user biasa.
Buat script seperti dibawah ini, simpan dengan nama buildimapsync
chmod 755 buildimapsync
sudo ./buildimapsync
berasal dari http://wiki.zimbra.com/wiki/Guide_to_imapsync

script to download and build imapsync and all of the required packages
#!/bin/bash
#
#CopyLeft 2006 Steve Fink
#stevef-at-ublug.org
#
#This script will get all of
#the necessary packages to
#build imapsync 1.219 except OpenSSL
#OpenSSL & it's development libraries are
#required and OpenSSL is usually installed
#already so check and get the matching libraries
#
#you have to run this script as root
#or under sudo so it can do all the installs
#
#I don't recommend doing the extended tests
#they mostly fail anyway but imapsync still works
mkdir imapsync
cd imapsync
#
wget http://search.cpan.org/CPAN/authors/id/D/DC/DCONWAY/ParseRecDescent-1.94.tar.gz
tar xvfpz Parse-RecDescent-1.94.tar.gz
rm Parse-RecDescent-1.94.tar.gz
cd Parse-RecDescent-1.94/
perl Makefile.PL
make

make install
#
cd ..
wget http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/Digest-MD52.33.tar.gz
tar xvfpz Digest-MD5-2.33.tar.gz
rm Digest-MD5-2.33.tar.gz
cd Digest-MD5-2.33/
perl Makefile.PL
make
make install
#
cd ..
wget http://search.cpan.org/CPAN/authors/id/J/JS/JSTOWE/TermReadKey2.30.tar.gz
tar xvfpz TermReadKey-2.30.tar.gz
rm TermReadKey-2.30.tar.gz
cd TermReadKey-2.30/
perl Makefile.PL
make
make install
#
cd ..
wget http://search.cpan.org/CPAN/authors/id/A/AS/ASPA/IO-Socket-SSL0.81.tar.gz
tar xvfpz IO-Socket-SSL-0.81.tar.gz
rm IO-Socket-SSL-0.81.tar.gz
cd IO-Socket-SSL-0.81/
perl Makefile.PL
make
make install
#
cd ..
wget http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Net_SSLeay.pm1.30.tar.gz
tar xvfpz Net_SSLeay.pm-1.30.tar.gz
rm Net_SSLeay.pm-1.30.tar.gz
cd Net_SSLeay.pm-1.30/
./Makefile.PL -t
make install
#
cd ..
wget http://search.cpan.org/CPAN/authors/id/D/DJ/DJKERNEN/MailIMAPClient-2.2.9.tar.gz
tar xvfpz Mail-IMAPClient-2.2.9.tar.gz
rm Mail-IMAPClient-2.2.9.tar.gz
cd Mail-IMAPClient-2.2.9/
perl Makefile.PL
make
make test
make install
#
cd ..
wget http://www.linux-france.org/prj/imapsync/dist/imapsync-1.219.tgz
tar xvfpz imapsync-1.219.tgz
rm imapsync-1.219.tgz
cd imapsync-1.219/
perl -c imapsync
make install
#
cd ..
cd ..

rm -Rf imapsync/

Jangan lupa dengan kebutuhan script diatas yaitu common build tools, seperti make dan c
compiler.

SINKRONISASI DATA EMAIL

Untuk sinkronisasi 1 account memang mudah, cukup dengan menjalankan script berikut :
imapsync --buffersize 8192000 --nosyncacls --subscribe --syncinternaldates --noauthmd5
--host1 mail.domain.com.br --user1 jose.ferronato@domain.com.br --password1 12345678
--host2 zimbra.domain.com.br --user2 jose.ferronato --password2 12345678
sumber : http://www.zimbra.com/forums/administrators/18187-solved-import-mailboxpostfix-zimbra.html

Dari pengalaman saya, disini masih terjadi error pada cleartext untuk login. Zimbra belum
diaktifkan untuk cleartext-nya. Dari Global Setting IMAP Centang Enable clear text
login - Save.
Kemudian disable imap proxy

zmproxyctl status
zmprov gs server.domain.com | grep zimbraServiceEnabled
zmprov gs server.domain.com | grep zimbraServiceInstalled
zmprov gs fqdn.yourserver.com | grep -i clear
zmproxyctl stop
zmprov ms server.domain.com -zimbraServiceEnabled imapproxy
zmcontrol stop
zmcontrol start
zmprov -l ms server.domain.com zimbraPop3BindPort 110 zimbraPop3SSLBindPort
995 zimbraPop3ProxyBindPort 7110 zimbraPop3SSLProxyBindPort 7995
zimbraImapBindPort 143 zimbraImapSSLBindPort 993 zimbraImapProxyBindPort 7143
zimbraImapSSLProxyBindPort 7993
Sumber : https://www.zimbra.com/forums/installation/23132-can-t-enablecleartext-logins-imap-pop3.html

Untuk sinkronisasi banyak account maka script yang ada di


http://wiki.zimbra.com/wiki/Guide_to_imapsync#Batch_Processing dapat
menjadi referensi untuk melakukannya.
Pertama saya menyiapkan file csv yang berisi username, password (dari
Mdaemon), username, password (dari zimbra mail server).
Upload ke direktori /home/user/ -- folder dimana imapsync berada.
Buat script berikut, simpan dengan nama imapsyncbatch.
Chmod 755, kemudian jalankan ./imapsyncbatch

Batch Processing
#!/bin/bash
##Modified by Steve Fink stevef-at-ublug.org
##This IMAPSync Batch Script is used when you have different
##usernames on the Source and Destination servers
##(kinda what IMAPSync was intended for)

##the format for the user-list.csv file is


##sourceusername,sourcepassword,destinationusername,destinationpassword
## Get the info
while [ -z $infile ]; do
echo "What is the
read infile
done
while [ -z $host1 ]; do
echo "What is the
read host1
done
while [ -z $host2 ]; do
echo "What is the
read host2
done
while [ -z $domain ]; do
echo "What is the
read domain
done
while [ -z $logfile ]; do
echo "Where would
read logfile
done
if [ ! -f $infile ]
then
{
echo
echo
echo
read
}
fi

path to the input file?"

Source Host? (mail1.domain.com)"

Destination Host? (mail2.domain.com)"

Domain? (domain.com)"

you like the log? (synclog.txt)"

"The input file does not exist!"


""
"What is the path to the input file?"
infile

INPUTFILE=$infile
clear
echo ""
echo ""
echo "IMAPSync is about to begin using:"
echo "Input File $INPUTFILE"
echo "Source Host $host1"
echo "Destination Host $host2"
echo "Domain $domain"
echo "Log File $logfile"
echo ""
echo ""
echo "Is this information correct?"
echo "Press Enter to continue or"
echo "Hit CTRL+C to start over"
read wait
## Begin IMAPSync
date=`date +%X_-_%x`
echo "IMAPSync Logfile started @ $logfile"
echo "" >> $logfile
echo "------------------------------------" >> $logfile
echo "IMAPSync started.. $date" >> $logfile
echo "" >> $logfile
#Get rid of the commas

tr "," " " <$INPUTFILE | while read u1 p1 u2 p2


do
user=$u1"@"$domain
user2=$u2"@"$domain
echo "Syncing User $user to $user2"
date=`date +%X_-_%x`
echo "Start Syncing User $user to $user2"
echo "Starting $u1 $date" >> $logfile
imapsync $1 --nosyncacls --syncinternaldates

--noauthmd5\

--exclude "#KnownSpam" --exclude

"#FalsePositives" \

--exclude "Trash" --exclude "Deleted Items" \


--exclude "Deleted Messages" --exclude "Deleted"
\

--exclude "Sent" --exclude "Sent Items" \


--exclude "Sent Messages" \
--host1 $host1 --user1 "$user" --password1 "$p1"

--host2 $host2 --user2 "$user2" --password2

"$p2"

date=`date +%X_-_%x`
echo "User $user to $user2 done"
echo "Finished $user to $user2 $date" >>

$logfile

echo "" >> $logfile


done
date=`date +%X_-_%x`
echo "" >> $logfile
echo "IMAPSync Finished.. $date" >> $logfile
echo "------------------------------------" >> $logfile

Sumber : http://wiki.zimbra.com/wiki/Guide_to_imapsync#Batch_Processing
Disini saya melakukan sedikit perubahan dari script asli untuk mengatasi error yang muncul
pada saat imapsync berusaha login ke zimbra dengan menambahkan --noauthmd5 (cetak
tebal).

Jalankan imapsyncbatch
isi dengan benar lokasi list user dengan ekstensi csv tadi.
Isi alamat ip server Mdaemon
Isi alamat ip server Zimbra
Isi nama domain (kasus saya adalah nama domain HARUS SAMA, untuk nama
domain berbeda belum bisa)
kemudian tekan ENTER untuk memulai sinkronisasi.

Demikian tadi adalah langkah-langkah untuk migrasi Mail Server dari Mdaemon 5 ke
Zimbra Mail Server berdasarkan pengalaman pribadi saya.
Semoga bermanfaat.
danangboxmail@gmail.com

Anda mungkin juga menyukai