]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Fri, 16 Feb 2018 14:03:46 +0000 (16:03 +0200)]
doveadm sync/backup: Don't override BROKENCHAR if it's already set
This allows migrating invalid mailbox names by specifying BROKENCHAR.
Previously it would always try to use \003 control character, which isn't
valid character in mailbox names so the mailbox creation would fail.
Aki Tuomi [Mon, 26 Feb 2018 16:20:30 +0000 (18:20 +0200)]
notify: Ignore flag and keywords update during saving
They are part of the saving event
Timo Sirainen [Thu, 11 Jan 2018 18:38:14 +0000 (13:38 -0500)]
*-login: Fix clients linked list corruption with SSL connections
This could have resulted in infinite loops or some of the clients being
skipped for some operations.
Aki Tuomi [Tue, 23 Jan 2018 08:51:26 +0000 (10:51 +0200)]
push-notification: PUSH_NOTIFICATION_USER_CONTEXT is now required
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:49:40 +0000 (10:49 +0200)]
fts-lucene: Add and use FTS_LUCENE_USER_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:47:49 +0000 (10:47 +0200)]
welcome: WELCOME_CONTEXT is now required
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:46:30 +0000 (10:46 +0200)]
expire: DOVEADM_EXPIRE_MAIL_CMD_CONTEXT is now required
Satisfied static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:44:02 +0000 (10:44 +0200)]
virtual: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:41:35 +0000 (10:41 +0200)]
quota: Add and use QUOTA_USER_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:40:23 +0000 (10:40 +0200)]
imap-zlib: Context is now required
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:39:30 +0000 (10:39 +0200)]
lazy-expunge: Fix context checking
Was not done properly in
462a3d92adcde4bfa9a575875bd8ae740b89ce9e
Aki Tuomi [Mon, 22 Jan 2018 12:04:47 +0000 (14:04 +0200)]
mail-crypt: Add and use MAIL_CRYPT_USER_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 12:02:39 +0000 (14:02 +0200)]
fts-solr: Add and use FTS_SOLR_USER_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 09:37:41 +0000 (11:37 +0200)]
acl: Fix ACL_CONTEXT check
Was incorrect in
3131b3878de3245db7552234e66d437e8fde9351
Aki Tuomi [Tue, 23 Jan 2018 08:38:41 +0000 (10:38 +0200)]
acl: Add and use ACL_USER_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 12:00:37 +0000 (14:00 +0200)]
acl: Add and use ACL_LIST_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 11:57:12 +0000 (13:57 +0200)]
lib-storage: imapc - Ensure search ctx is not NULL
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 11:54:58 +0000 (13:54 +0200)]
lib-storage: Add and use MAIL_STORAGE_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 11:52:37 +0000 (13:52 +0200)]
lib-storage: Add and use MAIL_THREAD_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 11:50:37 +0000 (13:50 +0200)]
lib-index: Add and use CACHE_TRANS_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 07:38:26 +0000 (09:38 +0200)]
lib-storage: Add and use INDEX_LIST_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Sat, 20 Jan 2018 18:42:02 +0000 (20:42 +0200)]
mail-log: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Fri, 19 Jan 2018 08:27:09 +0000 (10:27 +0200)]
old-stats-plugin: Fix context requirements
Fixes Panic: Module context stats_storage_module missing
Broken by
6afdf0b6fce26c5492d5e56f6f16fb8a4d869566
Aki Tuomi [Thu, 18 Jan 2018 13:29:42 +0000 (15:29 +0200)]
pop3-migration-plugin: Fix context requirements
Fixes Panic: Module context pop3_migration_storage_module missing
Broken by
a8703ce24540b7efaa51a8c7d3c72e72727f9789
Aki Tuomi [Wed, 17 Jan 2018 10:15:16 +0000 (12:15 +0200)]
last-login: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 10:14:22 +0000 (12:14 +0200)]
mail-crypt: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 08:28:48 +0000 (10:28 +0200)]
old-stats: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 08:23:05 +0000 (10:23 +0200)]
quota-clone: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 08:21:52 +0000 (10:21 +0200)]
zlib: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 08:10:41 +0000 (10:10 +0200)]
mailbox-alias: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 08:07:37 +0000 (10:07 +0200)]
mail-filter: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 08:06:25 +0000 (10:06 +0200)]
notify: Contexts are now required or checked
Satisfied static analyzers
Aki Tuomi [Wed, 17 Jan 2018 07:31:44 +0000 (09:31 +0200)]
pop3-migration: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Sun, 14 Jan 2018 18:40:11 +0000 (20:40 +0200)]
quota: Contexts are now required or checked
Satisfied static analyzers
Aki Tuomi [Sun, 14 Jan 2018 18:33:48 +0000 (20:33 +0200)]
apparmor: Ensure auser is not NULL
Satisfies static analyzers
Aki Tuomi [Sun, 14 Jan 2018 18:25:16 +0000 (20:25 +0200)]
lazy-expunge: Contexts are now required or checked
Satisfied static analyzers
Aki Tuomi [Sun, 14 Jan 2018 18:18:45 +0000 (20:18 +0200)]
fts: Contexts are now required or checked
Satisfied static analyzer
Aki Tuomi [Sun, 14 Jan 2018 18:08:11 +0000 (20:08 +0200)]
snarf: If sstorage is NULL, do not allocate box
Old code would continue if sstorage was NULL.
Found by static analyzer
Aki Tuomi [Sun, 14 Jan 2018 18:07:31 +0000 (20:07 +0200)]
snarf: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Sun, 14 Jan 2018 18:00:04 +0000 (20:00 +0200)]
expire: Contexts are now required or checked
Satisfied static analyzers
Aki Tuomi [Sun, 14 Jan 2018 17:57:16 +0000 (19:57 +0200)]
trash: Ensure quser is not NULL
Satisfies static analyzers
Aki Tuomi [Sun, 14 Jan 2018 17:56:19 +0000 (19:56 +0200)]
acl: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Sun, 14 Jan 2018 17:46:13 +0000 (19:46 +0200)]
replication: Check ruser for NULL
Satisfies static analyzers
Aki Tuomi [Sun, 14 Jan 2018 17:43:39 +0000 (19:43 +0200)]
imap-old-stats-plugins: Check suser for NULL
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 10:25:18 +0000 (12:25 +0200)]
lib-sql: SQL_DB_CACHE_CONTEXT now requires context
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 07:29:23 +0000 (09:29 +0200)]
lib-storage: MBOX_LIST_CONTEXT now requires context
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 07:29:53 +0000 (09:29 +0200)]
lib-storage: INDEX_LIST_STORAGE_CONTEXT now requires context
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 07:25:26 +0000 (09:25 +0200)]
lib-storage: INDEX_STORAGE_CONTEXT now requires context
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 10:24:21 +0000 (12:24 +0200)]
lib-lda: Require context in mail-deliver
Satisfies static analyzers
Aki Tuomi [Fri, 12 Jan 2018 13:10:48 +0000 (15:10 +0200)]
lib: Add MODULE_CONTEXT_REQUIRE
This will panic instead of return NULL. Should satisfy static
analyzers when used.
Josef 'Jeff' Sipek [Sun, 18 Feb 2018 23:07:16 +0000 (18:07 -0500)]
lib-storage: Generate snippet while saving new mails
Timo Sirainen [Mon, 19 Feb 2018 13:43:31 +0000 (15:43 +0200)]
lib-storage: Make index_mail_want_cache() global
Josef 'Jeff' Sipek [Sun, 18 Feb 2018 23:06:48 +0000 (18:06 -0500)]
lib-storage: move snippet generation to mail-save-finish
This is necessary because some storage backends (most notably sdbox) do
not allow getting the mail stream before the mail is fully written out.
(See written_to_disk in sdbox-file.h.)
If we could avoid getting the stream to generate a snippet we could
leave this where it is.
Timo Sirainen [Mon, 19 Feb 2018 13:38:13 +0000 (15:38 +0200)]
doveadm dump: Show body.snippet in human-readable form
Timo Sirainen [Thu, 15 Feb 2018 16:16:15 +0000 (18:16 +0200)]
imap: Don't set storage callbacks before namespaces are created
This fixes sending untagged OK/NO notifications from storage (e.g. lock
waits/override notifications). It was broken by
e031d9aaae59a9f79710dc1138b76b69272615a3
Timo Sirainen [Thu, 15 Feb 2018 16:15:16 +0000 (18:15 +0200)]
imap: Add client_create_finish() to finish namespace creation.
Timo Sirainen [Thu, 15 Feb 2018 16:13:20 +0000 (18:13 +0200)]
imap: When running standalone, delay initializing namespaces until PREAUTH is sent
Most importantly this makes the code paths similar for standalone and
non-standalone clients, which is needed by the following commits.
Martti Rannanjärvi [Wed, 13 Dec 2017 17:05:30 +0000 (19:05 +0200)]
global: Flip MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT to ..._ALLOW_ROOT
Martti Rannanjärvi [Fri, 29 Sep 2017 11:16:52 +0000 (14:16 +0300)]
lib-storage: Flip disallow_root in service_drop_privileges()
Martti Rannanjärvi [Fri, 29 Sep 2017 10:47:22 +0000 (13:47 +0300)]
master: Flip disallow_root in drop_privileges()
Martti Rannanjärvi [Fri, 29 Sep 2017 10:40:12 +0000 (13:40 +0300)]
lib: Add restrict_access_flags enum to use with restrict_access[_by_env]()
Swap parameter locations in the functions to make sure plugins are
updated to use the new api.
Martti Rannanjärvi [Mon, 18 Dec 2017 09:35:27 +0000 (11:35 +0200)]
lib: Flip drop_setuid_root in restrict_access_settings
Martti Rannanjärvi [Mon, 18 Dec 2017 10:44:14 +0000 (12:44 +0200)]
lib-program-client: Remove extra drop_setuid_root flag copy
Timo Sirainen [Mon, 19 Feb 2018 12:44:04 +0000 (14:44 +0200)]
lib-storage: Unless LAYOUT=index, don't rebuild list index on missing INBOX
Timo Sirainen [Mon, 19 Feb 2018 10:54:53 +0000 (12:54 +0200)]
lib-storage: mailbox_list_index_handle_corruption() - Lock mailbox list while rebuilding
This guards against simultaneous mailbox create/delete/rename.
Timo Sirainen [Mon, 19 Feb 2018 10:53:46 +0000 (12:53 +0200)]
lib-storage: mailbox_list_index_handle_corruption() - Move actual handling to its own function
Aki Tuomi [Mon, 19 Feb 2018 07:57:17 +0000 (09:57 +0200)]
lib-ssl-iostream: Use SSL_CTX_set_ecdh_auto macro
This macro is same for 1.0.2 and 1.1.0 and libressl.
Aki Tuomi [Sun, 18 Feb 2018 16:11:18 +0000 (18:11 +0200)]
imap: If snippet is not available return NIL
Timo Sirainen [Sat, 17 Feb 2018 22:53:12 +0000 (00:53 +0200)]
imap: Fix FETCH SNIPPET
1) _BUFFERED flag wasn't set, which caused a missing space before the "SNIPPET".
2) It caused \Seen flag to be added to the mail
Timo Sirainen [Fri, 16 Feb 2018 12:49:59 +0000 (14:49 +0200)]
imap: Don't enforce sending SNIPPET reply as literal
Also change it to use "cur_str" since the reply is never very long.
Timo Sirainen [Fri, 16 Feb 2018 12:46:36 +0000 (14:46 +0200)]
imap: Add parenthesis to FETCH SNIPPET (FUZZY text) response
Otherwise it violates the RFC 3501 text about FETCH responses.
Martti Rannanjärvi [Fri, 16 Feb 2018 14:59:35 +0000 (16:59 +0200)]
charset-alias: Fix keyvalues iteration
charset-alias-plugin.c:113:27: error: comparison between pointer and zero
character constant [-Werror=pointer-compare]
for (i = 0; keyvalues[i] != '\0'; i++) {
^~
charset-alias-plugin.c:113:14: note: did you mean to dereference the pointer?
for (i = 0; keyvalues[i] != '\0'; i++) {
Martti Rannanjärvi [Fri, 16 Feb 2018 14:53:04 +0000 (16:53 +0200)]
charset-alias: Cleanup whitespace
Remove \r from end of lines and remove trailing whitespace.
Hideo Yoshizane [Thu, 25 Jan 2018 00:36:22 +0000 (19:36 -0500)]
charset-alias-plugin
Stephan Bosch [Wed, 31 Jan 2018 09:27:54 +0000 (10:27 +0100)]
lmtp: local: Use recipient index in lmtp_local_rcpt_reply_overquota().
When used during the DATA command, it should send a reply for the correct
recipient. During the RCPT command there is only one reply due. Added assert
that checks this.
Stephan Bosch [Wed, 31 Jan 2018 09:34:11 +0000 (10:34 +0100)]
lmtp: local: Add explicit cmd parameter to lmtp_local_rcpt_reply_overquota().
Using the RCPT cmd is only valid for the RCPT command and not when quota excess
is detected during DATA. That would cause a segmentation fault, since
rcpt->rcpt.rcpt_cmd == NULL.
Stephan Bosch [Wed, 31 Jan 2018 09:30:23 +0000 (10:30 +0100)]
lmtp: local: Make local variable for rcpt->rcpt.rcpt_cmd in lmtp_local_rcpt_check_quota().
Stephan Bosch [Wed, 17 Jan 2018 20:26:44 +0000 (21:26 +0100)]
lmtp: local: Fix segfault occurring when quota is exceeded.
Stephan Bosch [Thu, 25 Jan 2018 21:24:05 +0000 (22:24 +0100)]
lib-smtp: client: Fix ignoring invalid certificate from server.
Although it initially allowed the invalid certificate, it would still fail later
on while reading/writing the SSL streams.
Aki Tuomi [Mon, 12 Feb 2018 10:28:37 +0000 (12:28 +0200)]
auth: Set correct context type when bypassing reporting in auth_success
Broken in
41ff6e6a4a085786d4c15a58c7c50a28e2110c3f
Aki Tuomi [Tue, 6 Feb 2018 07:48:11 +0000 (09:48 +0200)]
auth: Add policy check configuration options
Allows disabling before/after auth checks, or reporting.
Aki Tuomi [Mon, 5 Feb 2018 12:26:15 +0000 (14:26 +0200)]
auth: Use correct username is auth policy requests
When doing master authentication as first, use
the username of the user, not master user, for policy lookup.
Timo Sirainen [Thu, 8 Feb 2018 00:26:23 +0000 (02:26 +0200)]
lib-ssl-iostream: Assert-crash if input stream has IO already set
Timo Sirainen [Thu, 8 Feb 2018 00:22:18 +0000 (02:22 +0200)]
lib: Add i_stream_get_root_io() and use it to deduplicate code
Timo Sirainen [Thu, 8 Feb 2018 08:53:50 +0000 (10:53 +0200)]
lib-smtp: Recreate connection IO after streams change
This fixes hangs after STARTTLS.
Originally by Stephan Bosch
Timo Sirainen [Thu, 8 Feb 2018 08:52:57 +0000 (10:52 +0200)]
lib: Add connection_streams_changed()
Originally by Stephan Bosch
Timo Sirainen [Thu, 8 Feb 2018 00:38:23 +0000 (02:38 +0200)]
doveadm: client: Set IO only after enabling SSL
io_add_istream() needs to be used with the SSL istream, otherwise it can
cause hangs.
Timo Sirainen [Thu, 8 Feb 2018 00:28:54 +0000 (02:28 +0200)]
lib-imap-client: Fix IO after enabling SSL
io_add_istream() needs to be used with the SSL istream, otherwise it can
cause hangs.
Timo Sirainen [Tue, 6 Feb 2018 13:12:26 +0000 (15:12 +0200)]
replication: Don't send notification for changes done by dsync transactions
Timo Sirainen [Tue, 6 Feb 2018 13:10:48 +0000 (15:10 +0200)]
lib-storage: Set mailbox_transaction_context.flags earlier
Set it in index_transaction_init() so plugins' transaction_begin() methods
see it after calling super.transaction_begin().
Aki Tuomi [Thu, 8 Feb 2018 11:04:48 +0000 (13:04 +0200)]
old-stats: Set process dumpable during stats gathering
/proc/self/io is not accessible otherwise
Aki Tuomi [Thu, 8 Feb 2018 11:03:37 +0000 (13:03 +0200)]
lib: Add restrict_access_get/set_dumpable
Aki Tuomi [Thu, 8 Feb 2018 11:01:50 +0000 (13:01 +0200)]
lib: Clarify restrict_access_allow_coredumps
Timo Sirainen [Wed, 7 Feb 2018 14:17:13 +0000 (16:17 +0200)]
lib-index: Fix assert-crash with lock_method=dotlock
The dotlock wasn't deleted in all code paths. Fix this by simplifying
the unlocking to be done the same way with and without dotlock.
Fixes:
Panic: file mail-cache.c: line 624 (mail_cache_lock_file): assertion failed: (cache->dotlock == NULL)
Timo Sirainen [Tue, 9 Jan 2018 20:37:25 +0000 (15:37 -0500)]
lib-storage: Lock mailbox_list for mailbox create/delete/rename
This is only required for mailbox creation to fix a race condition with
LAYOUT=index: If INBOX doesn't exist it will rescan the mailboxes to
find out if there are any missing ones. If INBOX creation isn't locked,
it's possible that the first process hasn't finished creating INBOX
before the second process find it and attempts to open it.
The delete and rename locking are probably useful to guard against race
conditions when clients intentionally issues create/delete/rename commands
concurrently.
Timo Sirainen [Tue, 9 Jan 2018 20:36:58 +0000 (15:36 -0500)]
lib-storage: Add mailbox_list_[un]lock()
Timo Sirainen [Tue, 9 Jan 2018 20:35:13 +0000 (15:35 -0500)]
lib-storage: mailbox_delete() - Fix cleanup in error handling
If removing index deletion mark failed, box->deleting wasn't set to FALSE
and the mailbox was left opened.
Timo Sirainen [Tue, 9 Jan 2018 20:33:26 +0000 (15:33 -0500)]
lib-storage: mailbox_rename() - Use source storage for errors
It was documented to use source storage for errors, but some of the errors
were set to destination storage.
Timo Sirainen [Tue, 6 Feb 2018 16:01:04 +0000 (18:01 +0200)]
lib-storage: mail_storage_lock_create() - add support for dotlocks
Timo Sirainen [Tue, 6 Feb 2018 15:49:15 +0000 (17:49 +0200)]
lib-storage: Change mail_user_lock_file_create() to use mail_storage_lock_create()