Daemon(3)
π NAME π
Cyrus::Annotator::Daemon β bestie, it's a whole framework for writing annotator daemons for Cyrus β¨
(this page lives in the Daemon(3) slot of the User Contributed Perl Documentation, btw π)
πΈ 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();
no cap, that's the whole vibe π
π¦ DESCRIPTION π¦
okay so this module is literally a framework for writing daemons that can be used to add annotations or flags to messages which get delivered into the Cyrus mail server. it's giving "let me decorate your inbox" π
to use Cyrus::Annotator::Daemon, you write a Perl script which creates an object derived from it β peep the Synopsis up there β¬οΈ. Run this script as root, and it will daemonize itself (main character energy, it just leaves and does its own thing π). Then add this line to the imapd.conf file:
annotation_callout: /var/run/annotatord.socket
and restart Cyrus. that's it. periodt. π
β¨ METHODS β¨
Cyrus::Annotator::Daemon has the following methods, bestie:
π 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. iykyk π«Ά
For example:
MyAnnotatorDaemon->run(personality => 'Fork');
Cyrus::Annotator::Daemon changes some of the Net::Server defaults, including:
- Logging is to
syslogusing facilitylocal6. - 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.
lowkey those are some very specific defaults and we are obsessed π
π 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. don't skip that step, bestie, it's not optional π
The $message object is a Cyrus::Annotator::Message which can be examined, and on which flags and annotations can be set. slay π
π₯ SEE ALSO π₯
Net::Serverimapd.conf(5)RFC3501RFC5257
π AUTHOR π
Greg Banks <gnb@fastmail.fm>.
and that's the whole page!! π this one's from perl v5.42.3, dated 2026-09-11, and it's the Daemon(3) manpage β thanks for reading all the way to the bottom, bestie, you ate π
β¨π¦
π¦ where this page comes from
- fedora 43: perl-Cyrus 3.10.4-1.fc43 Β· BSD-Attribution-HPND-disclaimer
- fedora 44: perl-Cyrus 3.12.4-1.fc44 Β· BSD-Attribution-HPND-disclaimer
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms