| Daemon(3pm) | User Contributed Perl Documentation | Daemon(3pm) |
Cyrus::Annotator::Daemon - framework for writing annotator daemons for Cyrus
use warnings;
use strict;
package MyAnnotatorDaemon;
use Cyrus::Annotator::Daemon;
our @ISA = qw(Cyrus::Annotator::Daemon);
sub annotate_message
{
my ($self, $message) = @_;
$message->set_flag('\Flagged');
$message->set_shared_annotation('/comment', 'Hello!!');
}
MyAnnotatorDaemon->run();
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 server.
To use Cyrus::Annotator::Daemon, write a Perl script which creates an object derived from it; see the Synopsis above. Run this script as root, and it will daemonize itself. Then add this line to the imapd.conf file
annotation_callout: /var/run/annotatord.socket
and restart Cyrus.
Cyrus::Annotator::Daemon has the following methods.
For example:
MyAnnotatorDaemon->run(personality => 'Fork');
Cyrus::Annotator::Daemon changes some of the Net::Server defaults, including:
The $message object is a Cyrus::Annotator::Message which can be examined, and on which flags and annotations can be set.
Net::Server, imapd.conf(5), RFC3501, RFC5257.
Greg Banks <gnb@fastmail.fm>.
| 2025-01-22 | perl v5.40.0 |