custom notifications

Felix Schumacher felix.schumacher at internetallee.de
Wed Feb 16 14:09:44 EST 2011


Hi Wolfgang,
Am Dienstag, den 15.02.2011, 10:37 +0100 schrieb Wolfgang Hennerbichler:
> Hi, 
> 
> I'd like to write a custom notification system (using xmmp or something like that, I don't know yet :)) for cyrus. 
> I've had a look at the notify_unix/simple_notify - file in the contrib-directory. It doesn't seem to work in my installation (the script doesn't log any notifications, although notifyd does for example notify zephyr, which works), or maybe I don't understand the concept of notifications. So I'd like to ask a couple of questions: 
> * does anybody have custom notifications up and running by reading the notification-socket of cyrus?
> * does notifyd need to be running in order to make the notify-socket readable, or is the notify-socket filled by the cyrus-master process? 
> * where would I find instructions on that? 
I have attached a python implementation of a notifyd, which we are using
together with cyrus imapd 2.2.12.

It has to be started as user cyrus (or whatever you are using to run
imapd with) and before you are starting cyrus imapd. 

It will try to remove an existing socket and recreate it, so it needs
enough rights to do it.

To resend the messages (events) it will need
http://code.google.com/p/stomppy/ and a stomp server. We are using
apache activemq for that.

Regards
 Felix

> 
> thanks a bunch, 
> wolfgang

-------------- next part --------------
A non-text attachment was scrubbed...
Name: notifyd.py
Type: text/x-python
Size: 9401 bytes
Desc: not available
Url : http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20110216/88af1ed4/attachment.py 
-------------- next part --------------
[stomp]
host=activemq.server.name
port=61613
user=guest
password=password
destination=/queue/GUEST.new_mails
[notifyd]
socket=/var/lib/imap/socket/notify
ignore_users=always_bcc
[logging]
file=/etc/notifyd.logging
handler=notifyd

-------------- next part --------------
# Loggingkonfiguration fuer notifyd und python-logging modul
[loggers]
keys=root,notifyd

[handlers]
keys=syslog

[formatters]
keys=form05

[logger_root]
level=NOTSET
handlers=syslog

[logger_notifyd]
level=INFO
handlers=syslog
qualname=notifyd
channel=notifyd
parent=root
propagate=0

[handler_syslog]
class=handlers.SysLogHandler
level=WARN
formatter=form05
args=(('localhost', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER)

[formatter_form05]
format="%(name)s: %(asctime)s %(levelname)s %(message)s"
datefmt=


More information about the Info-cyrus mailing list