GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CYRUS::ANNOTATOR::DAEMON (3)

.ds Aq ’

NAME

Cyrus::Annotator::Daemon - framework for writing annotator daemons for Cyrus

CONTENTS

SYNOPSIS



  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();



DESCRIPTION

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 Synposis 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.

METHODS

Cyrus::Annotator::Daemon has the following methods.
run(...options...) 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.

For example:



  MyAnnotatorDaemon->run(personality => Fork);



Cyrus::Annotator::Daemon changes some of the Net::Server defaults, including:
o Logging is to syslog using facility local6.
o The network socket is a SOCK_STREAM UNIX domain socket bound to /var/run/annotatord.socket.
o A PID file is written to /var/run/annotatord.pid.
o The daemon runs in the background, as user cyrus and group mail.

annotate_message($message) 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.

SEE ALSO

Net::Server, <B>imapd.confB>(5), RFC3501, RFC5257.

AUTHOR

Greg Banks <gnb@fastmail.fm>.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DAEMON (3) 2015-11-30

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.