v0.1.19 19-05-2011 Stephan Bosch <stephan@rename-it.nl>

	- Enotify extension: fixed inappropriate return type in mailto URI parse
	  function, also fixing ARM compiler warning.
	- Vacation extension: fixed handling of sendmail errors. It produced an 
	  additional confusing success message in case of error. 
	- Removed header MIME-decoding to fix erroneous address parsing. Applies to
	  address test and vacation command.

v0.1.18 04-10-2010 Stephan Bosch <stephan@rename-it.nl>

	- Imap4flags: fixed segfault bug occuring in multiscript context. Occured in
	  specific situations when a script using imap4flags was followed in the
	  sequence by scripts not using imap4flags.
	- Imap4flags: fixed bug in setflag command; when parameter was a stringlist,
	  only the last item was actually set.
	- Prevented assertion failure due to currupt binary string representation.
	  If the string were missing a final \0 character an assertion was produced in
	  stead of a binary corruption error.
	- Multiscript: fixed duplicate implicit keep caused by erroneous execution
	  state update.
	- Fixed Sieve script name checking to properly handle length limit and added
	  0x00ff as invalid character.
	- Removed spurious old stdio.h (top) includes; these caused compile issues on
	  specific systems.
	- Fixed default Sieve capability (as reported by ManageSieve): extra
	  extensions spamtest, spamtestplus and virustest were enabled by default.
	  These should, however, only be enabled when properly configured and there
	  is no default configuration.
	- Variables extension: fixed :length set modifier to recognize utf8 characters
	  in stead of octets.
	- Fixed unnecessary reporting of dummy extensions in ManageSieve SIEVE
	  capability; the comparator-i;octet and comparator-i;ascii-numeric
	  'extensions' were reported explicitly.
	- LDA Sieve plugin: added _version symbol to enable Dovecot's plugin version
	  check. Without this check, people can forget to recompile the plugin, which
	  can lead to unexpected effects.

v0.1.17 19-06-2010 Stephan Bosch <stephan@rename-it.nl>
	
	- Made sure source code positions for compiler messages are recorded at start
	  of tokens.
	- Fixed a few potential memory leaks in the Sieve compiler and the
	  spam/virustest extensions.
	- Made command line tools return proper exit status upon failure.

v0.1.16 30-04-2010 Stephan Bosch <stephan@rename-it.nl>

	* Finished implementation of spamtest, spamtestplus and virustest extensions.
	  These are not enabled by default and need to be activated with the
	  sieve_extensions setting. Documentation available in 
	  doc/spamtest-virustest.txt
	+ Vacation extension: the from address of the generated reply is now by 
	  default equal to whatever known recipient alias matched the headers of the
	  message. If it is one of the aliases specified with :addresses, it is used
	  in stead of the envelope recipient address that was used before. 
	+ Restructured and optimized the lexical scanner. 
	+ Added --with-docs configure option to allow disabling installation of 
	  documentation. 
	- Accidentally omitted 'extern' in two declarations of global variables in
	  header files, causing compile failures on certain systems.
	- Deprecated imapflags extension: fixed implicit assignment of flags. Turns
	  out this never really worked, but the effect of this bug was obscured by the
	  removeflag bug fixed in the previous release.
	- Fixed various memset argument mixups in enotify extension. This caused 
	  warnings on certain systems, but luckily no adverse effects at runtime.

v0.1.15 25-01-2010 Stephan Bosch <stephan@rename-it.nl>

	* Enotify extension: 
	  - Adjusted notify method API for addition of new notification methods.
	  - Set default importance level to 'normal' (was 'high').
	* Include extension: updated implementation towards most recent specification
	  (all should be backwards compatible):
	  - Implemented global variables namespace.
	  - Global command may now appear anywhere in a script.
	  - Implemented script name checking using the requirements specified in the
	    ManageSieve draft.
	  - One issue remains: ManageSieve currently requires included scripts to be
	    uploaded first, which is not according to specification.
	* Changed envelope path parser to allow to and from envelope addresses that
	  have no domain part. 
	+ Added preliminary support for Sieve plugins and added support for installing
	  Sieve development headers.
	+ Started work on the implementation of the spamtest, spamtestplus and
	  virustest extensions (unfinished).
	+ Deprecated notify extension: implemented denotify command.
	+ Variables extension: added support for variable namespaces.
	+ Added configurable script size limit. Compiler will refuse to compile files
	  larger than sieve_max_script_size.
	+ Testsuite changes: 
	  - Added support for changing and testing an extension's configuration.
	  - Added a command line parameter for copying errors to stderr.
	- Fixed a bug in the i;ascii-numeric comparator. If one of the strings started
	  with a non-digit character, the comparator would always yield less-than.
	- Imap4flags extension: fixed bug in removeflag: removing a single flag failed 
	  due to off-by-one error (bug report by Julian Cowley).
	- Improved EACCES error messages for stat() and lstat() syscalls and slightly
	  improved error messages that may uccur when saving a binary.
	- Vacation extension: fixed typo in runtime log message (patch by Julian 
	  Cowley).
	- Fixed use of minus '-' in man pages; it is now properly escaped.
	- Fixed parser recovery. In particular cases it would trigger spurious errors
	  after an initial valid error and sometimes additional errors were
	  inappropriately ignored.

v0.1.14 19-12-2009 Stephan Bosch <stephan@rename-it.nl>

	* Made the imposed limits on the number of redirects and the number of 
	  actions configurable. The settings are called sieve_max_actions and 
	  sieve_max_redirects.
	* Did a major rework of extension handling, making sure that no global state
	  is maintained. This change was triggered by problems that global state info
	  would cause for Dovecot v2.0, but it is also important for v1.2 as it
	  significantly cleans up the library implementation. 
	+ Made LDA Sieve plugin recognize the deliver_log_format setting.
	+ Message headers produced from user-supplied data are now RFC2047-encoded if
	  necessary for outgoing messages. This is for example important for the
	  :subject argument of the vacation action.  
	+ Added support for the $text$ substitution in the deprecated notify 
	  extension.
	+ The subaddress extension now also accepts recipient_delimiter setting as an 
	  alias for sieve_subaddress_sep setting. This anticipates the 
	  recipient_delimiter setting in v2.0. 
	- Fixed logging of mailbox names. It logged the converted mUTF7 version in 
	  stead of the original UTF8 version supplied by the user.
	- Fixed a minor memory leak in the multiscript support.
	- Fixed a bug in the recompilation of Sieve scripts. Made sure that scripts 
	  are only recompiled when the script file - or the symlink pointing to it - 
	  is strictly newer.

v0.1.13 18-10-2009 Stephan Bosch <stephan@rename-it.nl>

	+ Body extension: implemented proper handling of the :raw transform and added 
	  various new tests to the test suite. However, :content "multipart" and
	  :content "message/rfc822" are still not working. 
	+ Fixed race condition occuring when multiple instances are saving the same 
	  binary (patch by Timo Sirainen).
	+ Test suite: added support for testing multiscript execution.
	- Made compiler more lenient towars missing CRLF at the end of the script in a 
	  hash comment.
	- Body extension: don't give SKIP_BODY_BLOCK flag to message parser, we want 
	  the body! (patch by Timo Sirainen).
	- Fixed handling of implicit side effects for multiscript execution.
	- Fixed bugs in multiscript support; subsequent keep actions were not always 
	  merged correctly and implicit side effects were not always handled
	  correctly.
	- Fixed a segfault bug in the sieve-test tool occuring when compile fails.
	- Fixed segfault bug in action procesing. It was triggered while merging side 
	  effects in duplicate actions.
	- Fixed bug in the Sieve plugin that caused it to try to stat() a NULL path, 
	  yielding a 'Bad address' error. 

v0.1.12 21-08-2009 Stephan Bosch <stephan@rename-it.nl>

	+ Testsuite: added support for testing binaries stored on disk.
	+ Implemented the new date extension. This allows matching against date values 
	  in header fields and the current date at the time of script evaluation.

v0.1.11 08-08-2009 Stephan Bosch <stephan@rename-it.nl>

	+ Built skeleton implementation for the date extension (RFC 5260). It
	  compiles, but it does not do anything useful yet. Therefore, it is not part 
	  of the default compilation. 
	- Fixed ARM portability issues caused by char type not being signed on that
	  platform. Reading optional operands from a binary would fail for action side 
	  effects. Also, an accidental mixup of an int return type with bool caused 
	  the interpreter to continue on ARM even though an error occured.  
	- Removed direct stdint.h includes to prevent portability issues.
	- Fixed segfault bug in the handling of script open failures.
	- Include: improved user error messages and system log messages.
	- Fixed copy-paste mixup between sieve_after and sieve_before settings in the
	  LDA Sieve plugin. If only a sieve_after script was active, nothing would 
	  have been executed. Patch by Mike Abbott.
	- Include: fixed a bug in HOME substitution in the sieve_dir path. Surfaced in 
	  ManageSieve.

v0.1.10 03-08-2009 Stephan Bosch <stephan@rename-it.nl>

	* Changed action execution of fileinto and keep. These changes depend on API 
	  additions in Dovecot, making this release depend on Dovecot v1.2.2 or newer.
	* Further developed the sieve-filter command line tool. This required a few
	  changes to the action execution of the Sieve engine. The tool was 
	  successfully tested on folders with a few 100k spam messages. However, the 
	  commandline options are still incomplete, a man page is missing and it needs 
	  much more testing before I can recommend anyone to use this tool. 
	+ Added support for the mailbox extension. This allows checking whether a 
	  mailbox exists using the mailboxexists command and it adds the :create 
	  argument to the fileinto command to create the mailbox when it is missing. 
	  The :create feature is useless unless the Deliver LDA is run with the -n 
	  option.
	+ Improved the testsuite with tests for message delivery. Messages stored
	  using keep and fileinto can be fed back into the Sieve engine for 
	  verification. This includes testing of applied IMAP flags.
	+ Updated the man pages with the new method of specifying the supported 
	  extensions using + and - (for the -x parameter of the sieve tools)
	+ Further developed the deprecated notify extension. A dummy for the denotify
	  command exists, meaning that its use does not cause an error anymore. 
	- Fixed a bug in the derivation of the binary path from the script path. A 
	  bare filename would yield a path relative to root.
	- Fixed a bug in the value matching code. The context data now uses a proper
	  pool in stead of the data stack. Bug reported by Jan Sechser.
	- Fixed assertion fail in the include extension caused by missing 
	  initialization upon binary load. This bug surfaces only for stored
	  binaries. Bug reported by Tom Hendrikx.
	- Fixed include error message for failed :global include. It mentioned the 
	  wrong config parameter.
	- Fixed broken wiki reference in an error message of the plugin about the
	  'sieve' setting.
	- Fixed behavior of fileinto when delivering into a namespace prefix.
	  Previous fix used the wrong storage.

v0.1.9 22-07-2009  Stephan Bosch <stephan@rename-it.nl>

	* Removed the unfinished sieve-filter tool from the default build. It is now 
	  only built when the --with-unfinished-features switch is supplied during 
	  configure.
	+ Started building support for the ereject version of the reject action, 
	  which has a preference to use an SMTP/LMTP protocol error in stead of a 
	  bounce message. This is to be used to make the Sieve plugin honour Deliver's
	  -e parameter. This is not yet finished and not built by default. 
	+ Improved 'Permission denied' error messages just like Dovecot does,
	  precisely specifying what permission is missing to access or create a file.
	+ Added additional headers to the list of allowed headers for the address 
	  test. The restrictive nature of the address test is not always appropriate. 
	  Still thinking of a better, less restrictive implementation.
	+ Made the deprecated notify extension compatible with the old CMUSieve
	  plugin. However, the denotify command and the $text$ substitution are not
	  yet supported. 
	+ Made the discard action log a message to avoid confusion about disappearing 
	  messages.
	- Fixed behavior of fileinto when delivering into a namespace prefix. It now
	  uses silent delivery into INBOX as fallback.
	- Fixed logging of folder namespace prefix upon delivery into a prefixed 
	  namespace. Formerly it only logged the bare folder name.
	- Fixed a potential segfault in the argument validation. It didn't surface
	  because no command could have a :tag followed by an associated parameter as
	  last argument.
	- Fixed segfault bug occuring in envelope test when performed on null (<>) 
	  envelope path. The fix involves a rather large restructuring of the code to 
	  make sure envelope addresses are properly handled everywhere (bug reported
	  by Nikita Koshikov)
	- Envelope: fixed bug in application of address parts; failure to obtain 
	  the part would cause inappropriate match success (bug reported by Ron Lee)
	- Fixed extension conflict checks during validation. It could sometimes
	  produce useless errormessages. This is currently only used by the 
	  deprecated extensions.
	- Forgot to remove old explicit storage library dependency (patch by 
	  Arkadiusz Miskiewicz).
	- Fixed compiler warnings on certain platforms regarding the use fwrite for 
	  outgoing message construction

v0.1.8 12-07-2009  Stephan Bosch <stephan@rename-it.nl>

	- Fixed AIX compile problem. For portability, the typeof operator is
	  not used anymore. 
	+ Added partial support for the deprecated notify extension. However, it
	  turns out that the implementation provided by cmusieve is even older (2001),
	  meaning that this is currently not backwards compatible with cmusieve.

v0.1.7 05-07-2009  Stephan Bosch <stephan@rename-it.nl>

	+ Added support for CRLF line breaks in strbuf error handler to fix a
	  ManageSieve problem.
	+ Improved consistency of sieve tool documentation and fixed missing
	  parameters in internal tool help output.
	+ Enhanced extensions configuration, allowing to specify the enabled
	  extensions relatively to the default (patch by Steffen Kaiser).
	- Forgot to initialize script execution status in Sieve plugin, causing 
	  segfaults on compile errors in specific conditions.
	- Fixed logging in Sieve plugin for execution of default main script (went 
	  to STDERR).
                                                                               
v0.1.6 18-06-2009  Stephan Bosch <stephan@rename-it.nl>

	* Adjusted to changes in Dovecot to make it compile against v1.2.rc5
	* Made default of sieve_dir setting match the ManageSieve implementation.
	- Fixed a few problems in de body extension that caused assert failures in
	  specific situations.	

v0.1.5 18-04-2009  Stephan Bosch <stephan@rename-it.nl>

	* Ported the implementation of the Sieve include extension to the latest 
	  draft. This means that the import and export commands are replaced by a new 
	  command called global. The import and export commands are now DEPRICATED and
	  are mere aliases for the global command. The new specification also adds the
	  :once modifier to the include command. The also newly specified global.* 
	  variable namespace is not implemented yet as support for variable namespaces
	  is currently missing.
	* Did a major rework of the multiscript support for better error handling and
	  made sure that persistent global scripts (sieve_before/sieve_after) are
	  always executed, even when the user does not have a script of his own and 
	  a global default is missing. 
	+ Provided basic support for the environment extension. Currenly, the name,
	  version and host items are useful. Others are pending.
	+ Improved error message that is presented when an unknown Sieve extension is
	  provided as argument to the require command. It now notifies the user that
	  Sieve core commands do not need to be specified in require.
	- Fixed bug in includes at levels deeper than one.
	- Fixed bug in address matching that was caused by the failure to handle group 
	  specifications. In dovecot, these are marked by address items with NULL 
	  elements, which causes a segfault if not considered. The group 'undisclosed-
	  recipients:;' in particular triggered this bug. Bug reported by Bernhard
	  Schmidt. 	  

v0.1.4 21-03-2009  Stephan Bosch <stephan@rename-it.nl>

	* Started work on the sieve-filter tool. With this command line tool it will 
	  be possible to (re-)apply Sieve filters on a mail folder. It is currently
	  undocumented and far from functional.
	+ Added a custom debug extension that provides the possibility to print debug 
	  messages from scripts executed by the Sieve tools.
	- Fixed issue with opening relative paths as a mail file. Bug reported by Ian
	  P. Christian.
	- Fixed MAC OSX compile problem. Turns out the extern modifier was missing at
	  multiple places. Bug reported by Edgar Fuss.
	- Fixed Solaris compile problem: removed unecessary and unportable linker
	  flags that caused compile to fail. Bug reported by Andrés Yacopino.

v0.1.3 12-02-2009  Stephan Bosch <stephan@rename-it.nl>

	* Adapted to changes in Dovecot, making this release dependent on Dovecot
	  >= 1.2.beta1
	* Made mail address comparison fully case-insensitive. This is particularly
	  noticeable for the :addresses argument of the vacation command. 
	+ Finished enotify extension. Currently, only the mailto notification method
	  is implemented. All still needs to be tested thoroughly.
	+ Implemented multiscript support. It is now possible to execute multiple
	  Sieve scripts sequentially. Administrator-controlled scripts can be
	  executed before and after the user's script. Still needs to be tested
	  thoroughly.
	+ Implemented support for configuring the available Sieve extensions.
	+ Made the subaddress extension (partially) configurable using the
	  sieve_subaddress_sep setting, which allows specifying a (multi-charater)
	  separator other than '+'.
	+ Compiler now warns about invalid header field names used for the header and
	  address tests.
	+ Vacation extension now properly generates a References header for the 
	  response message.
	+ Added testing of basic result execution to the test suite. Also added 
	  supportfor testing the outgoing messages produced by the Sieve interpreter. 
	+ Included execution of the actual result in the sieve-test command line tool.
	  The undocumented sieve-exec tool that existed for this is now removed as 
	  planned.
	+ Added support for the now obsolete 'imapflags' extension for backwards
	  compatibility with CMUSieve. This also implements the mark/unmark commands.
	- Fixed bugs in the regex extension: 1) if an optional match value did not in 
	  fact match, subsequent match values would get unexpected indexes. 2) fixed
	  segfault bug occuring when regex is freed.
	- Fixed bug in the use of the :from agrument for the vacation command. If this
	  address included a phrase part, the response would not be a valid RFC822
	  message.
	- Plugged a theoretical security hole occuring when a directory is opened as a 
	  Sieve binary.
	- Cleaned up and fixed various log messages.
	- Fixed bug in the outgoing address verification. Addresses ending in ',' were 
	  erroneously accepted.

v0.1.2 26-11-2008  Stephan Bosch <stephan@rename-it.nl>

	- Fixed important bug in the redirect action (and probably other actions like
	  reject and vacation that only send messages). This was a bug in the handling
	  of context information during the execution of actions. It caused the sieve 
	  interpreter to crash with a segfault when redirect was executed. 

v0.1.1 24-11-2008  Stephan Bosch <stephan@rename-it.nl>

	* Re-enabled support for compiling against dovecot headers. Much like 
	  cmusieve, command line tools like sievec and sieved are not compiled in this 
	  case.
	* Started implementation of enotify extension. Not anywhere near finished
	  though. 
	* Adapted to changes in Dovecot on various occasions, making this release
	  dependent on Dovecot >= v1.2.alpa4.

	+ Improved logging of errors at specific occasions and added debug messages to
	  find script execution problems quicker. 
	+ Removed code duplication between command line tools and the test suite. 
	  Also restructured the sources of the tools.
	+ Added UTF-8 to UTF-7 folder name conversion for compatibility with IMAP.
	+ Created man pages for the command line tools. These are automatically 
	  installed upon 'make install'
	+ Incorporated Valgrind support into the testsuite and fixed a few memory
	  leaks in the process.
	- Fixed compile error surfacing for gcc3.4. Forgot mask argument for the 
	  open() system call when the O_CREAT flag is specified. Bug found by 
	  Sergey Ivanov.
	- Fixed bug in the sievec tool. -d output was always written to stdout.
	- Fixed important bug in the imap4flags extension. When no :flags argument is 
	  specified, the previous version would always use the final value of the
	  internal variable to set the flags. This means that modifications to the 
	  internal variable also affected the bare fileinto/keep actions executed 
	  earlier. This does not comply to the RFC. 
	- Fixed bug in the include extension's import/export commands. Duplicate
	  import/exports caused problems.
	- Fixed bug in the handling of non-existent scripts. Errors were sometimes 
	  ignored. 
	- Dovecot omitted unfolding multi-line headers. This was added to the cmusieve
	  plugin after the code was incorporated into the new implementation. This is
	  now mplicitly fixed by concurrent change in Dovecot. 

v0.1.0 23-10-2008  Stephan Bosch <stephan@rename-it.nl>

	* Initial release
