Follow-up to my post about using Maildirs -with Ubuntu's messaging menu.

Brad, the original author, has indicated that he considered his code to be essentially WTFPL. I feel the same about my bits, and have added a COPYING file specifically indicating this license instead of the previous GPL3 license.

I have made some other changes since that last version:

  • The configuration values (frequency, directories) are now loaded from separate files. Default values are in /etc/maildir-indicator.conf, user-specific in $XDG_CONFIG_HOME/maildir-indicator.conf (or more likely, $HOME/.config/maildir-indicator.conf). This allows it to be installed system-wide and have users configure their own notifications.
  • The .desktop file has been cleaned up, and is now advertising "Maildir Indicator" instead of mutt. This is what will be read in the menu as well (though of course, clicking it runs whatever mail agent you want).
  • Cleaned up some debug messages to make the output a little easier to read
  • Changed 'path' to no longer have a trailing slash. I'm not sure what happens if you have a trailing slash on your paths, I didn't test it.

The program can still be used by grabbing the source from the Maildir-Indicator repository on Gitorious and running ./maildir-indicator in the directory you get. However, it also supports being installed system-wide, which can be done easily by installing it from the maildir-indicator PPA. Installing from the PPA will also set it to run automatically at login.

To use per-user configs, just copy the basic config to your .config directory, and edit it as needed:

cp /etc/maildir-indicator.conf $HOME/.config/maildir-indicator.conf


gedit $HOME/.config/maildir-indicator.conf

One minor issue is that it has no way to see that your config has changed. You need to kill the running version, and start a new one. I didn't worry about it since most people manually setting up maildir notifications are probably able to do that.

In the mean time, it seems that Brad has been busy as well! He's taken the version from my previous post and updated it to provide much better notifications. It now reads the message and puts the sender and subject lines in the notification bubble! Now when a message arrives you can decide whether to read it now or later without opening your mail.

There is a bit of a logic bug with how my version handled the notifications: If the number of new messages is the same or less than the last notification, then it doesn't re-notify. If you were notified of two messages, which you read, and a new one arrives before the program checked for new mail again, it won't notify you about the new message (though the icon stays lit up). It assumes you only read one of the messages. To solve this, we would need to actually check out each file -- not in-depth, just the filename is good. Brad's update goes beyond that. I'm not sure if he's filtering out already-notified messages or not, but most of the pieces are there in his new version.

The bad news is my packaging work and his notification work happened in parallel. I was away for a week and didn't see his updates until now that I'm posting this. I'll merge his notification code tomorrow and release an 0.4 package. For reference, I've imported his version in my git repository under a branch called 'brad' if you want to compare the differences (the merge should be fairly strait-forward).

I couldn't have said it better: "This is why I love Free/Open Source Software".

UPDATE 20110812: I've merged Brad's detailed notification changes (with a few changes), and made a few other fixes (Thanks Nick for pointing out an issue in the comments).