Recommend a replacement for mailwatch-plugin?

Grant Edwards grant.b.edwards at gmail.com
Tue Sep 21 17:08:47 CEST 2010


On 2010-09-20, Liviu Andronic <landronimirc at gmail.com> wrote:

> Have you come up with a releasable IMAP notifier? I'm getting
> mailwatch crashes (with lost configs) and I'd like to try something
> new if available.

My mail notifier is available at:

  http://www.panix.com/~grante/files/imapnotify-0.10.tar.gz

It requires Python and pyGTK.

Here's the imapnotify Readme.txt file:




Imapnotify is an email notification agent written in Python using
pyGTK and imaplib2.py (with some local changes that have been
submitted upstream).  As the name implies, it only works with IMAP
servers.  It doesn't do POP, mbox, maildir, mh, or anything else.

It is a bit of a memory hog.  On the author's computer monitoring 4
mailboxes, imapnotify as a resident set size of 16MB and a virtual set
size of 169M.  9MB is shared with other applications that are using
Python and/or Gtk, so in practical terms it's not all that bad.

Imapnotify uses the IMAP idle command which allows the IMAP server to
"push" notification to the client immediately upon arrival of new mail
(or deletion of messages).  This has two advantages:

  1) Much lower CPU usage compared to notifiers such as XFCE's
     mailwatch panel plugin which opens a new connection for each
     poll.  If SSL encyryption is being used, there is a significant
     amount of overhead involved in setting up a connection that is
     then only used to send a single command.

  2) Lower latency notification.  The user is notified within seconds
     of new mail being received.

The Imapnotify UI consists of a vertical array of GTK buttons whose
labels change color from black to red when new mail is present in the
associated mailbox.  Imapnotify can be configured to monitor any
number of mailboxes on any number of servers.

Each button in the UI can be configured to run a shell command when
clicked.  Assuming the shell command is used to start a MUA,
imapnotify will recheck the mailbox status after the shell command
terminates.

Configuration is done through a config file and command-line options.

Command line Options:

  -h, --help                          show this help message and exit
  -l FILE, --log=FILE                 write log to FILE
  -v LEVEL, --verbose=LEVEL           verbosity level
  -g GEOMETRY, --geometry=GEOMETRY    X11 geometry string

On startup, imapnotify will attempt to read a config file from
$HOME/.imapnotifyrc

The config file is parsed using the Python standard library's
configparser module:

 http://docs.python.org/release/2.6.6/library/configparser.html

A section header of Application identifies application-wide
settings.  The available application-wide settings are:

   stick         

         If set to 'yes', the imapnotify window will stick to it's
         place on the root window even when virtual desktops are
         changed.  Default is 'yes'.

   decorated

         If set to 'yes', the window manager hints will be set to
         allow normal window decorations (borders, buttons, etc.).
         Default is 'no'.

   keepontop

         If set to 'yes', the imapnotify window will be configured
         to stay on top of all other application windows.  Default is
         'yes'.

   skiptaskbar

         If set to 'yes', the imapnotify window will not appear in
         desktop manager taskbars.  Default is 'yes'.

   skippager

         If set to 'yes', the imapnotify window will not appear in
         desktop manager pagers.  Default is 'yes'.

   title

         The imapnotify window title.  Default is 'IMAP Notifier'.


Any section with a name other than Application defines a mailbox
configuration.  The UI button will have the same name as the section,
and the buttons will appear in the same order as the configuration
sections in the config file. Mailbox configuration settings are as
follows:

   server

         The IMAP server.

   username

         The username to use when logging into the IMAP server.

   password

         The password to use when logging into the IMAP server.

   boxname

         The mailbox name to watch for new mail

   polltime

         The polling period to use if the IMAP server doesn't support
         push notification via the "idle" command.

   cmd

         The shell command to execute when the button is clicked.

   delayedexpunge

         Set to true if the IMAP server is slow in expunging deleted
         messages.  The issue that this is meant to solve is the case
         where the user clicks a notifier button starting an MUA,
         reads or deletes new messages, and exits.  Imapnotify will
         re-check the mailbox status when the MUA exits.  On some
         servers, the status won't change immediately and imapnotify
         will still see "new" mail that has just been deleted or
         marked read.  Setting delayedexpunge will cause imapnotify
         to delay for a short while before re-checking the mailbox
         status after the MUA exits.


Here is a sample .imapnotifyrc file that defines two mailboxes to be
monitored:

------------------------------.imapnotifyrc------------------------------
[Application]
stick = no
keepontop = no

[Panix]
username = mypanixusername
password = mypanixpassword
server = imap.panix.com
cmd = aterm -T mutt -n 'mutt panix' -ls -e mutt -F ~/.muttrc.panix
delayedexpunge = yes

[Gmail]
username = mygmailuseranme
password = mygmailpassword
server = imap.gmail.com
cmd = aterm -T 'mutt gmail' -n 'mutt gmail' -ls -e mutt -F ~/.muttrc.gmail
--------------------------------------------------------------------------




More information about the Xfce mailing list