Discussion:
Recommend a replacement for mailwatch-plugin?
Grant Edwards
2010-06-08 18:45:02 UTC
Permalink
Can anybody recommend a good replacement for the mailwatch plugin? It
crashes several times a day and takes its configuraiton down the drain
with it. I've got a script that repairs the panel and mailwatch
configurations and restarts things, but it's getting a bit tiresome.

What other mail notification programs work well with XFCE?
--
Grant Edwards grant.b.edwards Yow! A dwarf is passing out
at somewhere in Detroit!
gmail.com
Mike Massonnet
2010-06-08 18:49:30 UTC
Permalink
Post by Grant Edwards
Can anybody recommend a good replacement for the mailwatch plugin?
Yes mail-notification, it runs in the notification area.

Mike
Post by Grant Edwards
What other mail notification programs work well with XFCE?
--
Grant Edwards ? ? ? ? ? ? ? grant.b.edwards ? ? ? ?Yow! A dwarf is passing out
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?at ? ? ? ? ? ? ? somewhere in Detroit!
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?gmail.com
_______________________________________________
Xfce mailing list
Xfce at xfce.org
http://foo-projects.org/mailman/listinfo/xfce
http://www.xfce.org
--
Mike
Tino Keitel
2010-06-09 19:07:39 UTC
Permalink
Post by Mike Massonnet
Post by Grant Edwards
Can anybody recommend a good replacement for the mailwatch plugin?
Yes mail-notification, it runs in the notification area.
Looks really fat regarding dependencies, but at least it can notify
about new mails in a Maildir without delay.

Regards,
Tino
Grant Edwards
2010-06-10 13:57:08 UTC
Permalink
Post by Mike Massonnet
Post by Grant Edwards
Can anybody recommend a good replacement for the mailwatch plugin?
Yes mail-notification, it runs in the notification area.
It looks like a nice program but it's a bit heavyweight. It requires
that I install Gnome. I'd like something that requires only XFCE/GTk.

I guess I'll write my own. PyGTK is pretty straight-forward. The only
mailbox type I need support for is IMAP, and Python has a nice library
(imaplib2) that supports IDLE.
--
Grant Edwards grant.b.edwards Yow! My Aunt MAUREEN was a
at military advisor to IKE &
gmail.com TINA TURNER!!
Grant Edwards
2010-06-11 20:40:31 UTC
Permalink
Post by Grant Edwards
Post by Mike Massonnet
Post by Grant Edwards
Can anybody recommend a good replacement for the mailwatch plugin?
Yes mail-notification, it runs in the notification area.
It looks like a nice program but it's a bit heavyweight. It requires
that I install Gnome. I'd like something that requires only XFCE/GTk.
I guess I'll write my own. PyGTK is pretty straight-forward. The only
mailbox type I need support for is IMAP, and Python has a nice library
(imaplib2) that supports IDLE.
FWIW, I threw together an IMAP notifier in Python using PyGTK and
imaplib2, and it's working nicely under "normal" circumstances. I
haven't had time to set up tests for things like dropped network
connections, servers timing out, temporary login failures, etc. It's
about 150 lines of code and it has a couple features that I wanted but
couldn't find in other apps:

1) Support for IMAP IDLE. That provides "instant" notification of
new mail without having to poll the server on a short cycle.

2) After you click on a mailbox button to run an app (mutt, in my
case), and that app terminates, it will immediately poll the
mailbox to catch any changes that were made by that app.

The second feature isn't required if you delete/move new messages,
since IMAP IDLE will send an immediate notification of those changes.

However, if you read the new mail and then leave it in the INBOX, IMAP
IDLE won't notify you of the change in flag values. [There is an IMAP
extension that will notify you of flag changes, but it's not supported
by any of the servers I use.]

Use of a persistent IMAP connection and the IDLE command results in
both quicker notification and much less overhead than the
new-ssl-connection-and-login for every poll cycle scheme that the
mailwatch plugin uses.

If the server doesn't support IMAP idle, it falls back on a normal
polling scheme (it still uses a persistent connection to avoid the
overhead of repeated SSL session setup and IMAP logins).

It's not a panel plugin, so it doesn't integrate quite as much with
XFCE.

It's a bit heavyweight when it comes to memory usage with a resident
set size of about 5MB (non-shared), but the ease of development and
testing when using Python makes it worth it.

I'll make the code available after I do some more testing and move the
configuration info into an external file.
--
Grant Edwards grant.b.edwards Yow! Youth of today!
at Join me in a mass rally
gmail.com for traditional mental
attitudes!
Liviu Andronic
2010-09-20 20:55:16 UTC
Permalink
Dear Grant
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.

Thank you
Liviu


On Fri, Jun 11, 2010 at 11:40 PM, Grant Edwards
Post by Grant Edwards
FWIW, I threw together an IMAP notifier in Python using PyGTK and
imaplib2, and it's working nicely under "normal" circumstances. ?I
haven't had time to set up tests for things like dropped network
connections, servers timing out, temporary login failures, etc. ?It's
about 150 lines of code and it has a couple features that I wanted but
?1) Support for IMAP IDLE. ?That provides "instant" notification of
? ?new mail without having to poll the server on a short cycle.
?2) After you click on a mailbox button to run an app (mutt, in my
? ?case), and that app terminates, it will immediately poll the
? ?mailbox to catch any changes that were made by that app.
The second feature isn't required if you delete/move new messages,
since IMAP IDLE will send an immediate notification of those changes.
However, if you read the new mail and then leave it in the INBOX, IMAP
IDLE won't notify you of the change in flag values. ?[There is an IMAP
extension that will notify you of flag changes, but it's not supported
by any of the servers I use.]
Use of a persistent IMAP connection and the IDLE command results in
both quicker notification and much less overhead than the
new-ssl-connection-and-login for every poll cycle scheme that the
mailwatch plugin uses.
If the server doesn't support IMAP idle, it falls back on a normal
polling scheme (it still uses a persistent connection to avoid the
overhead of repeated SSL session setup and IMAP logins).
It's not a panel plugin, so it doesn't integrate quite as much with
XFCE.
It's a bit heavyweight when it comes to memory usage with a resident
set size of about 5MB (non-shared), but the ease of development and
testing when using Python makes it worth it.
I'll make the code available after I do some more testing and move the
configuration info into an external file.
--
Grant Edwards ? ? ? ? ? ? ? grant.b.edwards ? ? ? ?Yow! Youth of today!
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?at ? ? ? ? ? ? ? Join me in a mass rally
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?gmail.com ? ? ? ? ? ?for traditional mental
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? attitudes!
_______________________________________________
Xfce mailing list
Xfce at xfce.org
http://foo-projects.org/mailman/listinfo/xfce
http://www.xfce.org
--
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Grant Edwards
2010-09-20 21:43:40 UTC
Permalink
Post by Liviu Andronic
Have you come up with a releasable IMAP notifier?
I've been using on a couple different machines for a few months now,
and I'm happy with it. It's a bit of a memory hog, but at least it
works.
Post by Liviu Andronic
I'm getting mailwatch crashes (with lost configs) and I'd like to try
something new if available.
Sure. I need to write up a Readme file for it. I'll try to do that
this evening.
--
Grant Edwards grant.b.edwards Yow! ... I want FORTY-TWO
at TRYNEL FLOATATION SYSTEMS
gmail.com installed within SIX AND A
HALF HOURS!!!
Grant Edwards
2010-09-21 15:08:47 UTC
Permalink
Post by Liviu Andronic
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
--------------------------------------------------------------------------
Grant Edwards
2010-09-22 22:47:55 UTC
Permalink
Post by Grant Edwards
http://www.panix.com/~grante/files/imapnotify-0.10.tar.gz
It requires Python and pyGTK.
Just to clarify: This isn't an XFCE panel plugin or applet or widget
or anything like that.

It is a stand-alone X11/Gtk application.

[I supposed there's a chance it will work on other, non-X11 platforms
that support PyGTK, but don't be surprised if it doesn't.]

It doesn't use any XFCE libraries or APIs.

It does know how to deal with window managers in order to control
window decoration, stay-on-top, pinning to desktop, and presence in
taskbar and pager.

I posted the link here because I used to use XFCE's mailwatch panel
plugin, and this is where the question of a replacement started.
--
Grant Edwards grant.b.edwards Yow! But they went to MARS
at around 1953!!
gmail.com
Stefan Stuhr
2010-09-23 01:28:27 UTC
Permalink
Post by Grant Edwards
Just to clarify: This isn't an XFCE panel plugin or applet or widget
or anything like that.
It is a stand-alone X11/Gtk application.
[...]
I posted the link here because I used to use XFCE's mailwatch panel
plugin, and this is where the question of a replacement started.
The launcher plugin in the future xfce4-panel 4.8 will be based on
.desktop files, and watches said .desktop files for changes. I am
using xfce4-panel from git, and I have a script running that checks
the atom feed for my GMail inbox and updates the .dekstop file (icon
and comment/tooltip) for my mail launcher. Result: Mail watcher in the
panel, integrated with the launcher, and said launcher have a submenu
with more launcher items.

It also updates the icon of my trash launcher item, as I want to have
it in a launcher submenu, while still showing whether the trash
contains files or not.

Stefan
Grant Edwards
2010-10-08 16:57:48 UTC
Permalink
Post by Grant Edwards
Post by Grant Edwards
http://www.panix.com/~grante/files/imapnotify-0.10.tar.gz
It requires Python and pyGTK.
Just to clarify: This isn't an XFCE panel plugin or applet or widget
or anything like that.
It is a stand-alone X11/Gtk application.
Based on user input, I've made a few changes and a new version is
available:

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

Changes since 0.10:

* Added -f, --config-file command-line option.

* Added ability to show number of unseen mails in tooltip and in
button labels.

* Buttons are now yellow when IMAP connection to mailbox is not up.

* Added support for 'desktop' window manager hint. [No, I don't know
what this is supposed to do.]

* Added support for 'keep_below' window manager hint.

* Changed default values so that the application window defaults to
being a "normal" decorated X11 window that shows up in taskbar and
pager.
--
Grant Edwards grant.b.edwards Yow! I'm DESPONDENT ... I
at hope there's something
gmail.com DEEP-FRIED under this
miniature DOMED STADIUM ...
Tino Keitel
2010-06-16 04:48:28 UTC
Permalink
Post by Mike Massonnet
Post by Grant Edwards
Can anybody recommend a good replacement for the mailwatch plugin?
Yes mail-notification, it runs in the notification area.
Did you actually try this in XFCE? It looks like mail-notification uses
HTML or something, which xfce4-notifyd does not understand, which makes
the notifications look pretty ugly.

Regards,
Tino
Yves-Alexis Perez
2010-06-16 05:23:14 UTC
Permalink
Post by Tino Keitel
Did you actually try this in XFCE? It looks like mail-notification uses
HTML or something, which xfce4-notifyd does not understand, which makes
the notifications look pretty ugly.
I seem to recall it was supported in development version, which is still
not released despite various attempts, so you might want to try it just
to confirm that.

Cheers,
--
Yves-Alexis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://mail.xfce.org/pipermail/xfce/attachments/20100616/2d0b6bc4/attachment.pgp>
Brian J. Tarricone
2010-06-21 06:15:28 UTC
Permalink
Post by Yves-Alexis Perez
Post by Tino Keitel
Did you actually try this in XFCE? It looks like mail-notification uses
HTML or something, which xfce4-notifyd does not understand, which makes
the notifications look pretty ugly.
I seem to recall it was supported in development version, which is still
not released despite various attempts, so you might want to try it just
to confirm that.
No, xfce4-notifyd has supported the html/xml/pango markup subset that is
detailed in the notifications spec from the start. If mail-notification
is sending arbitrary html to the notifications daemon, that's a bug with
mail-notification.

-brian
Yves-Alexis Perez
2010-06-21 06:19:55 UTC
Permalink
Post by Brian J. Tarricone
Post by Yves-Alexis Perez
Post by Tino Keitel
Did you actually try this in XFCE? It looks like mail-notification uses
HTML or something, which xfce4-notifyd does not understand, which makes
the notifications look pretty ugly.
I seem to recall it was supported in development version, which is still
not released despite various attempts, so you might want to try it just
to confirm that.
No, xfce4-notifyd has supported the html/xml/pango markup subset that is
detailed in the notifications spec from the start. If mail-notification
is sending arbitrary html to the notifications daemon, that's a bug with
mail-notification.
Btw I noticed the same thing with quodlibet, so it might make sense to
investigate what the app are sending (using dbus monitor) and compare
with correct markup. Then report bug where needed.

Cheers,
--
Yves-Alexis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://mail.xfce.org/pipermail/xfce/attachments/20100621/6a924a30/attachment.pgp>
Tino Keitel
2010-06-22 05:20:08 UTC
Permalink
On Mon, Jun 21, 2010 at 08:19:55 +0200, Yves-Alexis Perez wrote:

[...]
Post by Yves-Alexis Perez
Btw I noticed the same thing with quodlibet, so it might make sense to
investigate what the app are sending (using dbus monitor) and compare
with correct markup. Then report bug where needed.
The mail-notification test message looks like this in dbus-monitor:

string "<span weight="bold">Mailbox:</span> Test mailbox
<span weight="bold">From:</span> Mail Notification Properties Dialog
<span weight="bold">Subject:</span> Test message #1"
array [
]
array [
dict entry(
string "x"
variant int32 -8401
)
dict entry(
string "y"
variant int32 -8968
)
dict entry(
string "xdisplay"
variant string ":0.0"
)
]

The markup is shown as normal text here.

Regards,
Tino
Tino Keitel
2010-07-14 06:27:41 UTC
Permalink
Post by Tino Keitel
[...]
Post by Yves-Alexis Perez
Btw I noticed the same thing with quodlibet, so it might make sense to
investigate what the app are sending (using dbus monitor) and compare
with correct markup. Then report bug where needed.
string "<span weight="bold">Mailbox:</span> Test mailbox
<span weight="bold">From:</span> Mail Notification Properties Dialog
Hi,

from looking at
http://www.galago-project.org/specs/notification/0.9/x161.html, <span>
is not specified and it is stated that "notifications should never take
advantage of tags that are not listed above", so I think it's a bug.
The same applies to the banshee music player.

Regards,
Tino
Yves-Alexis Perez
2010-07-14 07:15:44 UTC
Permalink
Post by Tino Keitel
from looking at
http://www.galago-project.org/specs/notification/0.9/x161.html, <span>
is not specified and it is stated that "notifications should never take
advantage of tags that are not listed above", so I think it's a bug.
The same applies to the banshee music player.
It seems that the latest spec version is
http://git.gnome.org/browse/libnotify/tree/docs/notification-spec.xml
(generated pdf attached).

Cheers,
--
Yves-Alexis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: notification-spec.pdf
Type: application/pdf
Size: 164818 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/xfce/attachments/20100714/d7d15ba0/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://mail.xfce.org/pipermail/xfce/attachments/20100714/d7d15ba0/attachment.pgp>
houghi
2010-06-09 08:03:38 UTC
Permalink
Post by Grant Edwards
Can anybody recommend a good replacement for the mailwatch plugin? It
crashes several times a day and takes its configuraiton down the drain
with it. I've got a script that repairs the panel and mailwatch
configurations and restarts things, but it's getting a bit tiresome.
What other mail notification programs work well with XFCE?
What I use is wmbiff. It is from Windowmaker. The reason I use it is
because it lets me configure the running of any program per mailbox. That
way I can use a line like:
action.3=xterm -geometry 100x79 -sb -T 'Funny stuff' -name mutt -e mutt -f
/home/houghi/Mail/humor

It also shows me immediatly how many new mails there are, so no need to
first go to it with my mouse or use any other warning. I have 4 different
wmbiffs running so I can see my 20 different mailboxes.


houghi
--
________________________ Open your eyes, open your mind
| proud like a god don't pretend to be blind
| trapped in yourself, break out instead
http://openSUSE.org | beat the machine that works in your head
Grant Edwards
2010-06-10 14:02:08 UTC
Permalink
Post by houghi
Post by Grant Edwards
Can anybody recommend a good replacement for the mailwatch plugin? It
crashes several times a day and takes its configuraiton down the drain
with it. I've got a script that repairs the panel and mailwatch
configurations and restarts things, but it's getting a bit tiresome.
What other mail notification programs work well with XFCE?
What I use is wmbiff.
That's one I hadn't found yet. It looks promising -- do you know if
it supports IMAP IDLE or persistent connections? One of the things
I'd like to avoid is the connect/login/logout/disconnect cycle that
the mailwatch-plugin did for every poll.

The 5-mailbox limitation seems rather arbitrary.
--
Grant Edwards grant.b.edwards Yow! I joined scientology
at at a garage sale!!
gmail.com
Loading...