managesieve(3)

πŸ’– managesieve πŸ’–

okay so welcome to the manual page for Cyrus::SIEVE::managesieve, coming at you straight out of the User Contributed Perl Documentation ✨


🌸 NAME 🌸

Cyrus::SIEVE::managesieve β€” Perl client for the SIEVE protocol πŸ¦‹


✨ SYNOPSIS ✨

use Cyrus::SIEVE::managesieve;

πŸŽ€ DESCRIPTION πŸŽ€

bestie. this is a Perl module that hands you a whole client for the SIEVE protocol. it does SASL authentication and communication encryption, and it gets all of that from the Cyrus SASL infrastructure. iconic behaviour honestly πŸ’…

it gives you the following functions. buckle up, there's a few 🫢


πŸ’Œ sieve_get_handle($servername, &username_cb, &authname_cb, &password_cb, &realm_cb)

this one creates and returns a brand-new Sieve object, and you use that object to talk to the SIEVE server. it connects to the server and runs a login sequence, and it pulls whatever authentication data it needs straight out of your calling program using some combination of the callbacks you passed in. very "it takes a village" of it 🌈

the $servername can be any of these forms:

hostname
hostname:port
ipv4address
ipv4address:port
[ipv6address]
[ipv6address]:port

if you don't spell out a port in the $servername, the port defaults to the port named "sieve" in the client machine's service database (like, the /etc/services files, iykyk), or else 4190. πŸ’«

all of the callbacks get called with these arguments:

$string = callback($which, $prompt);

where $which is one of the strings "username", "authname", "getpass", or "realm" β€” respectively, obviously β€” and $prompt is a human-readable English-language prompt string for the user's benefit. every callback should return a string with the info that was asked for. no cap. πŸ“

if something goes wrong, this function returns undef. use sieve_get_global_error to find out what the error actually was 😭

πŸ’Œ sieve_get_error($sieveobj)

returns a human-readable English-language string describing the last error that happened on the object $sieveobj. your little error gossip source πŸ’…


πŸ’Œ sieve_get_global_error()

returns a human-readable English-language string describing the last error that happened while creating a Sieve object. for when the creation itself was the drama πŸ‘‘


πŸ’Œ sieve_logout($sieveobj)

logs out from the SIEVE server. heads up bestie: after this, $sieveobj becomes unusable. it's giving "we don't talk anymore" πŸ’€


πŸ’Œ sieve_put_file($sieveobj, $filename)

installs a SIEVE script to the server, and that script lives in the local file named by $filename. the name of the script on the server will be the basename of $filename. returns zero on success and non-zero on failure βœ…


πŸ’Œ sieve_put_file_withdest($sieveobj, $filename, $destname)

like sieve_put_file, except it also lets you specify the name of the file on the server. any directory part of $destname is ignored. so don't bother being fancy with the paths πŸŽ€


πŸ’Œ sieve_put($sieveobj obj, $name, $data)

installs a SIEVE script to the server, and this time the script is contained in the scalar $data, with the script name $name. returns zero on success and non-zero on failure ✨


πŸ’Œ sieve_delete($sieveobj obj, $name)

removes a SIEVE script from the server. returns zero on success and non-zero on failure. bye bye script πŸ¦‹


πŸ’Œ sieve_list($sieveobj obj, &callback)

lists the SIEVE scripts that already exist on the server. the &callback returns no value and gets called once for every script on the server, with these arguments:

callback($name, $is_active)

sieve_list returns zero on success and non-zero on failure. it's basically a vibe check for your script collection 🌈


πŸ’Œ sieve_activate($sieveobj, $name)

makes the script named $name the active script on the server. only one script is active at a time β€” activating a script de-activates any others. there can only be one main character, periodt πŸ‘‘ returns zero on success and non-zero on failure.


πŸ’Œ sieve_get($sieveobj, $name, $output)

retrieves the SIEVE script named $name from the server, and stores it in the scalar $output. returns zero on success and non-zero on failure. fetching your script like it's a thirst trap 😌


🌟 AUTHOR 🌟

T. Martin, tmartin@andrew.cmu.edu πŸ’œ


πŸ‘€ SEE ALSO πŸ‘€

RFC5804, A Protocol for Remotely Managing Sieve Scripts.


and that's the whole thing bestie, no notes 🫢 this was perl v5.42.3, dated 2026-09-11, and it's the managesieve(3) page β€” slay, go manage some sieve scripts, you got this πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from