[Users] Triggering a command every time marking the email status as read/unread.

Paul paul at claws-mail.org
Fri Dec 27 08:48:28 UTC 2024


On Fri, 27 Dec 2024 06:11:14 +0200
Herman <mahlamytsike at gmail.com> wrote: 

> What would be the easiest way to run a command each time marking email read
> / unread or when count of unread messages changes ?
> 
> The aim would be to send out the following command: /usr/bin/pkill -SIGUSR2
> -f libmailwatch .

If I understand you correctly, you are having a problem with XFCE's mail
watcher plugin, which is getting the message counts wrong, and you want to fix
XFCE's plugin by getting Claws Mail to interact with it. This seems to be
going at the problem backwards.

Why not just use one of the modules from Claws Mail's Notification plugin
instead? That would be the easiest way as there is no way to run an external 
command in Claws Mail when the status of a message changes.

Alternately, use a script, for example, to monitor the output of the command
`claws-mail --status`, which would compare the outputted numbers. This
commands shows you the number of email messages: new, unread, total.

Maybe your problem is also related to the fact that gmail's imap
implementation was designed to break the standard tri-state of email: new,
unread, and read. It recognises only the latter two, not differentiating
between new and unread. Does the XFCE mail watcher plugin also have that
limitation?

with regards

Paul


More information about the Users mailing list