Friday, November 13, 2009

Email notification in Ubuntu

Previous versions of Ubuntu came with Pidgin as the Instant Messenger program. It also notified of emails arriving to account mailboxes- Hotmail, Yahoo, Google etc. The new IM program in Ubuntu Karmic is Empathy. It has video chat (the developers of Pidgin didn't consider it important) but not email notification (the developers of empathy don't consider it important).
So I thought I'd try Empathy but look for an email notification program. There seem to be a number that work with GMail, but I wanted something that would work with my old Hotmail and Yahoo! accounts as well.
I settled on Mail-Notification, but not without a number of days spent getting the program to work correctly. These were the problems and issues I encountered:
  1. Mail-Notification has options for Hotmail and Yahoo! accounts but they don't work "out of the box".
  2. Hotmail and Yahoo! can be accessed using SSL, but SSL doesn't work "out of the box" with Mail-Notification.
  3. Mail-Notification's GMail alerts don't integrate with Ubuntu's notification system "out of the box".
  4. Mail-Notification doesn't provide an option to go to webmail pages for accounts other than GMail "out of the box".
Here are the solutions I found. I'll start with 2. because that's what I tried first.

Mail-Notification comes without SSL support.

SSL support is disabled in Mail-Notification due to licensing issues. SSL is required to access Hotmail or Yahoo! accounts via POP3. A version of Mail-Notification with SSL can be downloaded here or compiled as described here. (Beware: Ubuntu will offer the version with SSL disabled as an update. Decline the update to keep using SSL.)

The disadvantage of using POP3 to access Hotmail and Yahoo! is that POP3 does not provide a method of reporting which emails are new, so all mail on the server will be reported as new, even if that's a couple of hundred of ancient emails on Hotmail.

I wanted to be informed of new emails, not all emails in my Hotmail or Yahoo! accounts, no matter how old, so I looked for a solution to 1.

Mail-Notification Hotmail and Yahoo! account options don't work

Mail-Notification actually requires the installation of a couple of scripts which it uses to access Hotmail and Yahoo! accounts: GetLive and FetchYahoo! These can be installed via Synaptic, but the installed versions are out of date and don't work. Here's how to sort out the problems:


Install GetLive from Synaptic or command line.
Download the latest version of the script here.
Open Nautilus with root privileges (gksu nautilus in a terminal) and navigate to usr/bin.
Drop the latest version of the script in usr/bin, but make sure it is named "GetLive" not "getlive".
Right click on the script and select Open with Other Application>gedit.
Replace $Mode = "200810" with $Mode = "200909"
Credit for solution here and here.
(The problem with Mail-Notification looking for "GetLive" and not "getlive" is due to be fixed in a later release- after which it may be necessary to name the script "getlive"; Microsoft may alter the Live Mail access protocol again in the future, so check the link for updates if this fix fails.)


Install via Synaptic or command line.
Download the latest version, unpack and replace the fetchyahoo! script in usr/bin again using Nautilus with root privileges.

(A minor irritation with FetchYahoo! is that it marks emails on the server as read, before you have actually opened the webmail page and read them- so after a while Yahoo! emails disappear from Mail-Notification. GetLive displays mail headers but leaves emails marked as unread.)

Mail-Notification's GMail notifications don't integrate with Ubuntu's notifications

Open gconf-editor in a terminal and navigate to /apps/mail-notification/popups/actions.
Edit the key and delete all the actions.
GMail notifications will then appear as the now-standard Ubuntu notification, although without an "Open" option. (This option is still available in the Mail-Notification menu, or by clicking the icon if you have the "Open last email" option selected.)
Credit here.

Mail-Notification doesn't provide "Open Message" options for Hotmail and Yahoo!

Go to Properties>Status Icon and select "Open the latest message".
Open a new file and paste in the following (Substitute the name of your default browser for Firefox if applicable):
firefox http://[Your Hotmail webmail address]
Name your script "", save it in "~/bin" ((home/bin) and make it executable (right-click>Properties>Permissions).
Add this to the Hotmail mailbox attributes in mailboxes.xml:
open-command="~/bin/ %filename"
Repeat for other accounts substituting the account name for Hotmail.
Clicking on the Mail-Notification icon will now open the last mail, whichever account it's from.
(See section 5.1.2 of the Mail-Notification help file.)
Credit here for help to get this working.)

A final minor problem with Mail-Notification is that the icon only appears in the panel when there is new mail. To alter properties or add accounts, open gconf-editor in a terminal, navigate to /apps/mail-notification and check "always-display-icon".

[UPDATE] Mail Notification appears in the System>Preferences menu and can be configured from there. Apologies for the misleading information.

[UPDATE 2] There's a new email notification program available. OMGUbuntu has the details.

[UPDATE 3]Ubuntu users can install Mail-Notification with SSL enabled from a repository here.

Bad Karma?

Is Ubuntu Karmic Koala possibly the best operating system on the planet or causing outrage and frustration, with early adopters wishing they'd stuck with previous versions of the Linux distro?
The truth is that Karmic Koala has a few bug, just like any new release.
Ubuntu is a "bleeding edge" distro: latest versions introduce new features that come with bugs.
Which is why the Long Term Support version is still at 8.04 (Karmic is 9.10).

We issue a new desktop and server release every six months. That means you'll always have the latest and greatest applications that the open source world has to offer. Ubuntu is designed with security in mind. You get free security updates for at least 18 months on the desktop and server.

A new LTS version is usually released every 2 years. With the Long Term Support (LTS) version you get 3 years support on the desktop, and 5 years on the server. There is no extra fee for the LTS version, we make our very best work available to everyone on the same free terms. Upgrades to new versions of Ubuntu are and always will be free of charge.
Want stability? Stick with the LTS. Want the latest features and hardware support? Give the latest version a go, but expect a few bugs. Want a good compromise? Update to new versions a few months after they come out when most of the bugs will have been knocked out.

Where's Windows at?

My first experience of Microsoft Windows was Windows 3.1, if memory serves. After that, I must have used various incarnations at times ('95, '98, 2000) before using XP on a regular basis on my own computers. Now we have Windows 7, but where is Windows really at?
Was Vista really Windows 7, and is Windows 7 really just Vista SP3?
My own experience with XP was that it wasn't as good as it could have been when it came out, but MS improved it over the years and now XP SP3 is an excellent operating system- with some life left in it thanks to the fact that so many Netbooks use it now. I had an option to upgrade to Vista on my last computer, but didn't take it up, because I hadn't heard good things about the OS.
Vista users are not so lucky- they face paying for an upgrade to get the OS that Vista should have been- i.e. Windows 7, a.k.a. Vista SP3.
Does staying with XP make sense. Well, XP is actually faster in some tests than Vista and Windows 7. Scott M. Fulton, III at BetaNews gives this reasonable advice:
Meanwhile, many very intelligent XP users who skipped out on the whole Vista debacle, may be considering whether to purchase a Windows 7 "upgrade" package, or a new computer with Win7 already on it. The dilemma for them has less to do with the operating system than with the state of their computer: Too many 2002-era single-core PCs out there have a single hard drive that's littered with media files and documents that have never been offloaded, perhaps never even backed up. Many are running Office XP, because their businesses run Office XP (on Windows 2000), perhaps because they can't install a newer version of Office without breaking their VPN software. Like bacteria cultures, their computers have become mossy, overgrown hives of inactivity, where sometimes the Internet works and sometimes it doesn't.

For these's time already. The world has evolved, and it's a lot nicer out here now. It's time for that long-overdue visit to the toxic waste disposal facility.

On the other hand, if you are running Windows XP on a modern, multi-core system, that's well-managed with its data files on an independent drive from the system device, whose networking is fast and crystal-clear, whose media files are all well organized, and that's secured by hardware and software firewalls along with non-intrusive anti-malware utilities, then is there a compelling reason for you to consider keeping the hardware and upgrading the operating system to Windows 7?

I say there is: The genuine advances that the Vista kernel (especially the 64-bit kernel) made to system security are all present in Windows 7 (which even technically speaking is really Windows 6.1). The truly good ideas that Vista advanced, especially with regard to software access policies, are all present in Windows 7. But you're not paying a significant performance penalty for them.
Does it make sense to pay for an upgrade?
Even after reading this, one question probably still remains on many readers' minds: If Windows 7 truly represents the level of functionality that Vista should have provided from the beginning, then shouldn't Microsoft be paying for it and not the public?

If Vista were an insecure system, then I would say yes. It was not. It was an annoying system, especially with "features" like the Black Screen of Death. But it was not Windows Me, the travesty of code that represents the absolute nadir of Microsoft's development history, the "Disco Era" for Windows.

Even then, however, I said Windows XP was worth paying for. XP -- the first version, the one I said in hindsight was desperately in need of a transplant. The fact that I value my time (with a calculator) is just one reason. The fact that I value the developers' time spent making this work, is the other. Yes, I've said Windows 7 is "Vista Service Pack 3," and I stand by that. But in terms of the work Microsoft's people are genuinely devoting to improving the quality of this product (whose quality needed improvement), I do believe it is worth the investment. Windows Me was not worth the investment; Windows 98 (pre-OSR2) was not worth the investment.

But as anyone who's done the work knows, cleaning up crap is a dirty job. Someone has to do it, and there are days I'm glad it's not me. Windows 7 is cleaner, brighter, and sanitized for your convenience. And that's worth the tip.
I honestly look forward to trying out Windows 7 at some point in the future- but for the life of this computer, it will run XP SP3 and, of course, the latest version of Ubuntu.