1 \input texinfo @c -*-texinfo-*-
4 @settitle Emacs Sieve Manual
10 * Sieve: (sieve). Managing Sieve scripts in Emacs.
15 @setchapternewpage odd
19 This file documents the Emacs Sieve package.
21 Copyright (C) 2001 Free Software Foundation, Inc.
23 Permission is granted to copy, distribute and/or modify this document
24 under the terms of the GNU Free Documentation License, Version 1.1 or
25 any later version published by the Free Software Foundation; with no
26 Invariant Sections, with the Front-Cover texts being ``A GNU
27 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
28 license is included in the section entitled ``GNU Free Documentation
29 License'' in the Emacs manual.
31 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
32 this GNU Manual, like GNU software. Copies published by the Free
33 Software Foundation raise funds for GNU development.''
35 This document is part of a collection distributed under the GNU Free
36 Documentation License. If you want to distribute this document
37 separately from the collection, you can do so by adding a copy of the
38 license to the document, as described in section 6 of the license.
44 @title Emacs Sieve Manual
46 @author by Simon Josefsson
49 @vskip 0pt plus 1filll
50 Copyright @copyright{} 2001 Free Software Foundation, Inc.
52 Permission is granted to copy, distribute and/or modify this document
53 under the terms of the GNU Free Documentation License, Version 1.1 or
54 any later version published by the Free Software Foundation; with the
55 Invariant Sections being none, with the Front-Cover texts being ``A GNU
56 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
57 license is included in the section entitled ``GNU Free Documentation
58 License'' in the Emacs manual.
60 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
61 this GNU Manual, like GNU software. Copies published by the Free
62 Software Foundation raise funds for GNU development.''
64 This document is part of a collection distributed under the GNU Free
65 Documentation License. If you want to distribute this document
66 separately from the collection, you can do so by adding a copy of the
67 license to the document, as described in section 6 of the license.
74 @top Sieve Support for Emacs
76 This manual documents the Emacs Sieve package.
78 It is intended as a users manual for Sieve Mode and Manage Sieve, and
79 as a reference manual for the @samp{sieve-manage} protocol Emacs Lisp
82 Sieve is a language for server-side filtering of mail. The language
83 is documented in RFC 3028. This manual does not attempt to document
84 the language, so keep RFC 3028 around.
87 * Installation:: Getting ready to use the package.
88 * Sieve Mode:: Editing Sieve scripts.
89 * Managing Sieve:: Managing Sieve scripts on a remote server.
90 * Manage Sieve API :: Interfacing to the Manage Sieve Protocol API.
91 * Standards:: A summary of RFCs and working documents used.
92 * Index:: Function and variable index.
101 The Sieve package should come with your Emacs version, and should be
102 ready for use directly.
104 However, to manually set up the package you can put the following
105 commands in your @code{~/.emacs}:
108 (autoload 'sieve-mode "sieve-mode")
109 (setq auto-mode-alist (cons '("\\.si\\(v\\|eve\\)\\'" . sieve-mode)
117 Sieve mode provides syntax-based indentation, font-locking support and
118 other handy functions to make editing Sieve scripts easier.
120 Use @samp{M-x sieve-mode} to switch to this major mode. This command
121 runs the hook @code{sieve-mode-hook}.
123 @vindex sieve-mode-map
124 @vindex sieve-mode-syntax-table
125 Sieve mode is derived from @code{c-mode}, and is very similar except
126 for the syntax of comments. The keymap (@code{sieve-mode-map}) is
127 inherited from @code{c-mode}, as are the the variables for customizing
128 indentation. Sieve mode has its own abbrev table
129 (@code{sieve-mode-abbrev-table}) and syntax table
130 (@code{sieve-mode-syntax-table}).
132 In addition to the editing utility functions, Sieve mode also contains
133 bindings to manage Sieve scripts remotely. @pxref{Managing Sieve}.
140 @cindex manage remote sieve script
141 Open a connection to a remote server using the Managesieve protocol.
146 @cindex upload sieve script
147 Upload the Sieve script to the currently open server.
153 @chapter Managing Sieve
155 Manage Sieve is a special mode used to display Sieve scripts available
156 on a remote server. It can be invoked with @kbd{M-x sieve-manage
157 RET}, which queries the user for a server and if necessary, user
160 When a server has been succesfully contacted, the Manage Sieve buffer
161 looks something like:
164 Server : mailserver:2000
166 2 scripts on server, press RET on a script name edits it, or
167 press RET on <new script> to create a new script.
173 One of the scripts are highlighted, and standard point navigation
174 commands (@kbd{<up>}, @kbd{<down>} etc) can be used to navigate the
177 The following commands are available in the Manage Sieve buffer:
183 @findex sieve-activate
184 Activates the currently highlighted script.
188 @findex sieve-deactivate
189 Deactivates the currently highlighted script.
193 @findex sieve-deactivate-all
194 Deactivates all scripts.
199 Remove currently highlighted script.
207 @findex sieve-edit-script
208 Bury the server buffer and download the currently highlighted script
209 into a new buffer for editing in Sieve mode (@pxref{Sieve Mode}).
213 @findex sieve-edit-script-other-window
214 Create a new buffer in another window containing the currently
215 highlighted script for editing in Sieve mode (@pxref{Sieve Mode}).
219 @findex sieve-bury-buffer
220 Bury the Manage Sieve buffer without closing the connection.
227 Displays help in the minibuffer.
231 @node Manage Sieve API
232 @chapter Manage Sieve API
234 The @file{sieve-manage.el} library contains low-level functionality
235 for talking to a server with the @sc{managesieve} protocol.
237 A number of user-visible variables exist, which all can be customized
238 in the @code{sieve} group (@kbd{M-x customize-group RET sieve RET}):
242 @item sieve-manage-default-user
243 @vindex sieve-manage-default-user
244 Sets the default username.
246 @item sieve-manage-default-port
247 @vindex sieve-manage-default-port
248 Sets the default port to use, the suggested port number is @code{2000}.
250 @item sieve-manage-log
251 @vindex sieve-manage-log
252 If non-nil, should be a string naming a buffer where a protocol trace
253 is dumped (for debugging purposes).
257 The API functions include:
261 @item sieve-manage-open
262 @findex sieve-manage-open
263 Open connection to managesieve server, returning a buffer to be used
264 by all other API functions.
266 @item sieve-manage-opened
267 @findex sieve-manage-opened
268 Check if a server is open or not.
270 @item sieve-manage-close
271 @findex sieve-manage-close
272 Close a server connection.
274 @item sieve-manage-authenticate
275 @findex sieve-manage-authenticate
276 Authenticate to the server.
278 @item sieve-manage-capability
279 @findex sieve-manage-capability
280 Return a list of capabilities the server support.
282 @item sieve-manage-listscripts
283 @findex sieve-manage-listscripts
284 List scripts on the server.
286 @item sieve-manage-havespace
287 @findex sieve-manage-havespace
288 Returns non-nil iff server have roam for a script of given size.
290 @item sieve-manage-getscript
291 @findex sieve-manage-getscript
292 Download script from server.
294 @item sieve-manage-putscript
295 @findex sieve-manage-putscript
296 Upload script to server.
298 @item sieve-manage-setactive
299 @findex sieve-manage-setactive
300 Indicate which script on the server should be active.
307 The Emacs Sieve package implements all or parts of a small but
308 hopefully growing number of RFCs and drafts documents. This chapter
309 lists the relevant ones. They can all be fetched from
310 @samp{http://quimby.gnus.org/notes/}.
315 Sieve: A Mail Filtering Language.
317 @item draft-martin-managesieve-03
318 A Protocol for Remotely Managing Sieve Scripts