[Dovecot] New message notification
Stephan Bosch
stephan at rename-it.nl
Wed Nov 19 23:29:39 EET 2008
Juan Asensio Sánchez schreef:
> Hi
>
> What is the best option to notify a user that a message has arrived? The
> intention is to write a script that connects to a jabber server and checks
> if the user is online, so then a message is sent to user notifying him that
> he has received a new message. The solution should be compatible with Sieve
> filtering, so the script should not be executed when the message is moved to
> the SPAM folder, or pass to the script an argument specifying the folder
> where the message has been saved.
>
In an ideal world, the best option would be using the Sieve notify
extension with the xmpp (jabber) notify method. The Sieve community is
working on devising a new set of standards to achieve exactly what you
describe:
http://www.ietf.org/internet-drafts/draft-ietf-sieve-notify-12.txt
http://www.ietf.org/internet-drafts/draft-ietf-sieve-notify-xmpp-09.txt
However, although I am currently implementing support for notify/mailto
in the new Sieve plugin (to match cmusieve), I have no specific plans to
implement notify/xmpp in the near future. So, this is not directly of
much use to you. Maybe if it turns out to be really easy, I'll build a
plugin in my spare time.
For now, indeed, you will for instance have to write some sort of
wrapper script for deliver that sends notifications and duplicates some
of the tests that Sieve already performs in order to prevent notifying
SPAM messages. Alternatively, you could define a special (internal!)
mail address in the SMTP server that calls your notification script as
pipe transport. Then you can redirect messages from your Sieve script to
that mail address (e.g. user+notify at host.com) if you want to send
notifications. Still not very pretty though and potentially insecure if
you are not very careful. How to achieve this second alternative
precisely is a bit beyond me, as I am not that experienced in setting up
SMTP services.
Regards,
--
Stephan Bosch
stephan at rename-it.nl
More information about the dovecot
mailing list