Commit a1612b96 a1612b96fc4592af50cb65caff5b54e74f437b09 by Sergey Poznyakoff

Document changes to Sieve

* NEWS: Update.
* doc/texinfo/libmu_sieve.texi: Update.
* doc/texinfo/sieve.texi: Document extensions

* libmu_sieve/comparator.c (mu_sieve_match_part_checker): Check
the type of the 2nd argument.
* sieve/sieve.c: Define "location" and "phase" environment items.
* sieve/tests/pipetest.at: Use "pipe" as the capability string.
1 parent 98011160
1 GNU mailutils NEWS -- history of user-visible changes. 2016-12-07 1 GNU mailutils NEWS -- history of user-visible changes. 2016-12-13
2 Copyright (C) 2002-2016 Free Software Foundation, Inc. 2 Copyright (C) 2002-2016 Free Software Foundation, Inc.
3 See the end of file for copying conditions. 3 See the end of file for copying conditions.
4 4
...@@ -7,8 +7,34 @@ Please send mailutils bug reports to <bug-mailutils@gnu.org>. ...@@ -7,8 +7,34 @@ Please send mailutils bug reports to <bug-mailutils@gnu.org>.
7 7
8 Version 3.0.90 (Git) 8 Version 3.0.90 (Git)
9 9
10 Sieve library essentially rewritten. It now inludes support for 10 * Sieve
11 the "variables" extension (RFC 5229). 11
12 The Sieve library essentially rewritten. The following new extensions
13 are implemented:
14
15 encoded-character - RFC 5228, 2.4.2.4
16 variables - RFC 5229
17 environment - RFC 5183
18
19 The tools define the Sieve environment "location", and
20 "phase" as follows:
21
22 Utility | "location" | "phase"
23 --------+-------------+--------
24 maidag | "MDA" | "during"
25 inc | "MUA" | "post"
26 sieve | "MS" | "post"
27
28 The "sieve" utility provides new option: --environment, for
29 manipulating the environment.
30
31 * Bugfixes
32 ** Fix program name duplicate in the output of "mailutils help COMMAND"
33 ** Fix several bugs in mhn
34 ** Fix expansion of #, &, %, etc. in mail "copy" and "file" commands.
35 ** Fix improper permissions after delivery to MH and Maildir mailboxes.
36 ** Fix stream flushing code
37 ** Fix the implementation of -nowhatnowproc option in mh
12 38
13 39
14 Version 3.0 - 2016-11-06 40 Version 3.0 - 2016-11-06
......
...@@ -225,12 +225,18 @@ mu_sieve_match_part_checker (mu_sieve_machine_t mach) ...@@ -225,12 +225,18 @@ mu_sieve_match_part_checker (mu_sieve_machine_t mach)
225 compfun = comp_false; 225 compfun = comp_false;
226 val = mu_sieve_get_arg_untyped (mach, 1); 226 val = mu_sieve_get_arg_untyped (mach, 1);
227 /* NOTE: Type of val is always SVT_STRING_LIST */ 227 /* NOTE: Type of val is always SVT_STRING_LIST */
228 if (val->type != SVT_STRING_LIST) 228 switch (val->type)
229 abort ();
230 if (val->v.list.count > 1)
231 { 229 {
230 case SVT_STRING:
231 break;
232
233 case SVT_STRING_LIST:
234 if (val->v.list.count == 1)
235 break;
236 /* fall through */
237 default:
232 mu_diag_at_locus (MU_LOG_ERROR, &mach->locus, 238 mu_diag_at_locus (MU_LOG_ERROR, &mach->locus,
233 _("second argument must be a list of one element")); 239 _(":count requires second argument to be a list of one element"));
234 mu_i_sv_error (mach); 240 mu_i_sv_error (mach);
235 return 1; 241 return 1;
236 } 242 }
......
...@@ -484,6 +484,8 @@ main (int argc, char *argv[]) ...@@ -484,6 +484,8 @@ main (int argc, char *argv[])
484 mu_error (_("cannot initialize sieve machine: %s"), mu_strerror (rc)); 484 mu_error (_("cannot initialize sieve machine: %s"), mu_strerror (rc));
485 return EX_SOFTWARE; 485 return EX_SOFTWARE;
486 } 486 }
487
488 sieve_setenv ("phase=post", mach);
487 mu_list_foreach (env_list, sieve_setenv, mach); 489 mu_list_foreach (env_list, sieve_setenv, mach);
488 mu_list_destroy (&env_list); 490 mu_list_destroy (&env_list);
489 491
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 m4_pushdef([MUT_SIEVE_EXT_NAME],[pipe test]) 17 m4_pushdef([MUT_SIEVE_EXT_NAME],[pipe test])
18 18
19 MUT_SIEVE_EXT_TEST([],[pipetest00], 19 MUT_SIEVE_EXT_TEST([],[pipetest00],
20 [require "test-pipe"; 20 [require "pipe";
21 if pipe :header "$cwd/ckmsg" 21 if pipe :header "$cwd/ckmsg"
22 { 22 {
23 discard; 23 discard;
......