Simon Josefsson writes: > Does anyone think adding NAGY Andras and my Sieve stuff [1] to Gnus > would be a good idea? Noone complained so I added it. Unless you press `D u' or `D g' in the group buffer, you should never see it. Kudos to NAGY Andras for the work on gnus-sieve.el! Some documentation: In the "Group Parameters" section: `sieve' This parameter contains a Sieve test that should match incoming mail that should be placed in this group. From this group parameter, a Sieve `IF' control structure is generated, having the test as the condition and `fileinto "group.name";' as the body. For example, if the INBOX.list.sieve group has the `(sieve address "sender" "sieve-admin@extundo.com")' group parameter, when translating the group parameter into a Sieve script (*note Sieve Commands::) the following Sieve code is generated: if address \"sender\" \"sieve-admin@extundo.com\" { fileinto \"INBOX.list.sieve\"; } The Sieve language is described in RFC 3028. *Note Top: (sieve)Top. In the "Misc Group Stuff" chapter, a new node was added: Sieve Commands -------------- Sieve is a server-side mail filtering language. In Gnus you can use the `sieve' group parameter (*note Group Parameters::) to specify sieve rules that should apply to each group. Gnus provides two commands to translate all these group parameters into a proper Sieve script that can be transfered to the server somehow. The generated Sieve script is placed in `gnus-sieve-file' (by default `~/.sieve'). The code Gnus generates is placed between two delimiters, `gnus-sieve-region-start' and `gnus-sieve-region-end', so you may write additional Sieve code outside these delimiters that will not be removed the next time you regenerate the Sieve script. *Note Top: (sieve)Top. `D g' Regenerate a Sieve script from the `sieve' group parameters and put you into the `gnus-sieve-file' without saving it. `D u' Regenerates the Gnus managed part of `gnus-sieve-file' using the `sieve' group parameters, save the file and upload it to the server using the `sieveshell' program. And a new texi file was added that document the Sieve package separately from Gnus: Sieve Support for Emacs *********************** This manual documents the Emacs Sieve package. It is intended as a users manual for Sieve Mode and Manage Sieve, and as a reference manual for the `sieve-manage' protocol Emacs Lisp API. Sieve is a language for server-side filtering of mail. The language is documented in RFC 3028. This manual does not attempt to document the language, so keep RFC 3028 around. * Menu: * Installation:: Getting ready to use the package. * Sieve Mode:: Editing Sieve scripts. * Managing Sieve:: Managing Sieve scripts on a remote server. * Manage Sieve API :: Interfacing to the Manage Sieve Protocol API. * Standards:: A summary of RFCs and working documents used. * Index:: Function and variable index. Installation ************ The Sieve package should come with your Emacs version, and should be ready for use directly. However, to manually set up the package you can put the following commands in your `~/.emacs': (autoload 'sieve-mode "sieve-mode") (setq auto-mode-alist (cons '("\\.si\\(v\\|eve\\)\\'" . sieve-mode) auto-mode-alist)) Sieve Mode ********** Sieve mode provides syntax-based indentation, font-locking support and other handy functions to make editing Sieve scripts easier. Use `M-x sieve-mode' to switch to this major mode. This command runs the hook `sieve-mode-hook'. Sieve mode is derived from `c-mode', and is very similar except for the syntax of comments. The keymap (`sieve-mode-map') is inherited from `c-mode', as are the the variables for customizing indentation. Sieve mode has its own abbrev table (`sieve-mode-abbrev-table') and syntax table (`sieve-mode-syntax-table'). In addition to the editing utility functions, Sieve mode also contains bindings to manage Sieve scripts remotely. *note Managing Sieve::. `C-c RET' Open a connection to a remote server using the Managesieve protocol. `C-c C-l' Upload the Sieve script to the currently open server. Managing Sieve ************** Manage Sieve is a special mode used to display Sieve scripts available on a remote server. It can be invoked with `M-x sieve-manage RET', which queries the user for a server and if necessary, user credentials to use. When a server has been succesfully contacted, the Manage Sieve buffer looks something like: Server : mailserver:2000 2 scripts on server, press RET on a script name edits it, or press RET on to create a new script. ACTIVE .sieve template.siv One of the scripts are highlighted, and standard point navigation commands (`', `' etc) can be used to navigate the list. The following commands are available in the Manage Sieve buffer: `m' Activates the currently highlighted script. `u' Deactivates the currently highlighted script. `M-C-?' Deactivates all scripts. `r' Remove currently highlighted script. `RET' `mouse-2' `f' Bury the server buffer and download the currently highlighted script into a new buffer for editing in Sieve mode (*note Sieve Mode::). `o' Create a new buffer in another window containing the currently highlighted script for editing in Sieve mode (*note Sieve Mode::). `q' Bury the Manage Sieve buffer without closing the connection. `?' `h' Displays help in the minibuffer. Manage Sieve API **************** The `sieve-manage.el' library contains low-level functionality for talking to a server with the MANAGESIEVE protocol. A number of user-visible variables exist, which all can be customized in the `sieve' group (`M-x customize-group RET sieve RET'): `sieve-manage-default-user' Sets the default username. `sieve-manage-default-port' Sets the default port to use, the suggested port number is `2000'. `sieve-manage-log' If non-nil, should be a string naming a buffer where a protocol trace is dumped (for debugging purposes). The API functions include: `sieve-manage-open' Open connection to managesieve server, returning a buffer to be used by all other API functions. `sieve-manage-opened' Check if a server is open or not. `sieve-manage-close' Close a server connection. `sieve-manage-authenticate' Authenticate to the server. `sieve-manage-capability' Return a list of capabilities the server support. `sieve-manage-listscripts' List scripts on the server. `sieve-manage-havespace' Returns non-nil iff server have roam for a script of given size. `sieve-manage-getscript' Download script from server. `sieve-manage-putscript' Upload script to server. `sieve-manage-setactive' Indicate which script on the server should be active. Standards ********* The Emacs Sieve package implements all or parts of a small but hopefully growing number of RFCs and drafts documents. This chapter lists the relevant ones. They can all be fetched from `http://quimby.gnus.org/notes/'. "RFC3028" Sieve: A Mail Filtering Language. "draft-martin-managesieve-03" A Protocol for Remotely Managing Sieve Scripts