Daemon(3)
π Daemon(3) π
okay bestie, this page is from the User Contributed Perl Documentation and it's about Cyrus::Annotator::Daemon β literally the framework for writing annotator daemons for Cyrus. no cap. π¦
β¨ NAME β¨
Cyrus::Annotator::Daemon β framework for writing annotator daemons for Cyrus. slay. π
πΈ SYNOPSIS πΈ
here's the whole setup vibe:
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. iconic behavior honestly. β¨
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. periodt. π₯
π 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 its main loop. Note that Cyrus::Annotator::Daemon derives from Net::Server, and any of that module's options can be used. iykyk. π
For example:
MyAnnotatorDaemon->run(personality => 'Fork');
Cyrus::Annotator::Daemon changes some of the Net::Server defaults, including:
- Logging is to syslog using facility
local6. - The network socket is a
SOCK_STREAMUNIX domain socket bound to/var/run/annotatord.socket. - A PID file is written to
/var/run/annotatord.pid. - The daemon runs in the background, as user
cyrusand groupmail.
π 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::Serverimapd.conf(5)RFC3501RFC5257
π AUTHOR π
Greg Banks <gnb@fastmail.fm>. π
that's the whole page, bestie πΈ β from perl v5.42.3, dated 1980-01-01, and it came from the User Contributed Perl Documentation. mwah π
β¨
π¦ where this page comes from
- nixos 26.05: cyrus-imapd 3.12.4
- nixpkgs unstable: cyrus-imapd 3.12.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms