Cyrus::Annotator::Daemon - framework for writing annotator daemons for Cyrus
our @ISA = qw(Cyrus::Annotator::Daemon);
my ($self, $message) = @_;
This module provides a framework for writing daemons which can be used to add
annotations or flags to messages which are delivered into the Cyrus mail
To use Cyrus::Annotator::Daemon, write a Perl script which creates an object
derived from it; see the Synposis above. Run this script as root, and it will
daemonize itself. Then add this line to the imapd.conf file
and restart Cyrus.
Cyrus::Annotator::Daemon has the following methods.
- This class method can be used to create an instance of
Cyrus::Annotator::Daemon and to run it's main loop. Note that
Cyrus::Annotator::Daemon derives from Net::Server, and any of that
module's options can be used.
MyAnnotatorDaemon->run(personality => 'Fork');
Cyrus::Annotator::Daemon changes some of the Net::Server defaults,
- Logging is to syslog using facility local6.
- The network socket is a SOCK_STREAM UNIX domain
socket bound to /var/run/annotatord.socket.
- A PID file is written to
- The daemon runs in the background, as user cyrus and
- You need to provide a method of this name. It will be
called whenever Cyrus notifies the annotator daemon that a new message is
available, and may set or clear any flags (system or user flags) or
annotations. Note that to set any annotations which aren't builtin to
Cyrus, you will first need to configure them using
annotation_definitions option in the imapd.conf file.
The $message object is a Cyrus::Annotator::Message
which can be examined, and on which flags and annotations can be set.
Greg Banks <email@example.com>.