Movement at the station
So I have decided to finally signup for google apps. Previously I had my DNS provider forwarding my mail to my gmail account, a temporary measure as my mail server was down. But now I see no point having my own mail server, especially when google apps is free, and has more redundancy (7 mail servers!) than I could ever offer.
I also had an issue that my DNS provider had implemented a draconian and over zealous spam filter, who checks that the reverse DNS matches the sender domain, sheesh. Other than this debacle they have been pretty good.
Problem was I have about 18months of email that I needed moved across. Sure I could just forward from googleapps to gmail, but whats the point of that. Now how to move it across. I found a nice guide here, but it needed some tweaking to run on my home server, I didn't have enough email (or money) to justify running it on the amazon compute cloud. Below is how I did it on my new Ubuntu Hardy Heron Server.
as I am ssh'd into my server, I ran screen
#apt-get install imapsync make unzip lynx
cpan> install Date::Manip
now type/copy and paste in the below and save it (escape+:wq)
while [ $COUNTER -lt 10 ]; do
echo The counter is $COUNTER
imapsync --host1 imap.gmail.com \
--port1 993 --user1 firstname.lastname@example.org \
--passfile1 ./passfile1 --ssl1 \
--host2 imap.gmail.com \
--port2 993 --user2 email@example.com \
--passfile2 ./passfile2 --ssl2 \
--syncinternaldates --split1 100 --split2 100 \
--authmech1 LOGIN --authmech2 LOGIN \
--regexmess 's/Delivered-To: morganstorey\@gmail.com/Delivered-To: me\@morganstorey.com/g' \
--regexmess 's/Subject:(\s*)\n/Subject: (no--subject)$1\n/g' \
--regexmess 's/Subject: ([Rr][Ee]):(\s*)\n/Subject: $1: (no--subject)$2\n/g'
save it (escape+:wq)
chmod 740 run-imapsync.sh
A bit of explanation on the changes I made, I removed a -maxage 1 from the script as that was only pulling down emails 1 day or newer in age. I also added the loop so that it would repeat the process to make sure all mail is gotten, and I added the sleep as the original article put it you don't want to hammer the google IMAP servers or they will block you.
Then just export the calendar to ICS and import on the Google apps one, export the contacts to CSV and import to the new Google apps, and just in case there are any people emailing your google address direct set it to forward to your new google apps and your done.
I also intend eventually to use some other method to backup Fionas and My google mail at regular intervals, not because I don't trust google (hey I am posting this through blogger, and get most of my news through google news, or my google rss reader), but becasue I like having backups.
This is all even more humorous, when I tell you the book I am reading at the moment; The Google Story, by David A. Vise. Ryan from work loaned it to me, and there is now a time limit on reading it as he has given his notice.
Well sorry about the long and technical post, I am starting to do them a bit more now, but well see, I am sure this blog will get back to its usual unusual ramblings.
Peace out all, especially the bright cookies at the Googleplex worldwide.