Guide to Migrate from Sendmail/Pop3/IMAP to Ubuntu Zimbra

Looking to migrate to ZCS? Ask here. Got a great tip or script that helped you migrate? Post it here.
bertie_uk
Advanced member
Advanced member
Posts: 58
Joined: Fri Sep 12, 2014 10:19 pm

Guide to Migrate from Sendmail/Pop3/IMAP to Ubuntu Zimbra

Post by bertie_uk »

I've just followed the Ubuntu installation guide and then proceeded to migrate my mail from Redhat Sendmail/Pop3/IMAP to Ubuntu 6.06 Server.
There is info in these forums how to do it but scattered about.
Here's a quick migration guide:
You'll need to have IMAP running on your old server. In my case it was present but disabled. On Zimbra server, as root:

apt-get install build-essential
apt-get install make
apt-get install libio-socket-ssl-perl
Get Mail-IMAPClient-2.2.9 from http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/
Gunzip & untar, and follow instructions in Mail-IMAP/INSTALL to install
Download TermReadKey-2.30 from http://search.cpan.org/~jstowe/TermReadKey-2.30/
Gunzip & untar TermReadKey and do same as Mail-IMAP to install (perl Makefile.PL, make, make test, make install)
Get imapsync from http://www.linux-france.org/prj/imapsync/dist/
Gunzip & untar imapsync
in imapsync dir, use the following command:

./imapsync --nosyncacls --syncinternaldates --host1 old_mail_server --user1 old_server_username --password1 oldserverpwd --host2 new_zimbra_server --user2 new_zimbra_username --password2 new_zimbra_pwd --authmech1 LOGIN --authmech2 LOGIN
You can add --folder INBOX to only sync the inbox folder. And there are other options too, ./imapsync to display the help.
Yes you need to run imapsync for each user, but this can be scripted.
Bertie
bertie_uk
Advanced member
Advanced member
Posts: 58
Joined: Fri Sep 12, 2014 10:19 pm

Guide to Migrate from Sendmail/Pop3/IMAP to Ubuntu Zimbra

Post by bertie_uk »

Admins: Any chance of making this a sticky? Just come back to it for my own reference and notice it's dropped off as it's over a month old.
Cheers
Bertie
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Guide to Migrate from Sendmail/Pop3/IMAP to Ubuntu Zimbra

Post by phoenix »

You could add this to the wiki as a 'how-to' guide if you have the time.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
sickdm
Posts: 1
Joined: Fri Sep 12, 2014 10:22 pm

Guide to Migrate from Sendmail/Pop3/IMAP to Ubuntu Zimbra

Post by sickdm »

Additionally, some servers don't like plaintext connections, so --ssl1 and --ssl2 flags can be handy:
./imapsync --nosyncacls --syncinternaldates --ssl1 --ssl2 --host1 servername1 --user1 username1 --password1 password1 --host2 servername2 --user2 username1 --password2 password2 --authmech1 LOGIN --authmech2 LOGIN
SpEnTBoY
Advanced member
Advanced member
Posts: 194
Joined: Fri Sep 12, 2014 10:28 pm

Guide to Migrate from Sendmail/Pop3/IMAP to Ubuntu Zimbra

Post by SpEnTBoY »

[quote user="sickdm"]Additionally, some servers don't like plaintext connections, so --ssl1 and --ssl2 flags can be handy:
./imapsync --nosyncacls --syncinternaldates --ssl1 --ssl2 --host1 servername1 --user1 username1 --password1 password1 --host2 servername2 --user2 username1 --password2 password2 --authmech1 LOGIN --authmech2 LOGIN[/QUOTE]
Just to add to the list (although I'm sure people through trial and error would figure it out) here's what I had to run to sync my courier-imap server with Zimbra:
First on my courier IMAP server I needed to edit the imapd file.


# pwd

/usr/lib/courier-imap/etc

# vi imapd


I had to add an AUTH method as it wasn't there:



IMAP_CAPABILITY="IMAP4rev1 AUTH=CRAM-MD5

AUTH=CRAM-SHA1 CHILDREN NAMESPACE

THREAD=ORDEREDSUBJECT THREAD=REFERENCES

SORT QUOTA IDLE"


Then the sync command I used:



./imapsync --nosyncacls --syncinternaldates

--host1 old_host --user1 old_user --password1 'my_pass_1'

--host2 zimba_host --user2 new_user --password2 'my_pass2'

--ssl2 --authmech2 PLAIN


--

Lonny
434logic
Posts: 1
Joined: Fri Sep 12, 2014 10:21 pm

Guide to Migrate from Sendmail/Pop3/IMAP to Ubuntu Zimbra

Post by 434logic »

For those who might want an RPM of imapsync for their RHEL4 installs (this will likely work just fine on RHEL3 or the accompanying CentOS releases, and probably on Fedora as well; I've only used it on CentOS4 right now), here's a spec for it. You'll need to grab the latest release from the imapsync web page (and you'll probably need a couple of Perl RPMs from the DAG repository; specifically, perl-Mail-IMAPClient, perl-Net-SSLeay, and perl-TermReadKey) and perl-IO-Socket-SSL from Red Hat/CentOS. Enjoy.
imapsync.spec.txt
Rich Graves
Outstanding Member
Outstanding Member
Posts: 687
Joined: Fri Sep 12, 2014 10:24 pm

Guide to Migrate from Sendmail/Pop3/IMAP to Ubuntu Zimbra

Post by Rich Graves »

Can someone help me with an imapsync incantation (or any other tool) that can merge various IMAP and webmail clients' sent-mail, Sent Items, Sent, Sent Messages, etc. into Zimbra's single Sent folder?
User avatar
ppearl
Advanced member
Advanced member
Posts: 114
Joined: Thu May 15, 2014 7:36 am

Guide to Migrate from Sendmail/Pop3/IMAP to Ubuntu Zimbra

Post by ppearl »

[quote user="Rich Graves"]Can someone help me with an imapsync incantation (or any other tool) that can merge various IMAP and webmail clients' sent-mail, Sent Items, Sent, Sent Messages, etc. into Zimbra's single Sent folder?[/QUOTE]
I don't have a list of all possible permutations, but once you build up a list in theory you can try something like the following to map various names to 'Sent' (untested):
imapsync ...

--regextrans2 's/^sent-mail$/Sent/i'

--regextrans2 's/^Sent Items$/Sent/i'

--regextrans2 's/^Sent Messages$/Sent/i'
vincen
Posts: 27
Joined: Fri Sep 12, 2014 11:37 pm

Guide to Migrate from Sendmail/Pop3/IMAP to Ubuntu Zimbra

Post by vincen »

Still obliged to use that tool imapsync to migrate imap accounts from an old server to Zimbra ?
Thanks
Wilson_Lee
Posts: 39
Joined: Fri Sep 12, 2014 11:38 pm

Guide to Migrate from Sendmail/Pop3/IMAP to Ubuntu Zimbra

Post by Wilson_Lee »

Hi bertie_uk,
I planning to migrate sendmail (slackware 10 ) to Zimbra ( RHEL5 ).

Is the steps same as wat u did? :)
Post Reply