[dovecot/core] 582893: lib-storage: Fix mailbox list index hook usage

GitHub noreply at github.com
Tue Feb 14 13:00:10 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: 58289301ce9f6aa7121891e33ef7e0a1b4559e8d
      https://github.com/dovecot/core/commit/58289301ce9f6aa7121891e33ef7e0a1b4559e8d
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    M src/lib-storage/list/mailbox-list-index-backend.c
    M src/lib-storage/list/mailbox-list-index-status.c
    M src/lib-storage/list/mailbox-list-index.c
    M src/lib-storage/list/mailbox-list-index.h

  Log Message:
  -----------
  lib-storage: Fix mailbox list index hook usage

The previous method appeared to work, but not if the internal hooks were
used more than once.


  Commit: 897368f75a68f97e172ba76540759a10c557f1c3
      https://github.com/dovecot/core/commit/897368f75a68f97e172ba76540759a10c557f1c3
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    M src/lib-storage/index/index-transaction.c
    M src/lib-storage/mail-storage-private.h
    M src/lib-storage/mail-storage.c

  Log Message:
  -----------
  lib-storage: Always create mail_save_context.dest_mail

This allows removing similar mail_alloc() from storage backends and plugins
that need it.

As a side effect, this changes mbox code to always assign UIDs to saved
mails. This shouldn't be much of a problem, since it happened practically
always already.


  Commit: a825281071af96cc148e49c64ac36d8c5cf26f71
      https://github.com/dovecot/core/commit/a825281071af96cc148e49c64ac36d8c5cf26f71
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    M src/lib-storage/index/cydir/cydir-save.c
    M src/lib-storage/index/dbox-common/dbox-save.c
    M src/lib-storage/index/dbox-common/dbox-save.h
    M src/lib-storage/index/dbox-multi/mdbox-save.c
    M src/lib-storage/index/dbox-single/sdbox-copy.c
    M src/lib-storage/index/dbox-single/sdbox-save.c
    M src/lib-storage/index/imapc/imapc-save.c
    M src/lib-storage/index/index-mail.c
    M src/lib-storage/index/index-storage.c
    M src/lib-storage/index/maildir/maildir-save.c
    M src/lib-storage/index/mbox/mbox-save.c
    M src/lib-storage/index/mbox/mbox-sync-private.h
    M src/lib-storage/index/mbox/mbox-sync.c

  Log Message:
  -----------
  lib-storage: Remove unnecessary mail_save_context.dest_mail==NULL checks

It can never be NULL after the previous change: "lib-storage: Always create
mail_save_context.dest_mail".

The code removal in maildir_transaction_save_commit_pre() seemed
potentially dangerous, but I don't think such code path is possible
anymore. Also even if it is, it's probably fine since the mail_free()
is called even earlier than before (although that itself might have
been a problem).

This also removes last traces of code that made it possible to save mails to
mbox without assigning UID to the mail. The previous commit already caused
this, so this is just removing dead code.


  Commit: 880f7a015f7dc2df2a06cec91dcecbbbe7e8dce3
      https://github.com/dovecot/core/commit/880f7a015f7dc2df2a06cec91dcecbbbe7e8dce3
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    M src/plugins/notify/notify-storage.c
    M src/plugins/quota/quota-storage.c
    M src/plugins/virtual/virtual-save.c
    M src/plugins/zlib/zlib-plugin.c

  Log Message:
  -----------
  plugins: Remove unnecessary mail_save_context.dest_mail==NULL checks

It can never be NULL after the previous change: "lib-storage: Always create
mail_save_context.dest_mail".


  Commit: 8eba883232f80178b60fa416f73292bf5f990fec
      https://github.com/dovecot/core/commit/8eba883232f80178b60fa416f73292bf5f990fec
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    M src/plugins/virtual/virtual-mail.c
    M src/plugins/virtual/virtual-save.c
    M src/plugins/virtual/virtual-storage.h

  Log Message:
  -----------
  virtual: Fix saving to a virtual mailbox to work again

Previous changes broke it.


  Commit: 5f1f92d6f32dfe2cf04fac1d42c42a52aeff335b
      https://github.com/dovecot/core/commit/5f1f92d6f32dfe2cf04fac1d42c42a52aeff335b
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    M src/lib-lda/mail-deliver.c
    M src/lib-lda/mail-deliver.h

  Log Message:
  -----------
  lib-lda: Remove unused mail_deliver_get_log_var_expand_table()


  Commit: df71146c7f68895abd435857a88d596dc52f8001
      https://github.com/dovecot/core/commit/df71146c7f68895abd435857a88d596dc52f8001
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    M src/lib-storage/mail-storage.c
    M src/lib-storage/mail-storage.h

  Log Message:
  -----------
  lib-storage: Add mailbox_save_get_dest_mail()

This marks mailbox_save_set_dest_mail deprecated. It's not efficient to use
since it frees the already-created dest_mail.


  Commit: 4f210e191c869c71db13c5871f95d883c312b1f2
      https://github.com/dovecot/core/commit/4f210e191c869c71db13c5871f95d883c312b1f2
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    M src/lib-lda/mail-deliver.c

  Log Message:
  -----------
  lib-lda: Avoid using mailbox_save_set_dest_mail()


  Commit: 12e28ffc2655b6d0efce628eb7d93fa74fbd345b
      https://github.com/dovecot/core/commit/12e28ffc2655b6d0efce628eb7d93fa74fbd345b
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    M src/lib-lda/mail-deliver.c
    M src/lib-lda/mail-deliver.h

  Log Message:
  -----------
  lib-lda: Redesign mail_deliver_context.var_expand_table cache


  Commit: 796d1ca5e01126f1328ac4cdec0c23491d0e3f10
      https://github.com/dovecot/core/commit/796d1ca5e01126f1328ac4cdec0c23491d0e3f10
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    M src/lib-lda/mail-deliver.c

  Log Message:
  -----------
  lib-lda: Remove %{storage_id} setting for now.

It doesn't work with Sieve. The following patches add it back properly.


  Commit: a9791113953195d1ed52d9b5bf63f1869758742d
      https://github.com/dovecot/core/commit/a9791113953195d1ed52d9b5bf63f1869758742d
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    M src/lib-lda/mail-deliver.c

  Log Message:
  -----------
  lib-lda: Code cleanup - mail_deliver_open_mail() now uses uid parameter


  Commit: eed56fe22f1fc61f2003d5e66373d03dacbc9aaa
      https://github.com/dovecot/core/commit/eed56fe22f1fc61f2003d5e66373d03dacbc9aaa
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    M src/lda/main.c
    M src/lib-lda/Makefile.am
    M src/lib-lda/mail-deliver.c
    M src/lib-lda/mail-deliver.h
    M src/lmtp/main.c

  Log Message:
  -----------
  lib-lda: Fix deliver_log_format variables with Sieve

With Sieve it was using src_mail for getting the values, which weren't
correct especially if Sieve had modified the mail.


  Commit: b3523787a7c3b9e82fd9dfe9d1b4687a3b0000b0
      https://github.com/dovecot/core/commit/b3523787a7c3b9e82fd9dfe9d1b4687a3b0000b0
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    M src/lib-lda/mail-deliver.c

  Log Message:
  -----------
  lib-lda: Implement %{storage_id} correctly


Compare: https://github.com/dovecot/core/compare/9b08d9d9be3d...b3523787a7c3


More information about the dovecot-cvs mailing list