Here you’ll find a small python script that will show a nice little notification when a new email is received by Evolution. It looks like this on my machine running Ubuntu Dapper.

New mail notification for Evolution

The script works by attaching itself to your systems dbus and listens for “new email” events from Evolution. When an event is received it compares the email folder to the _watch_folders array and decides whether to show the notification or not. The magic really lies in the two dbus lines near the bottom of the script. The rest is just to make the notification a little nicer. The magic part is actually the work of a former coworker of mine, so I can’t really take credit for that 🙂

The scripts of course requires python as well as libnotify to display the notification and the tango-icon-theme for the nice icon. The following commands should prepare your system to run this script. Just toss the script into gnome’s session manager and it’ll always run at startup.

apt-get install python2.4 python2.4-dbus libnotify-bin tango-icon-theme