~ubuntu-branches/ubuntu/wily/dovecot/wily

« back to all changes in this revision

Viewing changes to src/imap/imap-search.h

  • Committer: Bazaar Package Importer
  • Author(s): CHuck Short, Chuck Short
  • Date: 2009-11-06 00:47:29 UTC
  • mfrom: (4.1.9 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091106004729-i39n7v9e7d4h51f6
Tags: 1:1.2.6-1ubuntu1
* 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 restrictions
    - 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 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
   + debian/patches/dovecot-postfix.conf.diff:
     + 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.
   + debian/rules:
     - Create emtpy stamp.h.in files in dovecot-sieve/ and dovecot-managesieve/
       if they're not there since empty files are not included in the diff.gz 
       file.
   + Add SMTP-AUTH support for Outlook (login auth mechanism)
   + Dropped:
     - debian/patches/security-CVE-2009-3235: Applied upstream.
     - debian/patches/fix-pop3-assertion.dpatch: Applied upstream.
     - dovecot-sieve and dovecot-managesieve: Use the debian patches instead.

  [Chuck Short]
  - Updated dovecot-sieve to 0.1.13.
  - Updated dovecot-managesieve to 0.11.9.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef IMAP_SEARCH_H
2
2
#define IMAP_SEARCH_H
3
3
 
4
 
struct imap_arg;
5
 
struct mailbox;
6
 
struct client_command_context;
7
 
 
8
 
/* Builds search arguments based on IMAP arguments. */
9
 
struct mail_search_arg *
10
 
imap_search_args_build(pool_t pool, struct mailbox *box,
11
 
                       const struct imap_arg *args, const char **error_r);
12
 
/* Free allocated keywords */
13
 
void imap_search_args_free(struct mailbox *box, struct mail_search_arg *args);
14
 
 
15
 
struct mail_search_arg *
16
 
imap_search_get_arg(struct client_command_context *cmd,
17
 
                    const char *set, bool uid);
 
4
#include <sys/time.h>
 
5
 
 
6
enum search_return_options {
 
7
        SEARCH_RETURN_ESEARCH           = 0x0001,
 
8
        SEARCH_RETURN_MIN               = 0x0002,
 
9
        SEARCH_RETURN_MAX               = 0x0004,
 
10
        SEARCH_RETURN_ALL               = 0x0008,
 
11
        SEARCH_RETURN_COUNT             = 0x0010,
 
12
        SEARCH_RETURN_MODSEQ            = 0x0020,
 
13
        SEARCH_RETURN_SAVE              = 0x0040,
 
14
        SEARCH_RETURN_UPDATE            = 0x0080,
 
15
        SEARCH_RETURN_PARTIAL           = 0x0100
 
16
/* Options that don't return any seq/uid results */
 
17
#define SEARCH_RETURN_NORESULTS \
 
18
        (SEARCH_RETURN_ESEARCH | SEARCH_RETURN_MODSEQ | SEARCH_RETURN_SAVE | \
 
19
         SEARCH_RETURN_UPDATE)
 
20
};
 
21
 
 
22
struct imap_search_context {
 
23
        struct client_command_context *cmd;
 
24
        struct mailbox *box;
 
25
        struct mailbox_transaction_context *trans;
 
26
        struct mail_search_context *search_ctx;
 
27
        struct mail *mail;
 
28
 
 
29
        struct mail_search_args *sargs;
 
30
        enum search_return_options return_options;
 
31
        uint32_t partial1, partial2;
 
32
 
 
33
        struct timeout *to;
 
34
        ARRAY_TYPE(seq_range) result;
 
35
        unsigned int result_count;
 
36
 
 
37
        uint64_t highest_seen_modseq;
 
38
        struct timeval start_time;
 
39
 
 
40
        unsigned int have_seqsets:1;
 
41
        unsigned int have_modseqs:1;
 
42
        unsigned int sorting:1;
 
43
};
 
44
 
 
45
int cmd_search_parse_return_if_found(struct imap_search_context *ctx,
 
46
                                     const struct imap_arg **args);
 
47
 
 
48
bool imap_search_start(struct imap_search_context *ctx,
 
49
                       struct mail_search_args *sargs,
 
50
                       const enum mail_sort_type *sort_program);
18
51
 
19
52
#endif