It’s real!
(+ iTunes 5.0)
Warning!!! The following article is supposed to be used by system administrators or experienced Linux/UNIX users. Do not try it UNLESS YOU UNDERSTAND EXACTLY WHAT YOU ARE DOING!
I’ve been looking for a way to move all emails stored in a Cyrus IMAP server (on Linux) to Gmail. Nothing that I found on the internet worked as I expected. So I came up with a quite simple solution, it’s actually a one-liner!
The only restriction is that you need shell access to your IMAP server (and that this is some kind of UNIX/Linux server, the following trick will not work on Win* machines). Depending on your server setup, you may need root privileges too.
If so, ssh/telnet to your IMAP server and go to the directory used by Cyrus IMAP to store your mails. For example mine was /var/spool/imap/user/panayotis/. Your mails are stored in the form of text files named “xxxxxx.”. If you use IMAP folders, you will also see folders and subfolders containing similar files.
Then use the following command (replace YOURGMAILACCOUNT with your Gmail username)
find . -type f -name "*?." -printf "%T@ %h/%f\\n" |\
sort -n | colrm 1 11 | \
xargs -i bash -c "echo {} ; sendmail < {} YOURGMAILACCOUNT@gmail.com ; sleep 10"
Some notes:
- I use %T@ will make “find” print the unix timestamp of the last modification time of the file. I then use “sort -n” to sort using this timestamp and “colrm” to remove it from each line. This way older mails are send first, and will probably appear in the right order in GMail. (however, the timestamp may have been changed later than the date received, if for example you moved the mail to an other IMAP folder later).
- “sleep 10″ is used to prevent GMail from considering this forward a spam attack. If you only have tens of mails, ther is no need to use it. If (like me) you want to transfer 1000s of mails, it will slow down the proccess, but you have many more chances of succeding.
- Since the proccess may take a long time (depending on the amount of data), I found it useful to use screen or nohup to ensure a lost connection with my server will not stop it.
- Before starting the transfer, make sure you empty your SPAM and Trash folders at GMail. It is quite possible that many of the mails transfered will be considered spam. If your spam folder is empty it is much easier to mark them “not spam”.
I have the impression that the same technique could be used with other mailbox formats. If you come up with something better or with a more elegant/detailed description of the proccess please let me know so that I put a link to it.
It worked for me, I hope it works for you too. Good Luck!
I’m leaving to go to Peloponisos, the south part of Greek mainland, I really need some time off.
I will not be able to have any connection to the Internet during my vacations so do not be surprised if comments do not show up, they may be held in the moderation queue…
See you in a couple of weeks!
Much like I bookmark web pages I find interesting, I thought it would be nice to bookmark specific audio content, podcasts, songs, interviews I come accross. What’s more, I found that there is an easy way to transform this list of bookmarks to a podcast!
I just bookmark MP3 URLs using del.icio.us, then set up a feed using feedburner where I enabled “SmartCast” features. So, here is my “PodSelections” podcast!
[http://feeds.feedburner.com/PodSelections]
Visacast is one of the most interesting tools I’ve seen around for some time. It allows you to “split” an AAC file (alternative to MP3 for podcasts) to chapters. Each chapter has its own photo and URL link. iTunes allows you to jump to different sections in such a file and (I think) so does an iPod (photo or color?). Autoring is really easy, just drag’n'drop your photos, then set the time they will appear as you listen.
Awsome! I’ll let you know how it works on iPod color as soon as I get mine
Dimitris changed the default pagerank icons, so that he gets a numeric representation of pagerank. Dimitris Giannitsaros – Blog: Google toolbar code.
I’ve been thinking a lot since I posted yesterday on Yahoo! HotJobs crawler. Does it make sense to have a CV microformat [1]?
What most recruiting engines do is that they ask you to enter your resume, your personal info. So, they gather information on people looking for a job. The thing is there are so many of them. They are also geographicaly targeted (even if they do not admit it). The other thing is there are a lot of people that may not be looking for a job, but they might be interested if a good offer appeared. An other issue has to do with part-time small-project HR needs with very specific needs. How do you locate the one person you need just for a couple of weeks?
A “CV microformat” would make the whole process so much easier if embraced by search engines. Anyone having a personal web page could present their CV in this human-readable-machine-friendly format. Search engines could easily parse and aggregate this information. Integrating this microformat in blogger.com and bloging engines like wordpress, Yahoo! and other on-line services could make hundreds of thousands of CVs available to anyone interested!
Even better we could introduce a similar HR-request-microformat. Instead of just posting a job opening in plain text companies could use a microformat that would make the job of engines like HotJob Crawler much more interesting.
Well? What do you think?
—
[1] more on microformats can be found at microformats.org
From Yahoo! Search blog:
So here’s the scoop… Much like My Yahoo! started knocking down walls a couple years ago by inviting anyone with an RSS feed to the aggregation party, HotJobs is using Yahoo! Search to do something quite similar for on-line job listings. They’re pulling in jobs from around the Internet: company web sites, local job listings, specialized job boards, and so on.
I’d like to see the oposite: a CV microformat? This would allow companies to look for people matching their criteria. Just give people a standard micro format to publish their CV!
Especially good reading for anyone interested in hacking GoogleMaps by Ryan MacCarthy: Integrating Google Maps into MetroFreeFi.com
Wired Magazine Issue 13.07 has “REMIX NOW! The rise of Cut & Paste Culture” as its main theme. Of course it’s all about remixing music and movie scenes and corporate logos…
Then I realized: Hackers are also part of the “Cut & Paste Culture”. They cut ‘n’ paste code all the time. It’s all about the freedom to reuse -music, ideas, programs, algorithms, photos.
What if we defined “The Right to Reuse” as a fundumental human right?