~ubuntu-branches/ubuntu/trusty/dovecot/trusty-updates

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-01-08 09:35:49 UTC
  • mfrom: (1.15.3) (96.1.1 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20140108093549-814nkqdcxfbvgktg
Tags: 1:2.2.9-1ubuntu1
* Merge from Debian unstable, remaining changes:
  + Add mail-stack-delivery package:
    - Update d/rules
    - d/control: convert existing dovecot-postfix package to a dummy
      package and add new mail-stack-delivery package.
    - Update maintainer scripts.
    - Rename d/dovecot-postfix.* to debian/mail-stack-delivery.*
    - d/mail-stack-delivery.preinst: Move previously installed backups and
      config files to a new package namespace.
    - d/mail-stack-delivery.prerm: Added to handle downgrades.
  + Use Snakeoil SSL certificates by default:
    - d/control: Depend on ssl-cert.
    - d/dovecot-core.postinst: Relax grep for SSL_* a bit.
  + Add autopkgtest to debian/tests/*.
  + Add ufw integration:
    - d/dovecot-core.ufw.profile: new ufw profile.
    - d/rules: install profile in dovecot-core.
    - d/control: dovecot-core - suggest ufw.
  + d/dovecot-core.dirs: Added usr/share/doc/dovecot-core
  + Add apport hook:
    - d/rules, d/source_dovecot.py
  + Add upstart job:
    - d/rules, d/dovecot-core.dovecot.upstart, d/control,
      d/dovecot-core.dirs, dovecot-imapd.{postrm, postinst, prerm},
      d/dovecot-pop3d.{postinst, postrm, prerm}.
      d/mail-stack-deliver.postinst: Convert init script to upstart.
  + Use the autotools-dev dh addon to update config.guess/config.sub for
    arm64.
* Dropped changes, included in Debian:
  - Update Dovecot name to reflect distribution in login greeting.
  - Update Drac plugin for >= 2.0.0 support.
* d/control: Drop dovecot-postfix package as its no longer required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2002-2012 Pigeonhole authors, see the included COPYING file 
 
1
/* Copyright (c) 2002-2013 Pigeonhole authors, see the included COPYING file
2
2
 */
3
3
 
4
4
#ifndef __SIEVE_H
15
15
 * Main Sieve library interface
16
16
 */
17
17
 
18
 
/* sieve_init(): 
 
18
/* sieve_init():
19
19
 *   Initializes the sieve engine. Must be called before any sieve functionality
20
20
 *   is used.
21
21
 */
24
24
                void *context, bool debug);
25
25
 
26
26
/* sieve_deinit():
27
 
 *   Frees all memory allocated by the sieve engine. 
 
27
 *   Frees all memory allocated by the sieve engine.
28
28
 */
29
29
void sieve_deinit(struct sieve_instance **svinst);
30
30
 
55
55
 *   Compiles the script into a binary.
56
56
 */
57
57
struct sieve_binary *sieve_compile
58
 
        (struct sieve_instance *svinst, const char *script_location, 
 
58
        (struct sieve_instance *svinst, const char *script_location,
59
59
                const char *script_name, struct sieve_error_handler *ehandler,
60
60
                enum sieve_compile_flags flags, enum sieve_error *error_r);
61
61
 
62
 
/* 
 
62
/*
63
63
 * Reading/writing Sieve binaries
64
64
 */
65
65
 
73
73
 
74
74
/* sieve_open_script:
75
75
 *
76
 
 *   First tries to open the binary version of the specified script and if it 
77
 
 *   does not exist or if it contains errors, the script is (re-)compiled. Note 
 
76
 *   First tries to open the binary version of the specified script and if it
 
77
 *   does not exist or if it contains errors, the script is (re-)compiled. Note
78
78
 *   that errors in the bytecode are caught only at runtime.
79
79
 */
80
80
struct sieve_binary *sieve_open_script
83
83
 
84
84
/* sieve_open:
85
85
 *
86
 
 *   First tries to open the binary version of the specified script and if it 
87
 
 *   does not exist or if it contains errors, the script is (re-)compiled. Note 
 
86
 *   First tries to open the binary version of the specified script and if it
 
87
 *   does not exist or if it contains errors, the script is (re-)compiled. Note
88
88
 *   that errors in the bytecode are caught only at runtime.
89
89
 */
90
90
struct sieve_binary *sieve_open
91
 
        (struct sieve_instance *svinst, const char *script_location, 
 
91
        (struct sieve_instance *svinst, const char *script_location,
92
92
                const char *script_name, struct sieve_error_handler *ehandler,
93
93
                enum sieve_compile_flags flags, enum sieve_error *error_r);
94
94
 
96
96
 *
97
97
 *  Saves the binary as the file indicated by the path parameter. This function
98
98
 *  will not write the binary to disk when it was loaded from the indicated
99
 
 *  bin_path, unless update is TRUE. 
 
99
 *  bin_path, unless update is TRUE.
100
100
 */
101
101
int sieve_save_as
102
102
        (struct sieve_binary *sbin, const char *bin_path, bool update,
106
106
 *
107
107
 *  Saves the binary to the default location. This function will not overwrite
108
108
 *  the binary it was loaded earlier from the default location, unless update
109
 
 *  is TRUE. 
 
109
 *  is TRUE.
110
110
 */
111
111
int sieve_save
112
112
        (struct sieve_binary *sbin, bool update, enum sieve_error *error_r);
126
126
/*
127
127
 * sieve_is_loeded:
128
128
 *
129
 
 *   Indicates whether the binary was loaded from a pre-compiled file. 
 
129
 *   Indicates whether the binary was loaded from a pre-compiled file.
130
130
 */
131
131
bool sieve_is_loaded(struct sieve_binary *sbin);
132
132
 
152
152
/* sieve_test:
153
153
 *
154
154
 *   Executes the bytecode, but only prints the result to the given stream.
155
 
 */ 
 
155
 */
156
156
int sieve_test
157
 
        (struct sieve_binary *sbin, const struct sieve_message_data *msgdata, 
158
 
                const struct sieve_script_env *senv, struct sieve_error_handler *ehandler, 
 
157
        (struct sieve_binary *sbin, const struct sieve_message_data *msgdata,
 
158
                const struct sieve_script_env *senv, struct sieve_error_handler *ehandler,
159
159
                struct ostream *stream, enum sieve_runtime_flags flags, bool *keep);
160
160
 
161
161
/*
164
164
 
165
165
/* sieve_execute:
166
166
 *
167
 
 *   Executes the binary, including the result.  
 
167
 *   Executes the binary, including the result.
168
168
 */
169
169
int sieve_execute
170
170
        (struct sieve_binary *sbin, const struct sieve_message_data *msgdata,
171
171
                const struct sieve_script_env *senv, struct sieve_error_handler *ehandler,
172
172
                enum sieve_runtime_flags flags, bool *keep);
173
 
                
 
173
 
174
174
/*
175
175
 * Multiscript support
176
176
 */
177
 
 
 
177
 
178
178
struct sieve_multiscript;
179
 
 
 
179
 
180
180
struct sieve_multiscript *sieve_multiscript_start_execute
181
181
        (struct sieve_instance *svinst, const struct sieve_message_data *msgdata,
182
182
                const struct sieve_script_env *senv);
185
185
                const struct sieve_script_env *senv, struct ostream *stream);
186
186
 
187
187
bool sieve_multiscript_run
188
 
        (struct sieve_multiscript *mscript, struct sieve_binary *sbin, 
 
188
        (struct sieve_multiscript *mscript, struct sieve_binary *sbin,
189
189
                struct sieve_error_handler *ehandler, enum sieve_runtime_flags flags,
190
190
                bool final);
191
191
 
192
192
int sieve_multiscript_status(struct sieve_multiscript *mscript);
193
193
 
 
194
int sieve_multiscript_tempfail(struct sieve_multiscript **mscript,
 
195
        struct sieve_error_handler *ehandler);
194
196
int sieve_multiscript_finish
195
197
        (struct sieve_multiscript **mscript, struct sieve_error_handler *ehandler,
196
198
                bool *keep);