@node Top
@top Sieve Support for Emacs
-This manual documents the Emacs Sieve package.
+\e$B$3$N%^%K%e%"%k$O\e(B Emacs Sieve \e$B%Q%C%1!<%8$N@bL@=q$G$9!#\e(B
-It is intended as a users manual for Sieve Mode and Manage Sieve, and
-as a reference manual for the @samp{sieve-manage} protocol Emacs Lisp
-API.
+\e$B$3$l$O\e(B Sieve \e$B%b!<%I$H\e(B Sieve \e$B4IM}$N$?$a$N%f!<%6!<%:%^%K%e%"%k$H$7$F!"$*$h\e(B
+\e$B$S\e(B @samp{sieve-manage} \e$B%W%m%H%3%k$r07$&\e(B Emacs Lisp API \e$B$N$?$a$N%j%U%!%l\e(B
+\e$B%s%9%^%K%e%"%k$H$7$F3hMQ$5$l$k$3$H$r0U?^$7$F$$$^$9!#\e(B
-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.
+Sieve \e$B$O%5!<%P!<B&$G%a!<%k$r_I2a$9$k$?$a$N8@8l$G$9!#$=$N8@8l$O\e(B RFC
+3028 \e$B$KJ8=q2=$5$l$F$$$^$9!#$3$N%^%K%e%"%k$NL\E*$O8@8l$r@bL@$9$k$3$H$G$O\e(B
+\e$B$J$$$N$G!"\e(BRFC 3028 \e$B$O<j85$KCV$$$F$*$$$F2<$5$$!#\e(B
-A good online Sieve resources is @uref{http://www.cyrusoft.com/sieve/}.
+\e$B$^$H$b$J\e(B Sieve \e$B$N;qNA$O\e(B @uref{http://www.cyrusoft.com/sieve/} \e$B$K$"$j$^$9!#\e(B
+
+\e$BLuCm\e(B: Sieve == \e$BdA\e(B (\e$B$U$k$$\e(B)
@menu
-* Installation:: Getting ready to use the package.
-* Sieve Mode:: Editing Sieve scripts.
-* Managing Sieve:: Managing Sieve scripts on a remote server.
-* Examples :: A few Sieve code snippets.
-* 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:: \e$B$3$N%Q%C%1!<%8$r;H$&$?$a$N=`Hw\e(B
+* Sieve Mode:: Sieve \e$B%9%/%j%W%H$NJT=8\e(B
+* Managing Sieve:: \e$B1s3V%5!<%P!<>e$N\e(B Sieve \e$B%9%/%j%W%H$N4IM}\e(B
+* Examples :: Sieve \e$B%3!<%I$NJRNZ\e(B
+* Manage Sieve API :: Sieve \e$B%W%m%H%3%k\e(B API \e$B$r4IM}$9$k%$%s%?!<%U%'!<%9\e(B
+* Standards:: \e$B;H$o$l$F$$$k\e(B RFC \e$B$H:n6HJ8=q$N35N,\e(B
+* Index:: \e$B4X?t$*$h$SJQ?t$N:w0z\e(B
@end menu
-
@node Installation
-@chapter Installation
+@chapter \e$B%$%s%9%H!<%k\e(B
@cindex Install
@cindex Setup
-The Sieve package should come with your Emacs version, and should be
-ready for use directly.
+Sieve \e$B%Q%C%1!<%8$O$"$J$?$N\e(B Emacs \e$B$NHG$KIUB0$7$F$$$F!"$9$0$K;H$($k$h$&$K\e(B
+\e$B$J$C$F$$$k$O$:$G$9!#\e(B
-However, to manually set up the package you can put the following
-commands in your @code{~/.emacs}:
+\e$B$7$+$7!"$3$N%Q%C%1!<%8$r<j:n6H$G@_Dj$9$k$?$a$K!"0J2<$N%3%^%s%I\e(B
+\e$B$r\e(B @code{~/.emacs} \e$B%U%!%$%k$K=q$-9~$`$3$H$,$G$-$^$9\e(B:
@lisp
(autoload 'sieve-mode "sieve-mode")
auto-mode-alist))
@end lisp
-
@node Sieve Mode
-@chapter Sieve Mode
+@chapter Sieve \e$B%b!<%I\e(B
-Sieve mode provides syntax-based indentation, font-locking support and
-other handy functions to make editing Sieve scripts easier.
+Sieve \e$B%b!<%I$O!"9=J8$K4p$E$$$?%$%s%G%s%H!"\e(Bfont-lock \e$B$N%5%]!<%H!"$*$h\e(B
+\e$B$S\e(B Sieve \e$B%9%/%j%W%H$r3Z$KJT=8$G$-$k$h$&$K$9$k$?$a$NB>$NJXMx$J5!G=$rDs6!\e(B
+\e$B$7$^$9!#\e(B
-Use @samp{M-x sieve-mode} to switch to this major mode. This command
-runs the hook @code{sieve-mode-hook}.
+\e$B$3$N%a%8%c!<%b!<%I$K@Z$jBX$($k$K$O\e(B @samp{M-x sieve-mode} \e$B$r;H$C$F2<$5$$!#\e(B
+\e$B$3$N%3%^%s%I$O\e(B @code{sieve-mode-hook} \e$B$GM?$($i$l$?%U%C%/$r<B9T$7$^$9!#\e(B
@vindex sieve-mode-map
@vindex sieve-mode-syntax-table
-Sieve mode is derived from @code{c-mode}, and is very similar except
-for the syntax of comments. The keymap (@code{sieve-mode-map}) is
-inherited from @code{c-mode}, as are the variables for customizing
-indentation. Sieve mode has its own abbrev table
-(@code{sieve-mode-abbrev-table}) and syntax table
-(@code{sieve-mode-syntax-table}).
+Sieve \e$B%b!<%I$O\e(B @code{c-mode} \e$B$+$iGI@8$7$F$$$F!"%3%a%s%H$N9=J80J30$O$H$F\e(B
+\e$B$b;w$F$$$^$9!#%$%s%G%s%H$r%+%9%?%^%$%:$9$kJQ?t$,$"$k$N$HF1MM$K!"%-!<%^%C\e(B
+\e$B%W\e(B (@code{sieve-mode-map}) \e$B$O\e(B @code{c-mode} \e$B$r<u$17Q$.$^$9!#\e(BSieve \e$B%b!<%I\e(B
+\e$B$O@lMQ$NN,8lI=\e(B (@code{sieve-mode-abbrev-table}) \e$B$H9=J8%F!<%V\e(B
+\e$B%k\e(B (@code{sieve-mode-syntax-table}) \e$B$r;}$A$^$9!#\e(B
-In addition to the editing utility functions, Sieve mode also contains
-bindings to manage Sieve scripts remotely. @xref{Managing Sieve}.
+\e$BJT=8$KLrN)$D4X?t$K2C$($F!"\e(BSieve \e$B%b!<%I$K$O\e(B Sieve \e$B%9%/%j%W%H$r1s3V4IM}$9\e(B
+\e$B$k$?$a$N%-!<@_Dj$b$"$j$^$9!#\e(B@xref{Managing Sieve}.
@table @kbd
-
@item C-c RET
@kindex C-c RET
@findex sieve-manage
@cindex manage remote sieve script
-Open a connection to a remote server using the Managesieve protocol.
+Sieve \e$B4IM}%W%m%H%3%k\e(B (Managesieve protocol) \e$B$r;H$C$F!"1s3V%5!<%P!<$K@\B3\e(B
+\e$B$7$^$9!#\e(B
@item C-c C-l
@kindex C-c C-l
@findex sieve-upload
@cindex upload sieve script
-Upload the Sieve script to the currently open server.
-
+\e$B8=:_@\B3$7$F$$$k%5!<%P!<$K\e(B Sieve \e$B%9%/%j%W%H$r%"%C%W%m!<%I$7$^$9!#\e(B
@end table
-
@node Managing Sieve
-@chapter Managing Sieve
+@chapter Sieve \e$B$N4IM}\e(B
-Manage Sieve is a special mode used to display Sieve scripts available
-on a remote server. It can be invoked with @kbd{M-x sieve-manage
-RET}, which queries the user for a server and if necessary, user
-credentials to use.
+\e$B!V\e(BSieve \e$B4IM}!W$O!"1s3V%5!<%P!<$G;H$&$3$H$,$G$-$k\e(B Sieve \e$B%9%/%j%W%H$rI=<(\e(B
+\e$B$9$k$?$a$K;H$o$l$kFCJL$J%b!<%I$G$9!#$=$l$O\e(B @kbd{M-x sieve-manage RET} \e$B$G\e(B
+\e$B5/F0$7!"$=$N%5!<%P!<$K$*$1$k%f!<%6!<L>$H!"I,MW$J>l9g$K$O;q3J>ZL@\e(B
+\e$B=q\e(B (credentials) \e$B$NF~NO$r5a$a$^$9!#\e(B
-When a server has been successfully contacted, the Manage Sieve buffer
-looks something like:
+\e$B%5!<%P!<$H$N@\B3$K@.8y$9$k$H!"!V\e(BSieve \e$B4IM}!W%P%C%U%!$K$O0J2<$N$h$&$J$b$N\e(B
+\e$B$,I=<($5$l$^$9\e(B:
@example
Server : mailserver:2000
template.siv
@end example
-One of the scripts are highlighted, and standard point navigation
-commands (@kbd{<up>}, @kbd{<down>} etc) can be used to navigate the
-list.
+\e$B%9%/%j%W%H$N0l$D$,6/D4I=<($5$l!"I8=`$N%]%$%s%H0\F0%3%^%s%I\e(B (@kbd{<up>},
+@kbd{<down>} \e$B$J$I\e(B) \e$B$G%j%9%HFb$r0\F0$9$k$3$H$,$G$-$^$9!#\e(B
-The following commands are available in the Manage Sieve buffer:
+\e$B0J2<$N%3%^%s%I$,!V\e(BSieve \e$B4IM}!W%P%C%U%!$GMxMQ2DG=$G$9\e(B:
@table @kbd
-
@item m
@kindex m
@findex sieve-activate
-Activates the currently highlighted script.
+\e$B8=:_$N6/D4I=<($5$l$?%9%/%j%W%H$r3h@-2=$7$^$9!#\e(B
@item u
@kindex u
@findex sieve-deactivate
-Deactivates the currently highlighted script.
+\e$B8=:_$N6/D4I=<($5$l$?%9%/%j%W%H$rIT3h@-2=$7$^$9!#\e(B
@item C-M-?
@kindex C-M-?
@findex sieve-deactivate-all
-Deactivates all scripts.
+\e$B$9$Y$F$N%9%/%j%W%H$rIT3h@-2=$7$^$9!#\e(B
@item r
@kindex r
@findex sieve-remove
-Remove currently highlighted script.
+\e$B8=:_$N6/D4I=<($5$l$?%9%/%j%W%H$r<h$j=|$-$^$9!#\e(B
@item RET
@item mouse-2
@kindex mouse-2
@kindex f
@findex sieve-edit-script
-Bury the server buffer and download the currently highlighted script
-into a new buffer for editing in Sieve mode (@pxref{Sieve Mode}).
+
+\e$B%5!<%P!<%P%C%U%!$r1#$7$F!"8=:_$N6/D4I=<($5$l$?%9%/%j%W%H$r\e(B Sieve \e$B%b!<\e(B
+\e$B%I\e(B (@pxref{Sieve Mode}) \e$B$GJT=8$9$k$?$a$N?7$7$$%P%C%U%!$K%@%&%s%m!<%I$7$^\e(B
+\e$B$9!#\e(B
@item o
@kindex o
@findex sieve-edit-script-other-window
-Create a new buffer in another window containing the currently
-highlighted script for editing in Sieve mode (@pxref{Sieve Mode}).
+Sieve \e$B%b!<%I\e(B (@pxref{Sieve Mode}) \e$B$GJT=8$9$k$?$a$K!"8=:_$N6/D4I=<($5$l$?\e(B
+\e$B%9%/%j%W%H$r4^$s$G$$$k?7$7$$%P%C%U%!$r!"JL%&%#%s%I%&$G:n@.$7$^$9!#\e(B
@item q
@kindex q
@findex sieve-bury-buffer
-Bury the Manage Sieve buffer without closing the connection.
+\e$B@\B3$r@Z$i$:$K!V\e(BSieve \e$B4IM}!W%P%C%U%!$r1#$7$^$9!#\e(B
@item ?
@item h
@kindex ?
@kindex h
@findex sieve-help
-Displays help in the minibuffer.
-
+\e$B%_%K%P%C%U%!$K%X%k%W$rI=<($7$^$9!#\e(B
@end table
@node Examples
-@chapter Examples
+@chapter \e$BNc\e(B
-If you are not familiar with Sieve, this chapter contains a few simple
-code snippets that you can cut'n'paste and modify at will, until you
-feel more comfortable with the Sieve language to write the rules from
-scratch.
+Sieve \e$B$r=OCN$7$F$$$J$$$J$i!"$3$N>O$K$[$s$N>/$7$@$1$"$k%3!<%I$NCGJR$rMxMQ\e(B
+\e$B$9$k$3$H$,$G$-$^$9!#\e(BSieve \e$B8@8l$G%<%m$+$i5,B'$r=q$/$3$H$,$b$C$H2wE,$K46$8\e(B
+\e$B$i$l$k$h$&$K$J$k$^$G$O!"$=$l$i$r%+%C%H!u%Z!<%9%H$7$F0U$N$^$^$KJQ99$7$F2<\e(B
+\e$B$5$$!#\e(B
-The following complete Sieve script places all messages with a matching
-@samp{Sender:} header into the given mailbox. Many mailing lists uses
-this format. The first line makes sure your Sieve server understands
-the @code{fileinto} command.
+\e$B0J2<$N40A4$J\e(B Sieve \e$B%9%/%j%W%H$O!"9gCW$9$k\e(B @samp{Sender:} \e$B%X%C%@!<$r;}$D\e(B
+\e$B$9$Y$F$N%a%C%;!<%8$r!";XDj$5$l$?%a!<%k%\%C%/%9$K3JG<$7$^$9!#B?$/$N%a!<%j\e(B
+\e$B%s%0%j%9%H$,$3$N7A<0$r;H$C$F$$$^$9!#:G=i$N9T$O\e(B Sieve \e$B%5!<%P!<$,3N<B\e(B
+\e$B$K\e(B @code{fileinto} \e$B%3%^%s%I$rM}2r$G$-$k$h$&$K$9$k$?$a$N$b$N$G$9!#\e(B
@example
require "fileinto";
@}
@end example
-A few mailing lists do not use the @samp{Sender:} header, but does
-contain some unique identifier in some other header. The following is
-not a complete script, it assumes that @code{fileinto} has already been
-required.
+\e$B>/?t$N%a!<%j%s%0%j%9%H$O\e(B @samp{Sender:} \e$B%X%C%@!<$r;H$$$^$;$s$,!"JL$N%X%C\e(B
+\e$B%@!<$KFHFC$N<1JL;R$r4^$s$G$$$^$9!#0J2<$NIT40A4$J%9%/%j%W%H$O!"$9$G\e(B
+\e$B$K\e(B @code{fileinto} \e$B$,FI$_9~$^$l$F$$$k$3$H$r2>Dj$7$F$$$^$9!#\e(B
@example
if header :contains "Delivered-To" "auc-tex@@sunsite.dk" @{
@}
@end example
-At last, we have the hopeless mailing lists that does not have any
-unique identifier and you are forced to match on the @samp{To:} and
-@samp{Cc} headers. As before, this snippet assumes that @code{fileinto}
-has been required.
+\e$B:G8e$O!"$I$s$JFHFC$N<1JL;R$b;}$C$F$$$J$$@dK>E*$J%a!<%j%s%0%j%9%H$N$?$a$K!"\e(B
+@samp{To:} \e$B$H\e(B @samp{Cc} \e$B%X%C%@!<$K$*$1$k9gCW$r6/$$$i$l$kNc$G$9!#A0$N$b$N\e(B
+\e$B$HF1MM$K!"$3$NCGJR$O\e(B @code{fileinto} \e$B$,FI$_9~$^$l$F$$$k$3$H$r2>Dj$7$F$$\e(B
+\e$B$^$9!#\e(B
@example
if address ["to", "cc"] "kerberos@@mit.edu" @{
@end example
@node Manage Sieve API
-@chapter Manage Sieve API
+@chapter Sieve \e$B4IM}\e(B API
-The @file{sieve-manage.el} library contains low-level functionality
-for talking to a server with the @sc{managesieve} protocol.
+@file{sieve-manage.el} \e$B%i%$%V%i%j!<$K$O\e(B @sc{managesieve} \e$B%W%m%H%3%k$G%5!<\e(B
+\e$B%P!<$HOC$9$?$a$N!"Dc3,AX$N4X?t72$,$"$j$^$9!#\e(B
-A number of user-visible variables exist, which all can be customized
-in the @code{sieve} group (@kbd{M-x customize-group RET sieve RET}):
+\e$B$$$/$D$+$N!"%f!<%6!<$,8+$k$3$H$,$G$-$kJQ?t$,$"$j!"$=$l$i$9$Y$F\e(B
+\e$B$O\e(B @code{sieve} \e$B%0%k!<%W$G%+%9%?%^%$%:$9$k$3$H$,$G$-$^$9\e(B (@kbd{M-x
+customize-group RET sieve RET}):
@table @code
-
@item sieve-manage-default-user
@vindex sieve-manage-default-user
-Sets the default username.
+\e$B%G%#%U%)%k%H$N%f!<%6!<L>$r@_Dj$7$^$9!#\e(B
@item sieve-manage-default-port
@vindex sieve-manage-default-port
-Sets the default port to use, the suggested port number is @code{2000}.
+\e$B;EMM$9$k%G%#%U%)%k%H$N%]!<%H$r@_Dj$7$^$9!#Ds0F$5$l$F$$$k%]!<%HHV9f\e(B
+\e$B$O\e(B @code{2000} \e$B$G$9!#\e(B
@item sieve-manage-log
@vindex sieve-manage-log
-If non-@code{nil}, should be a string naming a buffer where a protocol trace
-is dumped (for debugging purposes).
-
+\e$BHs\e(B-@code{nil} \e$B$@$C$?$i!"$d$j<h$j$7$?%W%m%H%3%k$N7k2L$,5-O?$5$l$k!"%P%C%U%!\e(B
+\e$BL>$NJ8;zNs$G$J$1$l$P$J$j$^$;$s\e(B (\e$B%G%P%C%0$9$k$H$-$K;H$$$^$9\e(B)\e$B!#\e(B
@end table
-The API functions include:
+API \e$B$N4X?t$K$O0J2<$N$b$N$,$"$j$^$9\e(B:
@table @code
-
@item sieve-manage-open
@findex sieve-manage-open
-Open connection to managesieve server, returning a buffer to be used
-by all other API functions.
+Sieve \e$B4IM}%5!<%P!<$K@\B3$7!"B>$N$9$Y$F$N\e(B API \e$B$G;H$&%P%C%U%!$rJV$7$^$9!#\e(B
@item sieve-manage-opened
@findex sieve-manage-opened
-Check if a server is open or not.
+\e$B%5!<%P!<$H@\B3$7$F$$$k$+H]$+$r8!::$7$^$9!#\e(B
@item sieve-manage-close
@findex sieve-manage-close
-Close a server connection.
+\e$B%5!<%P!<$H$N@\B3$rJD$8$^$9!#\e(B
@item sieve-manage-authenticate
@findex sieve-manage-authenticate
-Authenticate to the server.
+\e$B%5!<%P!<$rG'>Z$7$^$9!#\e(B
@item sieve-manage-capability
@findex sieve-manage-capability
-Return a list of capabilities the server support.
+\e$B%5!<%P!<$,%5%]!<%H$7$F$$$k5!G=$N%j%9%H$rJV$7$^$9!#\e(B
@item sieve-manage-listscripts
@findex sieve-manage-listscripts
-List scripts on the server.
+\e$B%5!<%P!<$K$"$k%9%/%j%W%H$rNs5s$7$^$9!#\e(B
@item sieve-manage-havespace
@findex sieve-manage-havespace
-Returns non-@code{nil} iff server have roam for a script of given
-size.
+\e$BM?$($i$l$?%5%$%:$N%9%/%j%W%H$N$?$a$N6u$-$,$"$l$P!"Hs\e(B-@code{nil} \e$B$rJV$7$^\e(B
+\e$B$9!#\e(B
@item sieve-manage-getscript
@findex sieve-manage-getscript
-Download script from server.
+\e$B%5!<%P!<$+$i%9%/%j%W%H$r%@%&%s%m!<%I$7$^$9!#\e(B
@item sieve-manage-putscript
@findex sieve-manage-putscript
-Upload script to server.
+\e$B%5!<%P!<$K%9%/%j%W%H$r%"%C%W%m!<%I$7$^$9!#\e(B
@item sieve-manage-setactive
@findex sieve-manage-setactive
-Indicate which script on the server should be active.
-
+\e$B%5!<%P!<$K$"$k$I$N%9%/%j%W%H$,3h$-$F$$$k$+$r<($7$^$9!#\e(B
@end table
@node Standards
-@chapter Standards
+@chapter \e$BI8=`\e(B
-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
-@uref{http://quimby.gnus.org/notes/}.
+Emacs Sieve \e$B%Q%C%1!<%8$O!">/$J$$$,A}Bg$9$k$3$H$,K>$^$l$k\e(B RFC \e$B72$*$h$SAp\e(B
+\e$B9FJ8=q$N!"$9$Y$F$^$?$OItJ,$r<BAu$7$^$9!#$3$N>O$G$O4XO"$9$k$b$N$rNs5s$7$^\e(B
+\e$B$9!#$=$l$i$O$9$Y$F\e(B @uref{http://quimby.gnus.org/notes/} \e$B$+$iF~<j$9$k$3$H\e(B
+\e$B$,$G$-$^$9!#\e(B
@table @dfn
-
@item RFC3028
-Sieve: A Mail Filtering Language.
+Sieve: \e$B%a!<%k_I2a8@8l\e(B
@item draft-martin-managesieve-03
-A Protocol for Remotely Managing Sieve Scripts
-
+Sieve \e$B%9%/%j%W%H$r1s3V4IM}$9$k$?$a$N%W%m%H%3%k\e(B
@end table
-
@node Index
@chapter Index
@printindex cp