Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Saturday, April 26, 2008

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
#screen
#apt-get install imapsync make unzip lynx
#cpan
cpan> install Date::Manip
#vim run-imapsync.sh


now type/copy and paste in the below and save it (escape+:wq)

#!/bin/bash
COUNTER=0
while [ $COUNTER -lt 10 ]; do
echo The counter is $COUNTER
imapsync --host1 imap.gmail.com \
--port1 993 --user1 morganstorey@gmail.com \
--passfile1 ./passfile1 --ssl1 \
--host2 imap.gmail.com \
--port2 993 --user2 me@morganstorey.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///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'
let COUNTER=COUNTER+1
sleep 10m
done


save it (escape+:wq)

chmod 740 run-imapsync.sh
./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.

Sunday, January 28, 2007

The trials of Man and Machine.


The site and other sites hosted here as you may have noticed, has been down for an extended period.
Christmas was great, Geoffrey had lots of fun playing with his cousin Jack, Isabelle and Holly, running around as best he could. He has started to vocalise himself, but not in any way that we can yet understand. He seems very annoyed and repeats himself often. He has even started to shrug in his own cute little way.
There was a problem with the powersupply on my server which temporarily took two of the discs in my raid 5 array offline, taking down the array, rather than recover the minimal backups to it, in hope of recovering some of the data from the array I had to build a new hard drive storage case for r2d2, thus the time gap.
All back and good though. Lessons learnt and server better than it was before.
I recently attended the open day of the Linux Australia conference and helped out on the Ubuntu-AU stand. It was lots of fun, got to play around with some immersive computer technology, and got to play with the One Laptop per Child laptop... very cool.
Got to meet some people I have only heard about. Like Theodore Ts'o;one of the main designers of the ext3 file system, used fairly heavily in linux and I met Jono Bacon; One of the incredibly funny stars of LugRadio possibly the funniest audio shows I have heard since the GoonShow. He is also an avid free-software advocate, author and employed member of Canonical: Ubuntu's parent company. It was a great day and has pushed me to get some more stuff done here and in the community. A lot of my projects I had on hold have been started up this week, Stu and MrTeeny are being built, and I intend to try and run an Ubuntu stand at a local computer fair to get the word out.
So all in all it has been a busy while since I last posted. Peace out all.
eXTReMe Tracker