~ubuntu-dev/ubuntu/lucid/dovecot/lucid-201002101901

« back to all changes in this revision

Viewing changes to libsieve/src/lib-sieve/sieve.h

  • Committer: Chuck Short
  • Date: 2010-01-21 20:21:25 UTC
  • mfrom: (4.1.11 squeeze)
  • Revision ID: zulcss@ubuntu.com-20100121202125-pme73o491kfwj5nc
* Merge from debian testing, remaining changes:
  + Add new binary pkg dovecot-postfix that integrates postfix and dovecot
    automatically: (LP: #164837)
  + debian/control:
    - add new binary with short description
    - set Architecture all for dovecot-postfix (LP: #329878)
  + debian/dovecot-postfix.postinst:
    - create initial certificate symlinks to snakeoil.
    - set up postfix with postconf to:
      - use Maildir/ as the default mailbox.
      - use dovecot as the sasl authentication server.
      - use dovecot LDA (deliver).
      - use tls for smtp{d} services.
    - fix certificates paths in postfix' main.cf
    - add reject_unauth_destination to postfix' recipient restrictions
    - add reject_unknown_sender_domain to postfix' sender restriction
    - rename configuration name on remove, delete on purge
    - restart dovecot after linking certificates
    - handle use case when postfix is unconfigurated
  + debian/dovecot-postfix.dirs: create backup directory for postfix's config
    configuration
  + restart postfix and dovecot.
  + debian/dovecot-postfix.postrm:
    - remove all dovecot related configuration from postfix.
    - restart postfix and dovecot.
  + debian/dovecot-common.init:
    - check if /etc/dovecot/dovecot-postfix.conf exists and use it
      as the configuration file if so.
  + debian/patches/warning-ubuntu-postfix.dpatch
    - add warning about dovecot-postfix.conf in dovecot default
      configuration file
  + debian/patches/dovecot-postfix.conf.diff:
    - Ubuntu server custom changes to the default dovecot configuration for
      better interfation with postfix.
    - enable sieve plugin.
    - Ubuntu server custom changes to the default dovecot configuration for
      better integration with postfix:
      - enable imap, pop3, imaps, pop3s and managesieve by default.
      - enable dovecot LDA (deliver).
      - enable SASL auth socket in postfix private directory
   + debian/rules:
     - copy, patch and install dovecot-postfix.conf in /etc/dovecot/.
     - build architecure independent packages too
   + Use Snakeoil SSL certificates by default.
     - debian/control: Depend on ssl-cert.
     - debian/patches/ssl-cert-snakeoil.dpatch: Change default SSL cert
       paths to snakeoil.
     - debian/dovecot-common.postinst: Relax grep for SSL_* a bit.
   + Add autopkgtest to debian/tests/*.
   + Fast TearDown: Update the lsb init header to not stop in level 6.
   + Add ufw integration:
     - Created debian/dovecot-common.ufw.profile.
     - debian/rules: install profile.
     - debian/control: suggest ufw.
   + debian/{control,rules}: enable PIE hardening.
   + dovecot-imapd, dovecot-pop3: Replaces dovecot-common (<< 1:1.1). (LP: #254721)
   + debian/control: Update Vcs-* headers.
   + Add SMTP-AUTH support for Outlook (login auth mechanism)
* New upstream release.
* debian/patches/gold-fix.patch: Removed. Fixed upstream.
* Moved libexec to lib corrections in dovecot-managesieve.patch and
  dovecot-managesieve-dist.patch to dovecot-example.patch
* debian/patches/dovecot-mboxlocking.patch: Regenerated to avoid FTBFS
  when quilt isn't installed.
* debian/patches/quota-mountpoint.patch: Removed. Not needed anymore.
* debian/patches/dovecot-quota.patch: Removed. Quotas aren't properly
  enabled unless mail_plugins = quota imap_quota.
* debian/patches/gold-fix.patch: Fixed configure script to build even
  with binutils-gold or --no-add-needed linker flag (Closes: #554306)
* debian/dovecot-common.init: fixed LSB headers. Thanks to Pascal Volk.
  (Closes: #558040)
* debian/changelog: added CVE references to previous changelog entry.
* debian/rules: checked up the build system. It's not fragile anymore.
  (Closes: 493803)
* debian/dovecot-common.postinst: Now invoking dpkg-reconfigure
  on dovecot-common is enough to generate new certificates
  if the previous ones were removed. (Closes: #545582)
* debian/rules: No longer install convert-tool in /usr/bin.
  It isn't an user utility and it should stay in /usr/lib/dovecot
  like all other similar tool.
* New upstream release. (Closes: #557601)
* [SECURITY] Fixes local information disclosure and denial of service.
  (see: http://www.dovecot.org/list/dovecot-news/2009-November/000143.html
  and CVE-2009-3897)
* Added myself to uploaders.
* Switched to the new source format "3.0 (quilt)":
  - removed dpatch from build-depends
  - removed debian/README.source because now we use only standard
    dpkg features
  - regenerated all patches
* Prepared to switch to multi-origin source:
  - recreated dovecot-libsieve.patch and dovecot-managesieve-dist.patch
    starting from the upstream tarball
  - removed all autotools related build-depends and build-conflict
  - renamed dovecot-libsieve and dovecot-managesieve directories
    to libsieve and managesieve.
* debian/rules: Moved the configuration of libsieve and managesieve from
  the build phase to the configuration phase
* Added dovecot-dbg package  with debugging symbols.  Thanks Stephan Bosch.
  (Closes: #554710)
* Fixed some stray libexec'isms in the default configuration.
* New upstream release.
* debian/dovecot-common.init:
  - use $CONF when starting the daemon. (Closes: #549944)
  - always output start/stop messages. (Closes: #523810)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (c) 2002-2009 Dovecot Sieve authors, see the included COPYING file 
 
2
 */
 
3
 
 
4
#ifndef __SIEVE_H
 
5
#define __SIEVE_H
 
6
 
 
7
#include <stdio.h>
 
8
 
 
9
struct sieve_script;
 
10
struct sieve_binary;
 
11
 
 
12
#include "sieve-config.h"
 
13
#include "sieve-types.h"
 
14
#include "sieve-error.h"
 
15
 
 
16
/*
 
17
 * Main Sieve library interface
 
18
 */
 
19
 
 
20
/* sieve_init(): 
 
21
 *   Initializes the sieve engine. Must be called before any sieve functionality
 
22
 *   is used.
 
23
 */
 
24
bool sieve_init(void);
 
25
 
 
26
/* sieve_deinit():
 
27
 *   Frees all memory allocated by the sieve engine. 
 
28
 */
 
29
void sieve_deinit(void);
 
30
 
 
31
/* sieve_get_capabilities():
 
32
 *
 
33
 */
 
34
const char *sieve_get_capabilities(const char *name);
 
35
 
 
36
/* sieve_set_extensions():
 
37
 *
 
38
 */
 
39
void sieve_set_extensions(const char *extensions);
 
40
 
 
41
/*
 
42
 * Script compilation
 
43
 */
 
44
 
 
45
/* sieve_compile_script:
 
46
 */
 
47
struct sieve_binary *sieve_compile_script
 
48
        (struct sieve_script *script, struct sieve_error_handler *ehandler);
 
49
 
 
50
/* sieve_compile:
 
51
 *
 
52
 *   Compiles the script into a binary.
 
53
 */
 
54
struct sieve_binary *sieve_compile
 
55
        (const char *script_path, const char *script_name, 
 
56
                struct sieve_error_handler *ehandler);
 
57
 
 
58
/* 
 
59
 * Reading/writing Sieve binaries
 
60
 */
 
61
 
 
62
/* sieve_open:
 
63
 *
 
64
 *   First tries to open the binary version of the specified script and
 
65
 *   if it does not exist or if it contains errors, the script is
 
66
 *   (re-)compiled. The binary is updated if the script is recompiled.
 
67
 *   Note that errors in the bytecode are not caught here.
 
68
 *
 
69
 */
 
70
struct sieve_binary *sieve_open
 
71
        (const char *scriptpath, const char *script_name, 
 
72
                struct sieve_error_handler *ehandler, bool *exists_r);
 
73
 
 
74
/* sieve_save:
 
75
 *
 
76
 *  Saves the binary as the file indicated by the path parameter. If 
 
77
 *  path is NULL, it chooses the default path relative to the original
 
78
 *  script.
 
79
 */
 
80
bool sieve_save
 
81
    (struct sieve_binary *sbin, const char *bin_path);
 
82
 
 
83
/* sieve_load:
 
84
 *
 
85
 *  Loads the sieve binary indicated by the provided path.
 
86
 */
 
87
struct sieve_binary *sieve_load
 
88
        (const char *bin_path);
 
89
 
 
90
/* sieve_close:
 
91
 *
 
92
 *   Closes a compiled/opened sieve binary.
 
93
 */
 
94
void sieve_close(struct sieve_binary **sbin);
 
95
 
 
96
/*
 
97
 * Debugging
 
98
 */
 
99
 
 
100
/* sieve_dump:
 
101
 *
 
102
 *   Dumps the byte code in human-readable form to the specified ostream.
 
103
 */
 
104
void sieve_dump(struct sieve_binary *sbin, struct ostream *stream);
 
105
 
 
106
/* sieve_test:
 
107
 *
 
108
 *   Executes the bytecode, but only prints the result to the given stream.
 
109
 */ 
 
110
int sieve_test
 
111
        (struct sieve_binary *sbin, const struct sieve_message_data *msgdata, 
 
112
                const struct sieve_script_env *senv, struct sieve_error_handler *ehandler, 
 
113
                struct ostream *stream, bool *keep);
 
114
 
 
115
/*
 
116
 * Script execution
 
117
 */
 
118
 
 
119
/* sieve_execute:
 
120
 *
 
121
 *   Executes the binary, including the result.  
 
122
 */
 
123
int sieve_execute
 
124
        (struct sieve_binary *sbin, const struct sieve_message_data *msgdata,
 
125
                const struct sieve_script_env *senv, struct sieve_error_handler *ehandler,
 
126
                bool *keep);
 
127
                
 
128
/*
 
129
 * Multiscript support
 
130
 */
 
131
 
 
132
struct sieve_multiscript;
 
133
 
 
134
struct sieve_multiscript *sieve_multiscript_start_execute
 
135
        (const struct sieve_message_data *msgdata, const struct sieve_script_env *senv);
 
136
struct sieve_multiscript *sieve_multiscript_start_test
 
137
        (const struct sieve_message_data *msgdata, const struct sieve_script_env *senv,
 
138
                struct ostream *stream);
 
139
 
 
140
bool sieve_multiscript_run
 
141
        (struct sieve_multiscript *mscript, struct sieve_binary *sbin, 
 
142
                struct sieve_error_handler *ehandler, bool final);
 
143
 
 
144
int sieve_multiscript_status(struct sieve_multiscript *mscript);
 
145
 
 
146
int sieve_multiscript_finish
 
147
        (struct sieve_multiscript **mscript, struct sieve_error_handler *ehandler,
 
148
                bool *keep);
 
149
 
 
150
/*
 
151
 * Script directory
 
152
 */
 
153
 
 
154
struct sieve_directory;
 
155
 
 
156
struct sieve_directory *sieve_directory_open(const char *path);
 
157
const char *sieve_directory_get_scriptfile(struct sieve_directory *sdir);
 
158
void sieve_directory_close(struct sieve_directory **sdir);
 
159
 
 
160
#endif