<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ThinkOvi! - Website transfer and Server migration services &#187; transfer email account</title>
	<atom:link href="http://www.thinkovi.com/tag/transfer-email-account/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thinkovi.com</link>
	<description>Get your website moved the right way by professionals</description>
	<lastBuildDate>Fri, 15 Oct 2010 10:29:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Migrating your IMAP mail? Here&#8217;s how!</title>
		<link>http://www.thinkovi.com/migrating-your-imap-mail-heres-how/</link>
		<comments>http://www.thinkovi.com/migrating-your-imap-mail-heres-how/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 09:25:17 +0000</pubDate>
		<dc:creator>Ovidiu</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[imap email migration]]></category>
		<category><![CDATA[transfer email account]]></category>

		<guid isPermaLink="false">http://www.thinkovi.com/?p=385</guid>
		<description><![CDATA[For those of you who are changing their IMAP email account to a different server, there is a very nice utility called imapsync. The utility is actually written in PERL so it can run on any number of hosts that support PERL scripting, and while it has many config options, here is the actual command [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.thinkovi.com/wp-content/uploads/2010/02/email.jpg"><img class="alignright size-thumbnail wp-image-405" title="E-mail IMAP" src="http://www.thinkovi.com/wp-content/uploads/2010/02/email-150x150.jpg" border="0" alt="" width="150" height="150" /></a>For those of you who are changing their IMAP email account to a different server, there is a very nice utility called <a title="Imapsync tool" href="http://freshmeat.net/projects/imapsync/" target="_blank">imapsync</a>.</p>
<p>The utility is actually written in PERL so it can run on any number of hosts that support PERL scripting, and while it has many config options, here is the actual command we used to transfer an email account from our server to Google Apps Mail account(GMail is the same) from a Linux box:</p>
<h2>The command</h2>
<blockquote><p>imapsync \</p>
<p>&#8211;host1 thinkovi.com &#8211;user1 email@thinkovi.com &#8211;password1 mypass1 \</p>
<p>&#8211;host2 imap.gmail.com &#8211;user2 new@gmail.com &#8211;password2 pass2 \</p>
<p>&#8211;ssl2 &#8211;ssl1 &#8211;authmech1 PLAIN &#8211;authmech2 LOGIN</p></blockquote>
<ul>
<li>bear in mind that this utility will work only for email servers supporting IMAP protocol.</li>
</ul>
<ul>
<li>also, in the above code notice we have used SSL for both connections, and PLAIN authentication for the original server and LOGIN for the imap server at google</li>
</ul>
<p><span id="more-385"></span></p>
<h2>Result Message</h2>
<blockquote><p>++++ End looping on each folder ++++</p>
<p>++++ Statistics ++++</p>
<p>Time                   : 257 sec</p>
<p>Messages transferred   : 170</p>
<p>Messages skipped       : 0</p>
<p>Total bytes transferred: 12914745</p>
<p>Total bytes skipped    : 0</p>
<p>Total bytes error      : 0</p>
<p>Detected 0 errors</p></blockquote>
<ul>
<li>worth mentioning, the utility really worked and our gmail account contained in the end all email messages and folders from the original IMAP server</li>
</ul>
<p>The full usage options(&#8220;<strong>imapsync &#8211;help</strong>&#8220;) and more information can also be found on the<a title="Imapsync man page linux" href="http://linux.die.net/man/1/imapsync" target="_blank"> imapsync linux man page here</a>.</p>
<p>Please, thank the author (Gilles LAMIRAL) by giving him a book:</p>
<p><a title="Thank Gilles LAMIRAL" href="http://www.amazon.com/gp/registry/wishlist/1C9UNDIH3P7R7/" target="_blank">http://www.amazon.com/gp/registry/wishlist/1C9UNDIH3P7R7/</a></p>
<h2><strong>Need Help?</strong></h2>
<p>We offer dedicated assistance for IMAP email accounts transfer, <a title="IMAP transfer inquiry" href="http://www.thinkovi.com/inquiry/">make an inquiry now</a>.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 69px; width: 1px; height: 1px;">
<p>usage: /usr/bin/imapsync [options]</p>
<p>Several options are mandatory.</p>
<p>&#8211;host1       &lt;string&gt; : &#8220;from&#8221; imap server. Mandatory.</p>
<p>&#8211;port1       &lt;int&gt;    : port to connect on host1. Default is 143.</p>
<p>&#8211;user1       &lt;string&gt; : user to login on host1. Mandatory.</p>
<p>&#8211;authuser1   &lt;string&gt; : user to auth with on host1 (admin user).</p>
<p>Avoid using &#8211;authmech1 SOMETHING with &#8211;authuser1.</p>
<p>&#8211;password1   &lt;string&gt; : password for the user1. Dangerous, use &#8211;passfile1</p>
<p>&#8211;passfile1   &lt;string&gt; : password file for the user1. Contains the password.</p>
<p>&#8211;host2       &lt;string&gt; : &#8220;destination&#8221; imap server. Mandatory.</p>
<p>&#8211;port2       &lt;int&gt;    : port to connect on host2. Default is 143.</p>
<p>&#8211;user2       &lt;string&gt; : user to login on host2. Mandatory.</p>
<p>&#8211;authuser2   &lt;string&gt; : user to auth with on host2 (admin user).</p>
<p>&#8211;password2   &lt;string&gt; : password for the user2. Dangerous, use &#8211;passfile2</p>
<p>&#8211;passfile2   &lt;string&gt; : password file for the user2. Contains the password.</p>
<p>&#8211;noauthmd5            : don&#8217;t use MD5 authentification.</p>
<p>&#8211;authmech1   &lt;string&gt; : auth mechanism to use with host1:</p>
<p>PLAIN, LOGIN, CRAM-MD5 etc. Use UPPERCASE.</p>
<p>&#8211;authmech2   &lt;string&gt; : auth mechanism to use with host2. See &#8211;authmech1</p>
<p>&#8211;ssl1                 : use an SSL connection on host1.</p>
<p>&#8211;ssl2                 : use an SSL connection on host2.</p>
<p>&#8211;folder      &lt;string&gt; : sync this folder.</p>
<p>&#8211;folder      &lt;string&gt; : and this one, etc.</p>
<p>&#8211;folderrec   &lt;string&gt; : sync this folder recursively.</p>
<p>&#8211;folderrec   &lt;string&gt; : and this one, etc.</p>
<p>&#8211;include     &lt;regex&gt;  : sync folders matching this regular expression</p>
<p>&#8211;include     &lt;regex&gt;  : or this one, etc.</p>
<p>in case both &#8211;include &#8211;exclude options are</p>
<p>use, include is done before.</p>
<p>&#8211;exclude     &lt;regex&gt;  : skips folders matching this regular expression</p>
<p>Several folders to avoid:</p>
<p>&#8211;exclude &#8216;fold1|fold2|f3&#8242; skips fold1, fold2 and f3.</p>
<p>&#8211;exclude     &lt;regex&gt;  : or this one, etc.</p>
<p>&#8211;prefix1     &lt;string&gt; : remove prefix to all destination folders</p>
<p>(usually INBOX. for cyrus imap servers)</p>
<p>you can use &#8211;prefix1 if your source imap server</p>
<p>does not have NAMESPACE capability.</p>
<p>&#8211;prefix2     &lt;string&gt; : add prefix to all destination folders</p>
<p>(usually INBOX. for cyrus imap servers)</p>
<p>use &#8211;prefix2 if your target imap server does not</p>
<p>have NAMESPACE capability.</p>
<p>&#8211;regextrans2 &lt;regex&gt;  : Apply the whole regex to each destination folders.</p>
<p>&#8211;regextrans2 &lt;regex&gt;  : and this one. etc.</p>
<p>When you play with the &#8211;regextrans2 option, first</p>
<p>add also the safe options &#8211;dry &#8211;justfolders</p>
<p>Then, when happy, remove &#8211;dry, remove &#8211;justfolders</p>
<p>&#8211;regexmess   &lt;regex&gt;  : Apply the whole regex to each message before transfer.</p>
<p>Example: &#8216;s/\000/ /g&#8217; # to replace null by space.</p>
<p>&#8211;regexmess   &lt;regex&gt;  : and this one.</p>
<p>&#8211;regexmess   &lt;regex&gt;  : and this one, etc.</p>
<p>&#8211;regexflag   &lt;regex&gt;  : Apply the whole regex to each flags list.</p>
<p>Example: &#8216;s/&#8221;Junk&#8221;//g&#8217; # to remove &#8220;Junk&#8221; flag.</p>
<p>&#8211;regexflag   &lt;regex&gt;  : and this one, etc.</p>
<p>&#8211;sep1        &lt;string&gt; : separator in case namespace is not supported.</p>
<p>&#8211;sep2        &lt;string&gt; : idem.</p>
<p>&#8211;delete               : delete messages on source imap server after</p>
<p>a successful transfer. Useful in case you</p>
<p>want to migrate from one server to another one.</p>
<p>With imap, delete tags messages as deleted, they</p>
<p>are not really deleted. See expunge.</p>
<p>&#8211;delete2              : delete messages on the destination imap server that</p>
<p>are not on the source server.</p>
<p>&#8211;expunge              : expunge messages on source account.</p>
<p>expunge really deletes messages marked deleted.</p>
<p>expunge is made at the beginning on the</p>
<p>source server only. newly transferred messages</p>
<p>are expunged if option &#8211;expunge is given.</p>
<p>no expunge is done on destination account but</p>
<p>it will change in future releases.</p>
<p>&#8211;expunge1             : expunge messages on source account.</p>
<p>&#8211;expunge2             : expunge messages on target account.</p>
<p>&#8211;uidexpunge2          : uidexpunge messages on the destination imap server</p>
<p>that are not on the source server, requires &#8211;delete2</p>
<p>&#8211;syncinternaldates    : sets the internal dates on host2 same as host1.</p>
<p>Turned on by default.</p>
<p>&#8211;idatefromheader      : sets the internal dates on host2 same as the</p>
<p>&#8220;Date:&#8221; headers.</p>
<p>&#8211;buffersize  &lt;int&gt;    : sets the size of a block of I/O.</p>
<p>&#8211;maxsize     &lt;int&gt;    : skip messages larger than &lt;int&gt; bytes</p>
<p>&#8211;maxage      &lt;int&gt;    : skip messages older than &lt;int&gt; days.</p>
<p>final stats (skipped) don&#8217;t count older messages</p>
<p>see also &#8211;minage</p>
<p>&#8211;minage      &lt;int&gt;    : skip messages newer than &lt;int&gt; days.</p>
<p>final stats (skipped) don&#8217;t count newer messages</p>
<p>You can do (+ are the messages selected):</p>
<p>past|&#8212;-maxage+++++++++++++++&gt;now</p>
<p>past|+++++++++++++++minage&#8212;-&gt;now</p>
<p>past|&#8212;-maxage+++++minage&#8212;-&gt;now (intersection)</p>
<p>past|++++minage&#8212;&#8211;maxage++++&gt;now (union)</p>
<p>&#8211;skipheader  &lt;regex&gt;  : Don&#8217;t take into account header keyword</p>
<p>matching &lt;string&gt; ex: &#8211;skipheader &#8216;X.*&#8217;</p>
<p>&#8211;useheader   &lt;string&gt; : Use this header to compare messages on both sides.</p>
<p>Ex: Message-ID or Subject or Date.</p>
<p>&#8211;useheader   &lt;string&gt;   and this one, etc.</p>
<p>&#8211;skipsize             : Don&#8217;t take message size into account.</p>
<p>&#8211;allowsizemismatch    : allow RFC822.SIZE != fetched msg size</p>
<p>consider &#8211;skipsize to avoid duplicate messages</p>
<p>when running syncs more than one time per mailbox</p>
<p>&#8211;dry                  : do nothing, just print what would be done.</p>
<p>&#8211;subscribed           : transfers subscribed folders.</p>
<p>&#8211;subscribe            : subscribe to the folders transferred on the</p>
<p>&#8220;destination&#8221; server that are subscribed</p>
<p>on the &#8220;source&#8221; server.</p>
<p>&#8211;nofoldersizes        : Do not calculate the size of each folder in bytes</p>
<p>and message counts. Default is to calculate them.</p>
<p>&#8211;justfoldersizes      : exit after printed the folder sizes.</p>
<p>&#8211;syncacls             : Synchronises acls (Access Control Lists).</p>
<p>&#8211;nosyncacls           : Does not synchronise acls. This is the default.</p>
<p>&#8211;debug                : debug mode.</p>
<p>&#8211;debugimap            : imap debug mode.</p>
<p>&#8211;version              : print software version.</p>
<p>&#8211;justconnect          : just connect to both servers and print useful</p>
<p>information. Need only &#8211;host1 and &#8211;host2 options.</p>
<p>&#8211;justlogin            : just login to both servers with users credentials</p>
<p>and exit.</p>
<p>&#8211;justfolders          : just do things about folders (ignore messages).</p>
<p>&#8211;fast                 : be faster (just does not sync flags).</p>
<p>&#8211;reconnectretry1 &lt;int&gt;: reconnect if connection is lost up to &lt;int&gt; times</p>
<p>&#8211;reconnectretry2 &lt;int&gt;: reconnect if connection is lost up to &lt;int&gt; times</p>
<p>&#8211;split1     &lt;int&gt;     : split the requests in several parts on source server.</p>
<p>&lt;int&gt; is the number of messages handled per request.</p>
<p>default is like &#8211;split1 1000</p>
<p>&#8211;split2     &lt;int&gt;     : same thing on the &#8220;destination&#8221; server.</p>
<p>&#8211;fastio1              : use fastio with the &#8220;from&#8221; server.</p>
<p>&#8211;fastio2              : use fastio with the &#8220;destination&#8221; server.</p>
<p>&#8211;timeout     &lt;int&gt;    : imap connect timeout.</p>
<p>&#8211;help                 : print this.</p>
<p>Example: to synchronise imap account &#8220;foo&#8221; on &#8220;imap.truc.org&#8221;</p>
<p>to  imap account &#8220;bar&#8221; on &#8220;imap.trac.org&#8221;</p>
<p>with foo password stored in /etc/secret1</p>
<p>and  bar password stored in /etc/secret2</p>
<p>/usr/bin/imapsync \</p>
<p>&#8211;host1 imap.truc.org &#8211;user1 foo &#8211;passfile1 /etc/secret1 \</p>
<p>&#8211;host2 imap.trac.org &#8211;user2 bar &#8211;passfile2 /etc/secret2</p>
<p>Here is a [linux] system (Linux ovidiu-desktop 2.6.31-16-generic #53-Ubuntu SMP Tue Dec 8 04:01:29 UTC 2009 i686)</p>
<p>with perl 5.10.0</p>
<p>Mail::IMAPClient  3.19</p>
<p>IO::Socket        1.30_01</p>
<p>IO::Socket::SSL</p>
<p>Digest::MD5       2.36_01</p>
<p>Digest::HMAC_MD5</p>
<p>Term::ReadKey</p>
<p>Date::Manip</p>
<p>$Id: imapsync,v 1.286 2009/07/24 15:53:04 gilles Exp gilles $</p>
<p>Happy with this free, open and gratis GPL software?</p>
<p>Please, thank the author (Gilles LAMIRAL) by giving him a book:</p>
<p>http://www.amazon.com/gp/registry/wishlist/1C9UNDIH3P7R7/</p>
<p>or rate imapsync at http://freshmeat.net/projects/imapsync/</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkovi.com/migrating-your-imap-mail-heres-how/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

