dovecot-2.1-pigeonhole: lib-sieve: implementation of editheader ...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Tue Nov 29 23:47:23 EET 2011
details: http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/b3bff60a18da
changeset: 1569:b3bff60a18da
user: Stephan Bosch <stephan at rename-it.nl>
date: Tue Nov 29 22:47:13 2011 +0100
description:
lib-sieve: implementation of editheader extension completed
- Updated documentation.
- Made editheader extension disabled by default
diffstat:
INSTALL | 13 +++++-
TODO | 3 +-
doc/editheader.txt | 51 +++++++++++++++++++++++++
src/lib-sieve/sieve-extensions.c | 5 +-
4 files changed, 65 insertions(+), 7 deletions(-)
diffs (119 lines):
diff -r 00c5cd8ca1d2 -r b3bff60a18da INSTALL
--- a/INSTALL Tue Nov 29 22:21:13 2011 +0100
+++ b/INSTALL Tue Nov 29 22:47:13 2011 +0100
@@ -259,6 +259,15 @@
Sieve Interpreter - Extension Configuration
-------------------------------------------
+- Editheader extension:
+
+ The editheader extension [RFC5293] enables sieve scripts to interact with
+ other components that consume or produce header fields by allowing the script
+ to delete and add header fields.
+
+ The editheader extension requires explicit configuration and is not enabled
+ for use by default. Refer to doc/editheader.txt for configuration information.
+
- Vacation extension:
The Sieve vacation extension [RFC5230] defines a mechanism to generate
@@ -270,8 +279,8 @@
- Include extension:
- The Sieve include extension (draft) permits users to include one Sieve script
- into another.
+ The Sieve include extension (draft) permits users to include one Sieve script
+ into another.
The include extension is available by default, but it has its own specific
configuration options. Refer to doc/include.txt for settings specific to the
diff -r 00c5cd8ca1d2 -r b3bff60a18da TODO
--- a/TODO Tue Nov 29 22:21:13 2011 +0100
+++ b/TODO Tue Nov 29 22:47:13 2011 +0100
@@ -1,7 +1,6 @@
Current activities:
-* Finish editheader extension
- - Document extension configuration
+-
Parallel plugin-based efforts:
diff -r 00c5cd8ca1d2 -r b3bff60a18da doc/editheader.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/editheader.txt Tue Nov 29 22:47:13 2011 +0100
@@ -0,0 +1,51 @@
+Editheader Extension
+
+Relevant specifications
+=======================
+
+ RFC5293 - doc/rfc/editheader.rfc5293.txt
+
+Description
+===========
+
+The editheader extension [RFC5293] enables sieve scripts to interact with other
+components that consume or produce header fields by allowing the script to
+delete and add header fields.
+
+Configuration
+=============
+
+The editheader is not available by default and needs to be enabled explicitly by
+adding it to the sieve_extensions setting.
+
+The following settings can be configured for the editheader extension (default
+values are indicated):
+
+sieve_editheader_max_header_size = 2048
+ The maximum size in bytes of a header field value passed to the addheader
+ command. The minumum value for this setting is 1024 bytes. The value is in
+ bytes, unless followed by a k(ilo).
+
+sieve_editheader_protected =
+ A space-separated list of headers that cannot be added to nor removed from the
+ message header. The `Received:' and `Auto-Submitted:' fields are always
+ protected and the `Subject:' header cannot be protected, as required by the
+ RFC specificiation; adding one of these headers to this setting has no effect.
+
+Invalid values for the settings above will make the Sieve interpreter log
+a warning and revert to the default values.
+
+Example
+=======
+
+plugin {
+ # Use editheader
+ sieve_extensions = +editheader
+
+ # Header fiels must not exceed one 1k
+ sieve_editheader_max_header_size = 1k
+
+ # Protect special header
+ sieve_editheader_protected = X-Verified
+}
+
diff -r 00c5cd8ca1d2 -r b3bff60a18da src/lib-sieve/sieve-extensions.c
--- a/src/lib-sieve/sieve-extensions.c Tue Nov 29 22:21:13 2011 +0100
+++ b/src/lib-sieve/sieve-extensions.c Tue Nov 29 22:47:13 2011 +0100
@@ -135,7 +135,6 @@
©_extension, &include_extension, &body_extension,
&variables_extension, &enotify_extension, &environment_extension,
&mailbox_extension, &date_extension, &ihave_extension,
- &editheader_extension
};
const unsigned int sieve_core_extensions_count =
@@ -147,8 +146,8 @@
*/
const struct sieve_extension_def *sieve_extra_extensions[] = {
- &vacation_seconds_extension,
- &spamtest_extension, &spamtestplus_extension, &virustest_extension,
+ &vacation_seconds_extension, &spamtest_extension, &spamtestplus_extension,
+ &virustest_extension, &editheader_extension,
/* vnd.dovecot. */
&debug_extension
More information about the dovecot-cvs
mailing list