{"id":68,"date":"2023-12-13T12:07:11","date_gmt":"2023-12-13T05:07:11","guid":{"rendered":"https:\/\/ilmusekawan.web.id\/?p=68"},"modified":"2024-06-09T20:34:32","modified_gmt":"2024-06-09T13:34:32","slug":"migrasi-email-dari-iredmail-ke-zimbra-menggunakan-imapsync","status":"publish","type":"post","link":"https:\/\/ilmusekawan.web.id\/index.php\/2023\/12\/13\/migrasi-email-dari-iredmail-ke-zimbra-menggunakan-imapsync\/","title":{"rendered":"Migrasi Email Dari iRedMail Ke Zimbra Menggunakan IMAPSync"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Pengenalan<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.iredmail.org\/\">iRedMail<\/a> merupakan email server berbasis open source yang dapat diimplementasikan pada berbagai jenis distribusi linux seperti CentOS Stream, Rocky, Alma, Debian, Ubuntu, FreeBSD, OpenBSD. iRedMail mulai dikembangkan pada tahun 2007 dan sampai saat ini masih dikembangkan oleh komunitas. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Saya mendapatkan kesempatan untuk melakukan migrasi data email dari iRedMail ke Zimbra Network Edition. Proses migrasi akan menggunakan tools <a href=\"https:\/\/imapsync.lamiral.info\/\">IMAPSync<\/a>, tools <a href=\"https:\/\/imapsync.lamiral.info\/\">IMAPSync<\/a> sudah menjadi alternatif bagi yang ingin memindahkan data email dari platform satu ke platform lain secara gratis. <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong><em>Catatan penting <\/em><\/strong>:<\/p>\n<cite>IMAPSync hanya akan memindahkan data email saja.<\/cite><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Persiapan<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Sebelum melakukan migrasi, berikut beberapa hal yang perlu dipersiapkan terlebih dahulu.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Zimbra Network Edition 8.8.15<\/li>\n\n\n\n<li>iRedMail 1.1<\/li>\n\n\n\n<li>Tools IMAPSync.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Konfigurasi iRedMail<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Pada server iRedMail terdapat konfigurasi yang perlu dilakukan sebelum dilakukannya migrasi. <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ubah file <strong><em>dovecot.conf<\/em><\/strong> yang terdapat di direktori <strong><em>\/etc\/dovecot<\/em><\/strong>, agar mendukung PLAIN autentikasi. Ubah sehingga menjadi seperti berikut.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>ssl = yes  <strong><em>#line 47<\/em><\/strong>                                       \ndisable_plaintext_auth = no  <strong><em>#line 57<\/em><\/strong><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Restart service <strong><em>Dovecot<\/em><\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># systemctl restart dovecot<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Pastikan user sudah bisa login menggunakan PLAIN autentikasi. Pakai perintah berikut untuk memastikan user sudah bisa login menggunakan PLAIN autentikasi.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># telnet 192.168.1.166 143\n\nTrying 192.168.1.166...\nConnected to 192.168.1.166.\nEscape character is '^]'.\n* OK &#91;CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.\n<strong><em>a1 login user@domain.com password<\/em><\/strong>\na1 OK &#91;CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT\nSORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1\nCONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY\nMOVE SNIPPET=FUZZY SPECIAL-USE QUOTA ACL RIGHTS=texk] Logged in<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Membuat User Master pada <strong><em>Dovecot<\/em><\/strong> yang berfungsi seperti user admin pada zimbra. User Master ini digunakan untuk login saat proses IMAPSync dan dapat mengakses mailbox user.<\/li>\n\n\n\n<li>Masuk ke direktori <strong><em>\/etc\/dovecot<\/em><\/strong> ubah hak akses file <strong><em>dovecot-master-user<\/em><\/strong> menjadi seperti berikut.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># chmod 777 dovecot-master-user<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Jalankan perintah <strong><em>doveadm pw -s SSHA512<\/em><\/strong> untuk generate password dengan enkripsi SSHA 512.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># doveadm pw -s SSHA512\nEnter new password: masukkan_password_baru\nRetype new password: Masukkan_ulang_password_baru\n\n\/\/output password dengan enkripsi SSHA 512\n\n{SSHA512}B0VHomJaMk6aLXOPglgNgJtCUA8JRnOweAwJxRW6NPWSNZ25rG\/L6T05DJXH+t8WCQkemBilgkcEi6mq4Kadssivtts=<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Tambahkan user&nbsp; dan password yang telah digenerate pada file <strong><em>dovecot-master-user<\/em><\/strong> dengan format <em>username:password<\/em>.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>master@not-exist.com:{SSHA512}B0VHomJaMk6aLXOPglgNgJtCUA8JRnOweAwJxRW6NPWSNZ25rG\/L6T05DJXH+t8WCQkemBilgkcEi6mq4Kadssivtts=<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ubah hak akses file <strong><em>dovecot-master-user<\/em><\/strong> yang terdapat di <strong><em>\/etc\/dovecot <\/em><\/strong>ke dafault atau seperti semula.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># chmod 500 dovecot-master-user\n\nBaca juga artikel <a href=\"https:\/\/ilmusekawan.web.id\/index.php\/2023\/12\/13\/instalasi-redhat-8-di-virtualbox\/\">Instalasi RedHat 8 di Virtualbox<\/a><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Migrasi<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Proses lamanya migrasi tergantung besaran data email yang akan dimigrasikan. Tool IMAPSync akan dijalankan di server Zimbra.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install paket-paket dependency atau paket-paket pendukung agar IMAPSync dapat berjalan.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># sudo apt-get install  \\\nlibauthen-ntlm-perl     \\\nlibclass-load-perl      \\\nlibcrypt-openssl-rsa-perl \\\nlibcrypt-ssleay-perl    \\\nlibdata-uniqid-perl     \\\nlibdigest-hmac-perl     \\\nlibdist-checkconflicts-perl \\\nlibencode-imaputf7-perl     \\\nlibfile-copy-recursive-perl \\\nlibfile-tail-perl       \\\nlibio-compress-perl     \\\nlibio-socket-inet6-perl \\\nlibio-socket-ssl-perl   \\\nlibio-tee-perl          \\\nlibjson-webtoken-perl   \\\nlibmail-imapclient-perl \\\nlibmodule-scandeps-perl \\\nlibnet-dbus-perl        \\\nlibnet-ssleay-perl      \\\nlibpar-packer-perl      \\\nlibproc-processtable-perl \\\nlibreadonly-perl        \\\nlibregexp-common-perl   \\\nlibsys-meminfo-perl     \\\nlibterm-readkey-perl    \\\nlibtest-fatal-perl      \\\nlibtest-mock-guard-perl \\\nlibtest-mockobject-perl \\\nlibtest-pod-perl        \\\nlibtest-requires-perl   \\\nlibtest-simple-perl     \\\nlibunicode-string-perl  \\\nliburi-perl             \\\nlibtest-nowarnings-perl \\\nlibtest-deep-perl       \\\nlibtest-warn-perl       \\\nmake                    \\\ntime                    \\\ncpanminus -y<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Download IMAPSync package.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># wget -N https:\/\/imapsync.lamiral.info\/imapsync<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ubah permission pada file <strong>imapsync<\/strong> agar dapat di eksekusi sebagai bash script.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># chmod +x imapsync<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Pindahkan file <strong>imapsync<\/strong> ke folder <strong>\/usr\/bin<\/strong> agar file tersebut bisa dijalankan sebagai perintah system linux.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># cp imapsync \/usr\/bin\/<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Buat file <strong><em>scriptmigrasi.sh<\/em><\/strong> berisikan syntax berikut.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n##Modified by Steve Fink stevef-at-ublug.org\n##This IMAPSync Batch Script is used when you have different\n##usernames on the Source and Destination servers\n##(kinda what IMAPSync was intended for)\n##the format for the user-list.csv file is\n\n##sourceusername,sourcepassword,destinationusername,destinationpassword \n## Get the info\n                while &#91; -z $infile ]; do\n                        echo \"What is the path to the input file?\"\n                        read infile\n                done\n                while &#91; -z $host1 ]; do\n                        echo \"What is the Source Host? (mail1.domain.com)\"\n                        read host1\n                done\n                while &#91; -z $host2 ]; do\n                        echo \"What is the Destination Host? (mail2.domain.com)\"\n                        read host2\n                done\n                #while &#91; -z $domain ]; do\n                #       echo \"What is the Domain? (domain.com)\"\n                #       read domain\n                #done\n                while &#91; -z $logfile ]; do\n                        echo \"Where would you like the log? (synclog.txt)\"\n                        read logfile\n                done\n\n                if &#91; ! -f $infile ]; then\n                        echo \"The input file does not exist!\"\n                        echo \"\"\n                        echo \"What is the path to the input file?\"\n                        read infile\n                fi\n                INPUTFILE=$infile\n\n                clear\n                echo \"IMAPSync is about to begin using:\"\n                echo \"Input File $INPUTFILE\"\n                echo \"Source Host $host1\"\n                echo \"Destination Host $host2\"\n                #echo \"Domain $domain\"\n                echo \"Log File $logfile\"\n                echo \"\"\n                echo \"Is this information correct?\"\n                echo \"Press Enter to continue or\"\n                echo \"Hit CTRL+C to start over\"\n                read wait\n\n\n\n## Begin IMAPSync\n                date=`date +%X_-_%x`\n                echo \"IMAPSync Logfile started @ $logfile\"\n                echo \"\" &gt;&gt; $logfile\n                echo \"------------------------------------\" &gt;&gt; $logfile\n                echo \"IMAPSync started..  $date\" &gt;&gt; $logfile\n                echo \"\" &gt;&gt; $logfile\n\n        #Get rid of the commas\n                tr \",\" \" \" &lt;$INPUTFILE | while read u1 u2\n                        do\n                                user=$u1\n                                user2=$u2\n                                echo \"Syncing User $user to $user2\"\n                                date=`date +%X_-_%x`\n                                echo \"Start Syncing User $user to $user2\"\n                                echo \"Starting $u1 $date\" &gt;&gt; $logfile\n        imapsync --host1 $host1 --user1 $user*master@not-exist.com --password1 PASSWORD \\\n                                --host2 $host2 --user2 $user2 --authuser2 admin --password2 PASSWORD -ssl1 -ssl2 \\\n                                --nofoldersizes --nofoldersizesatend --skipsize --fast\n                                date=`date +%X_-_%x`\n                                echo \"User $user to $user2 done\"\n                                echo \"Finished $user to $user2 $date\" &gt;&gt; $logfile\n                                echo \"\" &gt;&gt; $logfile\n                        done\n\n                date=`date +%X_-_%x`\n                echo \"\" &gt;&gt; $logfile\n                echo \"IMAPSync Finished..  $date\" &gt;&gt; $logfile\n                echo \"------------------------------------\" &gt;&gt; $<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ubah permission pada file <strong><em>scriptmigrasi.sh <\/em><\/strong>agar dapat di eksekusi sebagai bash script.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># chmod +x <strong><em>scriptmigrasi.sh<\/em><\/strong><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Masukan informasi server iRedMail dan Zimbra serta masukan list user yang ingin dimigrasikan. Jalankan script tersebut.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># .\/scriptmigrasi.sh\nWhat is the path to the input file?\n\/root\/imapsync\/listuser.csv ##masukan path list user yang telah dibuat\nWhat is the Source Host? (mail1.domain.com)\n192.168.1.166   ##IP Host1\nWhat is the Destination Host? (mail2.domain.com)\n192.168.1.168   ##IP Host2\nWhere would you like the log? (synclog.txt)\n\/tmp\/log-migrasi.txt  ##path file log<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Pastikan informasi server iRedMail dan Zimbra sudah benar.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>IMAPSync is about to begin using:\nInput File \/root\/imapsync\/listuser.csv\nSource Host 192.168.1.166\nDestination Host 192.168.1.168\nLog File \/tmp\/log-migrasi.txt\n\nIs this information correct?\nPress Enter to continue or Hit CTRL+C to start over (Press Enter)<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Proses migrasi sedang berjalan dan akan ada log seperti di bawah ini<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/ewzDWtkTvY3fH3RqiFB4xH23MlzONcpJj1XnzSzNU7hnrGI5fCoKefaF2iMJ-a6nCAoiR7sM44HJBq2wkRs_aQiIhjx8DU6HKZJ0HdZM89OxEDbJ3syM17gg-VFASsYotwTOEGXQnZq_RTdjnGldPA\" width=\"625\" height=\"256\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Finalisasi<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Login ke webmail zimbra menggunakan user yang telah dimigrasikan data email-nya, pastikan data email sudah tersinkronisasi. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Terima kasih sudah membaca artikel ini. Jika terdapat pertanyaan atau kritik\/saran bisa tuliskan di komentar ya!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pengenalan iRedMail merupakan email server berbasis open source yang dapat diimplementasikan pada berbagai jenis distribusi linux seperti CentOS Stream, Rocky, Alma, Debian, Ubuntu, FreeBSD, OpenBSD. iRedMail mulai dikembangkan pada tahun 2007 dan sampai saat ini masih dikembangkan oleh komunitas. Saya mendapatkan kesempatan untuk melakukan migrasi data email dari iRedMail ke&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"telegram_tosend":false,"telegram_tosend_message":"","telegram_tosend_target":0,"footnotes":""},"categories":[4,13],"tags":[51,52,33,5],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-tips-trick","category-zimbra","tag-iredmail","tag-migration","tag-tips","tag-zimbra"],"_links":{"self":[{"href":"https:\/\/ilmusekawan.web.id\/index.php\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ilmusekawan.web.id\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ilmusekawan.web.id\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ilmusekawan.web.id\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ilmusekawan.web.id\/index.php\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":15,"href":"https:\/\/ilmusekawan.web.id\/index.php\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":94,"href":"https:\/\/ilmusekawan.web.id\/index.php\/wp-json\/wp\/v2\/posts\/68\/revisions\/94"}],"wp:attachment":[{"href":"https:\/\/ilmusekawan.web.id\/index.php\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ilmusekawan.web.id\/index.php\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ilmusekawan.web.id\/index.php\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}