sieve-protocol.html   [plain text]

<!-- $Id: sieve-protocol.html,v 1.3 2003/05/02 17:01:57 rjs3 Exp $ -->

<TITLE>Protocol for Sieve script exchange</TITLE>
<H1>Protocol for Sieve script exchange</H1>

<i>Please note that this document is not authoritative and may well be out
of date, you should look at <a href=specs.html>specs.html</a> for the
current authoritative document for the MANAGESIEVE protocol.</i>

Note: This is <b>not</b> a standards track protocol. If you decide to base
a program upon it you have been warned.

This is a simple text-based protocol for getting user sieve scripts
onto the (presumably sealed) IMAP server. The requirements for this
process are:

<li> the user must authenticate to gain access, preferably via a
secure SASL mechanism.
<li> only valid sieve scripts may be accepted

Additional features provided:

<li> the ability to manage multiple scripts on the server with zero or one
of them being the "active" sieve script


This a line oriented protocol much like [IMAP] or [ACAP]. There
are two types: ATOMS and strings. Strings may be quoted or
literal. See [ACAP] for detailed descriptions.

<i>sievename</i> is a string where only certain characters are
allowed and it must be at least 1 character long.


<DT><tt>AUTHENTICATE SP <i>string</i> [SP <i>string</i>] EOL</tt>
SASL authentication; the parameters are the mechanism and optionally
the initial data. Initial data is base64 encoded. The server
replies with a OK or NO response, or a string base64 encoded followed
by an EOL. Client then replies with a string base64 encoded followed
by an EOL and the procedure is repeated.

<DT><tt>NOOP EOL</tt>
No side affects. OK, NO replies

<DT><tt>LOGOUT EOL</tt>
Logout, terminates connection. OK, NO replies.

<DT><tt>GETSCRIPT SP <i>sievename</i> EOL</tt>

The parameter is the name of the requested script.
Returns: <tt>string EOL</tt> containing the script data.
Get the script with name <i>sievename</i> from the server. OK, NO replies

<DT><tt>PUTSCRIPT SP <i>sievename</i> SP <i>string</i> </tt> EOL
Puts <i>sievename</i> with data <i>data</i> onto the server if
possible. OK, NO replies.

<DT><tt> SETACTIVE SP <i>sievename</i> </tt>EOL
Set the script with the name <i>sievename</i> as the active
script. Any other script that was active is no longer. OK, NO replies

<DT><TT>DELETESCRIPT SP <i>sievename</i> </tt>EOL
Delete the script with <i>sievename</i>. OK or NO replies.

returns zero or more: <i>sievename</i> EOL.
where the active script has a '*' at the end of it's name
OK or NO replies