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

« back to all changes in this revision

Viewing changes to src/lib-storage/index/cydir/cydir-mail.c

  • 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:
20
20
 
21
21
static int cydir_mail_stat(struct mail *mail, struct stat *st_r)
22
22
{
 
23
        struct mail_private *p = (struct mail_private *)mail;
23
24
        const char *path;
24
25
 
 
26
        if (mail->lookup_abort == MAIL_LOOKUP_ABORT_NOT_IN_CACHE)
 
27
                return mail_set_aborted(mail);
 
28
 
 
29
        p->stats_stat_lookup_count++;
25
30
        path = cydir_mail_get_path(mail);
26
31
        if (stat(path, st_r) < 0) {
27
32
                if (errno == ENOENT)
95
100
        int fd;
96
101
 
97
102
        if (mail->data.stream == NULL) {
 
103
                mail->mail.stats_open_lookup_count++;
98
104
                path = cydir_mail_get_path(_mail);
99
105
                fd = open(path, O_RDONLY);
100
106
                if (fd == -1) {
106
112
                        }
107
113
                        return -1;
108
114
                }
109
 
                mail->data.stream =
110
 
                        i_stream_create_fd(fd, MAIL_READ_BLOCK_SIZE, TRUE);
 
115
                mail->data.stream = i_stream_create_fd(fd, 0, TRUE);
 
116
                index_mail_set_read_buffer_size(_mail, mail->data.stream);
111
117
        }
112
118
 
113
119
        return index_mail_init_stream(mail, hdr_size, body_size, stream_r);
122
128
        index_mail_get_flags,
123
129
        index_mail_get_keywords,
124
130
        index_mail_get_keyword_indexes,
 
131
        index_mail_get_modseq,
125
132
        index_mail_get_parts,
126
133
        index_mail_get_date,
127
134
        cydir_mail_get_received_date,
135
142
        index_mail_get_special,
136
143
        index_mail_update_flags,
137
144
        index_mail_update_keywords,
 
145
        NULL,
138
146
        index_mail_expunge,
139
147
        index_mail_set_cache_corrupted,
140
148
        index_mail_get_index_mail