Sunday, September 09, 2007

Pavarotti dies

On 6th September 2007 Luciano Pavarotti rests in peace forever. Here is Pavarotti performing Nessun Dorma (Let no one sleep) in Paris in 1998. Bravo! Bravo!

Tuesday, July 03, 2007

Using mairix through procmail

My email provider Dream Host runs the Courier IMAP server and I primarily use Mozilla Thunderbird as my mail client. I've had numerous problems with Thunderbird's off-line IMAP support and email search that I've started looking for other solutions.

When I was using mutt as my email client, I also used mairix to index and search my emails. Mairix is a brilliant program that offers GMail like full text search of your emails. I've missed that functionality ever since, so I started thinking on how to integrate Thunderbird and mairix. After some delusional ideas about building Thunderbird extensions and wrapping mairix in a cgi script, I finally hit on the obvious: run mairix through procmail.

So I wrote a procmail rule that invokes mairix and dumps the search results in predefined IMAP folder. To search my emails in Thunderbird, I simply send myself an email with a special subject line that triggers mairix. Mairix then populates the "search" folder with search results which I access from Thunderbird.

If you have already used mairix and procmail, implementing this is a trivial task. Here is my setup in case you need some help:

Mairix:

  1. I periodically run mairix indexing from cron so that the mairix db is up to date. You can also trigger the mairix indexing process whenever an email is delivered by using a procmail recipie. If you receive a huge quantity of email the later method is not recommended as it can increase server load.
  2. Mairix supports incremental indexing, so periodically running mairix is fast. Mairix always uses the index to return search results, so having an up to date index is crucial. My 500MB of mail boxes has a 2MB mairix index database.
  3. Please read the mairix documentation for an explanation of the mairixrc file
# ~/.mairixrc
base=~/Maildir
database=~/Maildir/mairixdb
maildir=.Inbox:.Archived
mfolder=.search

Procmail:
  1. you'll need to change ME@MYDOMAIN with your own email ID so that mairix is not accidentally triggered when someone else sends you an email.
  2. subject line of the email you send needs be of the form [search] needle. Everything after [search] is passed to mairix on the command line. Please refer to the mairix documentation for a list of search terms that can be used.

# ~/.procmailrc
MAILDIR=$HOME/Maildir

SHELL=/bin/sh
# no procmail_log

# enable mairix searches through email
:0:hw
* ^From:.*ME@MYDOMAIN\.com
* ^Subject: .*\[search\] \/.*
| ~/bin/mairix $MATCH

# catch all for inbox
:0
$HOME/Maildir/

Wednesday, June 13, 2007

Clinton's at Harvard Uni Class Day

Open Culture has an interesting video of Bill Clinton speaking at Harvard University's Class Day event. A quote from the article:

... it reminds us that there may be again a day when we can look to the White House for leadership and inspiration.

Update: oculture.com link is broken. Youtube carries the same videos in 3 parts - part 1, part 2 and part 3.

I'm a huge supporter of Clinton's current humanitarian work in building a better world. Incidentally, he won the 2007 TED prize and his acceptance speech is also worth watching.

In the same way, I hope that our own President Abdul Kalam will also reach greater heights once his term in office is over and he's free of political incumbents.

Sunday, May 06, 2007

Carina Nebula: The Cosmic Crucible

In celebration of the Hubble 17th launch date anniversary, astronomers released the largest panoramic photographs every taken by the Hubble's cameras. The Carina Nebula is 50 light years across and shows the birth and death of stars in an unprecedented level of detail (click the image below for a high-res version).


Hubble website has plenty of details of this magnificent nebula: Star birth in the Extreme, Carina Nebula Details, Key to Detail Images.