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
GNU mailutils NEWS -- history of user-visible changes. 2016-12-07
GNU mailutils NEWS -- history of user-visible changes. 2016-12-13
Copyright (C) 2002-2016 Free Software Foundation, Inc.
See the end of file for copying conditions.
......@@ -7,8 +7,34 @@ Please send mailutils bug reports to <bug-mailutils@gnu.org>.
Version 3.0.90 (Git)
Sieve library essentially rewritten. It now inludes support for
the "variables" extension (RFC 5229).
* Sieve
The Sieve library essentially rewritten. The following new extensions
are implemented:
encoded-character - RFC 5228, 2.4.2.4
variables - RFC 5229
environment - RFC 5183
The tools define the Sieve environment "location", and
"phase" as follows:
Utility | "location" | "phase"
--------+-------------+--------
maidag | "MDA" | "during"
inc | "MUA" | "post"
sieve | "MS" | "post"
The "sieve" utility provides new option: --environment, for
manipulating the environment.
* Bugfixes
** Fix program name duplicate in the output of "mailutils help COMMAND"
** Fix several bugs in mhn
** Fix expansion of #, &, %, etc. in mail "copy" and "file" commands.
** Fix improper permissions after delivery to MH and Maildir mailboxes.
** Fix stream flushing code
** Fix the implementation of -nowhatnowproc option in mh
Version 3.0 - 2016-11-06
......
......@@ -225,12 +225,18 @@ mu_sieve_match_part_checker (mu_sieve_machine_t mach)
compfun = comp_false;
val = mu_sieve_get_arg_untyped (mach, 1);
/* NOTE: Type of val is always SVT_STRING_LIST */
if (val->type != SVT_STRING_LIST)
abort ();
if (val->v.list.count > 1)
switch (val->type)
{
case SVT_STRING:
break;
case SVT_STRING_LIST:
if (val->v.list.count == 1)
break;
/* fall through */
default:
mu_diag_at_locus (MU_LOG_ERROR, &mach->locus,
_("second argument must be a list of one element"));
_(":count requires second argument to be a list of one element"));
mu_i_sv_error (mach);
return 1;
}
......
......@@ -484,6 +484,8 @@ main (int argc, char *argv[])
mu_error (_("cannot initialize sieve machine: %s"), mu_strerror (rc));
return EX_SOFTWARE;
}
sieve_setenv ("phase=post", mach);
mu_list_foreach (env_list, sieve_setenv, mach);
mu_list_destroy (&env_list);
......
......@@ -17,7 +17,7 @@
m4_pushdef([MUT_SIEVE_EXT_NAME],[pipe test])
MUT_SIEVE_EXT_TEST([],[pipetest00],
[require "test-pipe";
[require "pipe";
if pipe :header "$cwd/ckmsg"
{
discard;
......