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

« back to all changes in this revision

Viewing changes to pigeonhole/src/lib-sieve/cmd-keep.c

  • 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
#include "lib.h"
9
9
#include "sieve-dump.h"
10
10
#include "sieve-message.h"
11
11
#include "sieve-actions.h"
12
 
#include "sieve-validator.h" 
 
12
#include "sieve-validator.h"
13
13
#include "sieve-generator.h"
14
14
#include "sieve-interpreter.h"
15
15
#include "sieve-result.h"
16
16
 
17
 
/* 
18
 
 * Keep command 
 
17
/*
 
18
 * Keep command
19
19
 *
20
20
 * Syntax:
21
21
 *   keep
22
 
 */     
 
22
 */
23
23
 
24
24
static bool cmd_keep_generate
25
25
        (const struct sieve_codegen_env *cgenv, struct sieve_command *cmd);
26
26
 
27
 
const struct sieve_command_def cmd_keep = { 
28
 
        "keep", 
29
 
        SCT_COMMAND, 
 
27
const struct sieve_command_def cmd_keep = {
 
28
        "keep",
 
29
        SCT_COMMAND,
30
30
        0, 0, FALSE, FALSE,
31
31
        NULL, NULL, NULL, NULL,
32
 
        cmd_keep_generate, 
 
32
        cmd_keep_generate,
33
33
        NULL
34
34
};
35
35
 
36
 
/* 
37
 
 * Keep operation 
 
36
/*
 
37
 * Keep operation
38
38
 */
39
39
 
40
40
static bool cmd_keep_operation_dump
42
42
static int cmd_keep_operation_execute
43
43
        (const struct sieve_runtime_env *renv, sieve_size_t *address);
44
44
 
45
 
const struct sieve_operation_def cmd_keep_operation = { 
 
45
const struct sieve_operation_def cmd_keep_operation = {
46
46
        "KEEP",
47
47
        NULL,
48
48
        SIEVE_OPERATION_KEEP,
49
 
        cmd_keep_operation_dump, 
50
 
        cmd_keep_operation_execute 
 
49
        cmd_keep_operation_dump,
 
50
        cmd_keep_operation_execute
51
51
};
52
52
 
53
53
/*
55
55
 */
56
56
 
57
57
static bool cmd_keep_generate
58
 
(const struct sieve_codegen_env *cgenv, struct sieve_command *cmd) 
 
58
(const struct sieve_codegen_env *cgenv, struct sieve_command *cmd)
59
59
{
60
60
        /* Emit opcode */
61
61
        sieve_operation_emit(cgenv->sblock, NULL, &cmd_keep_operation);
64
64
        return sieve_generate_arguments(cgenv, cmd, NULL);
65
65
}
66
66
 
67
 
/* 
 
67
/*
68
68
 * Code dump
69
69
 */
70
70
 
92
92
         */
93
93
 
94
94
        /* Optional operands (side effects only) */
95
 
        if ( sieve_action_opr_optional_read(renv, address, NULL, &ret, &slist) != 0 ) 
 
95
        if ( sieve_action_opr_optional_read(renv, address, NULL, &ret, &slist) != 0 )
96
96
                return ret;
97
97
 
98
98
        /*
99
99
         * Perform operation
100
100
         */
101
101
 
102
 
        sieve_runtime_trace(renv, SIEVE_TRLVL_ACTIONS, 
 
102
        sieve_runtime_trace(renv, SIEVE_TRLVL_ACTIONS,
103
103
                "keep action; store message in default mailbox");
104
104
 
105
 
        /* Add keep action to result. 
 
105
        /* Add keep action to result.
106
106
         */
107
107
        if ( sieve_result_add_keep(renv, slist) < 0 )
108
108
                return SIEVE_EXEC_FAILURE;