1managesieve(3)        User Contributed Perl Documentation       managesieve(3)
2
3
4

NAME

6       Cyrus::SIEVE::managesieve - Perl client for the SIEVE protocol
7

SYNOPSIS

9         use Cyrus::SIEVE::managesieve;
10

DESCRIPTION

12       This is a Perl module which provides a client for the SIEVE protocol.
13       It supports SASL authentication and communication encryption, using the
14       Cyrus SASL infrastructure.
15
16       It provides the following functions.
17
18       sieve_get_handle($servername, &username_cb, &authname_cb, &password_cb,
19       &realm_cb)
20           Creates and returns a new Sieve object which can be used for
21           communicating with the SIEVE server.  The server is connected to
22           and a login sequence is performed, using some combination of the
23           given callbacks to fetch from the calling program any data needed
24           for authentication.
25
26           The servername may take any of the forms
27
28           hostname
29           hostname:port
30           ipv4address
31           ipv4address:port
32           [ipv6address]
33           [ipv6address]:port
34
35           If not explicitly specified in the servername, the port defaults to
36           the port named "sieve" in the client machine's service database
37           (for example the "/etc/services" files), or 4190.
38
39           All the callbacks are called with the following arguments
40
41           $string = callback($which, $prompt);
42
43           where which is one of the strings "username", "authname",
44           "getpass", or "realm" respectively, and prompt is a human-readable
45           English language prompt string for the user's benefit.  Each
46           callback should return a string containing the required
47           information.
48
49           The function will return undef on error, use sieve_get_global_error
50           to get a description of the error.
51
52       sieve_get_error($sieveobj)
53           Returns a human-readable English language string describing the
54           last error encountered on the object $sieveobj.
55
56       sieve_get_global_error()
57           Returns a human-readable English language string describing the
58           last error encountered while creating a Sieve object.
59
60       sieve_logout($sieveobj)
61           Log out from the SIEVE server.  The $sieveobj will become unusable.
62
63       sieve_put_file($sieveobj, $filename)
64           Installs a SIEVE script contained in a local file named by
65           $filename to the server.  The name of the script on the server will
66           be the basename of $filename.  Returns zero on success and non-zero
67           on failure.
68
69       sieve_put_file_withdest($sieveobj, $filename, $destname)
70           Like sieve_put_file but also specifies the name of the file on the
71           server.  Any directory part of $destname is ignored.
72
73       sieve_put($sieveobj obj, $name, $data)
74           Installs a SIEVE script contained in the scalar $data to the
75           server, with the script name $name.  Returns zero on success and
76           non-zero on failure.
77
78       sieve_delete($sieveobj obj, $name)
79           Removes a SIEVE script from the server.  Returns zero on success
80           and non-zero on failure.
81
82       sieve_list($sieveobj obj, &callback)
83           Lists existing SIEVE scripts on the server.  The &callback returns
84           no value and is called once for each script on the server, with
85           arguments
86
87           callback($name, $is_active)
88
89           sieve_list returns zero on success and non-zero on failure.
90
91       sieve_activate($sieveobj, $name)
92           Makes the script named $name the active script on the server.  Only
93           one script is active at a time; activating a script de-activates
94           any others.  Returns zero on success and non-zero on failure.
95
96       sieve_get($sieveobj, $name, $output)
97           Retrieves the SIEVE script named <$name> from the server, and
98           stores it in the scalar $output.  Returns zero on success and non-
99           zero on failure.
100

AUTHOR

102       T. Martin, tmartin@andrew.cmu.edu
103

SEE ALSO

105       RFC5804, A Protocol for Remotely Managing Sieve Scripts.
106
107
108
109perl v5.30.1                      2019-11-22                    managesieve(3)
Impressum