-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtips.html
32 lines (28 loc) · 1.2 KB
/
tips.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
layout: default
title: "Charles Sutton: Random Software Tips"
---
<h1>Software Tips</h1>
<h2>Copying old email to GMail over IMAP</h2>
<p>
I had some old personal email accounts that I wanted to copy over
to GMail so that they would be more easily searchable. There is a
script called <code><a href="http://www.linux-france.org/prj/imapsync/">imapsync</a></code> that makes this easy.
You can get this script from either Debian ports and macports.
</p>
<p>
The command line that I used was something like (fill in the variables
indicated by $). It was for moving from the old account to gmail.
</p>
<pre><code>
imapsync --host1 $UNI_HOST_NAME --user1 $UNI_USER_NAME --port1 993
--authmech1 PLAIN --noauthmd5 --syncinternaldates
--user2 $GOOGLE_USER_NAME --host2 imap.gmail.com --port2 993 --ssl1 --ssl2
--useheader Message-Id --folder $NAME_OF_IMAP_FOLDER --skipsize
--password1 $UNI_PASSWD --password2 $GOOG_PASSWD --regextrans2 's/INBOX/All Mail/'
</code></pre>
<p>
I stuck this within a shell script that iterator over all of my folders on the from side.
GMail automatically maps labels to folders in its IMAP implementation.
There are a few idiosyncracies in this mapping that I don't remember.
</p>