]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Wed, 4 Oct 2017 18:13:13 +0000 (21:13 +0300)]
dict-ldap: Link directly to dict binary, unless --with-ldap=plugin was used
This is similar to how authdb_ldap plugin is built.
Timo Sirainen [Wed, 4 Oct 2017 18:01:18 +0000 (21:01 +0300)]
dict-ldap: Move from plugins/dict-ldap to lib-dict-backend
Timo Sirainen [Wed, 4 Oct 2017 17:48:24 +0000 (20:48 +0300)]
lib-dict-backend: Build test-dict-sql even without "make check"
There's no longer a dependency problem.
Timo Sirainen [Wed, 4 Oct 2017 17:46:10 +0000 (20:46 +0300)]
lib-dict: Move libdict_backend to lib-dict-backend
Aki Tuomi [Thu, 5 Oct 2017 12:53:16 +0000 (15:53 +0300)]
mail-crypt: Improve doveadm output
Aki Tuomi [Thu, 5 Oct 2017 12:40:45 +0000 (15:40 +0300)]
mail-crypt: Fix key generation handling
Userkey generation would not set all required fields.
Timo Sirainen [Thu, 5 Oct 2017 09:34:10 +0000 (12:34 +0300)]
director: When ring is synced, purge any pending "removed" directors
This allows adding a director back to the ring without having to wait for 30
seconds.
Timo Sirainen [Tue, 3 Oct 2017 13:40:32 +0000 (16:40 +0300)]
director: Rename director_delayed_dir_remove_timeout() to director_hosts_purge_removed()
This allows using it for other purposes without having a confusing name.
Timo Sirainen [Thu, 5 Oct 2017 13:12:38 +0000 (16:12 +0300)]
director: Fix potential panic when director is alone
If director is alone and it can't connect to other directors, it might crash
with:
Panic: file director.c: line 318 (director_set_ring_synced): assertion failed: (!dir->ring_synced)
Timo Sirainen [Thu, 5 Oct 2017 10:42:07 +0000 (13:42 +0300)]
global: Remove dead code
Found with clang static analyzer.
Timo Sirainen [Thu, 5 Oct 2017 10:39:49 +0000 (13:39 +0300)]
dict-memcached: Response status may not be included in enum memcached_response
This helps at least static analyzers figure out that other statuses are
possible, although unexpected.
Timo Sirainen [Thu, 5 Oct 2017 10:26:03 +0000 (13:26 +0300)]
lib-test: Use i_unreached() for marking unreachable code in test fatal handler
This avoids a warning with static analyzer.
Timo Sirainen [Thu, 5 Oct 2017 10:23:19 +0000 (13:23 +0300)]
auth: LDAP request queue has no size limit anymore - remove dead code
Timo Sirainen [Thu, 5 Oct 2017 10:17:59 +0000 (13:17 +0300)]
mbox: Remove unnecessary check from assert - move_diff is always negative here
Timo Sirainen [Thu, 5 Oct 2017 10:14:55 +0000 (13:14 +0300)]
zlib: zlib_mailbox_open_input() can't fail - remove dead code
Timo Sirainen [Thu, 5 Oct 2017 10:02:21 +0000 (13:02 +0300)]
lib-storage: imapc_mailbox_get_selected_status() can't fail - remove dead code
Aki Tuomi [Wed, 4 Oct 2017 06:42:02 +0000 (09:42 +0300)]
doveadm-server: Use i_close_fd
Aki Tuomi [Thu, 24 Aug 2017 11:59:07 +0000 (14:59 +0300)]
doveadm: Deliver remote logs over doveadm socket
Aki Tuomi [Thu, 24 Aug 2017 11:45:22 +0000 (14:45 +0300)]
doveadm: Refactor server/client code to support versioning properly
This way we can distinguish between old and new server side
Aki Tuomi [Tue, 12 Sep 2017 10:43:30 +0000 (13:43 +0300)]
doveadm-server: Refactor connection handshake and authentication
Simplifies next change
Aki Tuomi [Tue, 22 Aug 2017 07:14:22 +0000 (10:14 +0300)]
lib: Add multiplex stream support
This allows having multiple channels of data in single stream.
Timo Sirainen [Thu, 5 Oct 2017 08:51:23 +0000 (11:51 +0300)]
director: Allow doveadm director ring remove for the same director
Fixes:
Panic: file doveadm-connection.c: line 859 (doveadm_connection_cmd_run): assertion failed: (conn->dir->right == NULL && conn->dir->left == NULL)
Timo Sirainen [Thu, 5 Oct 2017 08:49:31 +0000 (11:49 +0300)]
director: Don't crash on doveadm director ring remove for unknown director
Ring syncing isn't started, so it shouldn't try to wait for ring sync.
Fixes:
Panic: file doveadm-connection.c: line 859 (doveadm_connection_cmd_run): assertion failed: (conn->dir->right == NULL && conn->dir->left == NULL)
Timo Sirainen [Thu, 5 Oct 2017 08:46:55 +0000 (11:46 +0300)]
director: Don't crash if DIRECTOR-REMOVE is received for itself
This triggers the director removal from the ring, which causes the
connection to be destroyed. But since we're still in the middle of handling
the connection it needs refcounting.
Timo Sirainen [Wed, 4 Oct 2017 12:11:18 +0000 (15:11 +0300)]
lib: istream-file - set blocking=TRUE automatically for blocking sockets
This fixes it to be correct with various doveadm commands.
Timo Sirainen [Wed, 4 Oct 2017 12:08:07 +0000 (15:08 +0300)]
lib: istream-file/unix - don't ignore EINTR for blocking istream reads
Just fail the istream read entirely. Although there's a small possibility
that this interrupt was unwanted and should be retried, it's more likely
that a blocking istream is hanging and admin wants to stop the process.
If the EINTR is ignored all the time, it's not possible to abort a
blocking read with ^C or anything else than SIGKILL.
Timo Sirainen [Wed, 4 Oct 2017 17:14:05 +0000 (20:14 +0300)]
lib: test-istream-unix - Use i_stream_set_blocking()
Timo Sirainen [Wed, 4 Oct 2017 17:13:49 +0000 (20:13 +0300)]
lib: Add i_stream_set_blocking()
Stephan Bosch [Sat, 16 Sep 2017 11:28:32 +0000 (13:28 +0200)]
lib-smtp: smtp-submit: Made submission_timeout a setting rather than a function parameter.
This makes it configurable.
Stephan Bosch [Thu, 14 Sep 2017 23:46:38 +0000 (01:46 +0200)]
lib-lda: Dropped now useless settings from lib-lda/lda-settings.
These are now in lib-smtp/smtp-submit-settings.
Stephan Bosch [Thu, 14 Sep 2017 23:44:24 +0000 (01:44 +0200)]
imap: Drop dependencies on lib-lda settings.
Start using lib-smtp/smtp-submit-settings instead.
Put any other settings required by IMAPSIEVE in struct imap_settings.
Stephan Bosch [Wed, 20 Sep 2017 22:14:17 +0000 (00:14 +0200)]
lib-lda: Use hostname and postmaster_address settings from mail_storage_settings where possible.
Stephan Bosch [Thu, 14 Sep 2017 23:15:19 +0000 (01:15 +0200)]
lib-lda: Use SMTP submit settings directly.
Stephan Bosch [Wed, 4 Oct 2017 20:41:14 +0000 (22:41 +0200)]
lib-storage: Renamed duplicate to mail_duplicate.
This makes more sense given where this is now located.
Stephan Bosch [Sat, 16 Sep 2017 15:06:14 +0000 (17:06 +0200)]
lib-lda: Moved duplicate handling to lib-storage.
Stephan Bosch [Thu, 14 Sep 2017 23:28:11 +0000 (01:28 +0200)]
lib-lda: Removed old smtp-client API.
Stephan Bosch [Wed, 20 Sep 2017 19:49:34 +0000 (21:49 +0200)]
lib-storage: Added hostname, postmaster_address and recipient_delimiter settings to mail_storage_settings.
Copied from lda_settings.
Stephan Bosch [Thu, 14 Sep 2017 23:13:18 +0000 (01:13 +0200)]
lda/lmtp: Parse SMTP submit settings.
Stephan Bosch [Tue, 19 Sep 2017 19:51:14 +0000 (21:51 +0200)]
lda: main: main(): Put result from mail_user_var_expand_table() in a variable.
Keeps code more compact, as this function is going to be called several times.
Stephan Bosch [Tue, 19 Sep 2017 19:39:14 +0000 (21:39 +0200)]
lmtp: commands: client_deliver(): Put client->state.dest_user in a variable.
Keeps code more compact, as this value is used several times.
Stephan Bosch [Tue, 19 Sep 2017 19:33:30 +0000 (21:33 +0200)]
lmtp: commands: client_deliver(): Put result from mail_user_var_expand_table() in a variable.
Keeps code more compact, as this function is called several times.
Stephan Bosch [Thu, 14 Sep 2017 22:10:30 +0000 (00:10 +0200)]
lib-smtp: smtp-submit: Made settings parseable.
Stephan Bosch [Wed, 13 Sep 2017 23:32:17 +0000 (01:32 +0200)]
lib-lda: Moved most of mail_deliver_save_open() to lib-storage.
This prevents the need to link Pigeonhole lib-sieve to lib-lda, which makes no sense for IMAPSIEVE.
This also allows lib-sieve to have more control over how mailboxes are opened.
Stephan Bosch [Wed, 13 Sep 2017 23:56:38 +0000 (01:56 +0200)]
lib-storage: Created mailbox_alloc_delivery(), which initializes a mailbox for message delivery.
Stephan Bosch [Wed, 13 Sep 2017 23:46:12 +0000 (01:46 +0200)]
lib-storage: Implemented new mailbox flag MAILBOX_FLAG_AUTO_SUBSCRIBE.
When this flag is enabled, the mailbox is implicitly subscribed to when it is created automatically.
Stephan Bosch [Wed, 13 Sep 2017 23:39:30 +0000 (01:39 +0200)]
lib-storage: Implemented new mailbox flag MAILBOX_FLAG_AUTO_CREATE.
When this flag is enabled, the mailbox is automatically created when it is opened (if possible and appropriate).
Stephan Bosch [Tue, 19 Sep 2017 19:08:38 +0000 (21:08 +0200)]
lib-storage: Implemented mailbox_is_autosubscribed().
Indicates whether the mailbox is automatically subscribed to when it is automatically created.
Timo Sirainen [Wed, 4 Oct 2017 12:41:03 +0000 (15:41 +0300)]
director: Fix HOST-RESET-USERS when all hosts are down
If there were a lot of users being kicked, the host was flushed after the
initial round of user kills. This caused the rest of the user connections to
be just discarded instead of actually being killed.
Timo Sirainen [Wed, 4 Oct 2017 12:39:08 +0000 (15:39 +0300)]
director: Fix tracking user move count when user is freed early
users_moving_count wasn't updated if the user was freed before killing it
finished. This caused "doveadm director flush" to hang while waiting for
the move count to drop to 0, which it never did. Also following flushes
were doing less work in parallel, or possibly even nothing since director
thought there were too many users already being moved.
Timo Sirainen [Wed, 4 Oct 2017 07:46:47 +0000 (10:46 +0300)]
quota: quota_get_resource() - return enum to make the result more exact
This is mainly to differentiate between "resource name unknown" and
"unlimited quota".
This also fixes quota_clone plugin to update quota even when quota is
unlimited. It was supposed to have been skipped only when the resource
names weren't known.
The private quota.get_resource() API is unchanged. The backends were
already returning 0 only when the resource name was unknown.
Timo Sirainen [Wed, 4 Oct 2017 07:44:47 +0000 (10:44 +0300)]
imap-quota: Return NO reply if GETQUOTA fails only partially
If the first resource lookup succeeded and the second one failed, the
GETQUOTA command replied with OK instead of NO.
Aki Tuomi [Fri, 29 Sep 2017 06:42:48 +0000 (09:42 +0300)]
doveadm-mail: Handle parse_arg return value
Invalid parameters did not cause error.
Broken in
fa6b2cbb3
Timo Sirainen [Tue, 3 Oct 2017 11:51:16 +0000 (14:51 +0300)]
lib-master: master_service_init_log() - Switch log handlers only on the first call
The secondary calls were only done by mail_storage_service_*() calls. They
want to initialize the logging once, but afterwards they only care about
changing the log prefix. Switch to this behavior now explicitly.
This fixes behavior if logging functions are changed between
mail_storage_service_*() calls, so they don't get reset.
Aki Tuomi [Mon, 18 Sep 2017 12:52:12 +0000 (15:52 +0300)]
lib-dcrypt: Use cpu32_to_be instead of htonl
prefer our own conversion functions over htonl
which is intended for networking related numbers.
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 12:54:35 +0000 (15:54 +0300)]
global: use i_close_fd{,_path}() instead of open-coding them
Josef 'Jeff' Sipek [Fri, 22 Sep 2017 07:33:51 +0000 (10:33 +0300)]
lib: introduce i_close_fd_path()
It is like i_close_fd() but takes an argument with the name of the file
that's being closed. The name is only used when printing the error
message due to a failed close() syscall.
Josef 'Jeff' Sipek [Wed, 20 Sep 2017 08:27:05 +0000 (11:27 +0300)]
lib: remove close_keep_errno()
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 13:23:30 +0000 (16:23 +0300)]
lib: improve i_close_fd() error message
In addition to printing the file and line number, we can print the
actual arg passed in as well as the function calling i_close_fd().
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 13:17:45 +0000 (16:17 +0300)]
lib: print correct error string on i_close_fd() failure
close_keep_errno() preserved the original errno, therefore the %m in
i_close_fd()'s error message printed an unrelated error string.
Aki Tuomi [Mon, 25 Sep 2017 07:08:16 +0000 (10:08 +0300)]
dovecot.service: Update systemd file
There is no point daemonizing dovecot in systemd, also added
comment about apparmor and NoNewPrivileges option.
Aki Tuomi [Wed, 27 Sep 2017 11:07:46 +0000 (14:07 +0300)]
lib-test: Suppress expected error messages
Unless pattern is also provided
Martti Rannanjärvi [Fri, 29 Sep 2017 09:37:58 +0000 (12:37 +0300)]
lib-storage: Remove obsolete mailbox_save_set_dest_mail()
Stephan Bosch [Fri, 29 Sep 2017 15:22:50 +0000 (17:22 +0200)]
configure.ac: Wrapped long LIBDOVECOT_LA_LIBS definition line to make modifications easier.
Sergey Kitov [Mon, 2 Oct 2017 10:25:42 +0000 (13:25 +0300)]
auth: global rounds parameter replaced with argument to password_generate()
username and rounds parameter moved to a single
password_generate_params structure.
Martti Rannanjärvi [Thu, 28 Sep 2017 17:18:19 +0000 (20:18 +0300)]
doveadm: Use doveadm command name as reason in doveadm_mail_iter_init()
Aki Tuomi [Fri, 22 Sep 2017 10:30:43 +0000 (13:30 +0300)]
dsync: Add hashed_headers setting
This makes it possible to configure them
Aki Tuomi [Fri, 22 Sep 2017 11:08:45 +0000 (14:08 +0300)]
dsync: Fix typo, it's ibc not icb
Aki Tuomi [Mon, 25 Sep 2017 07:28:03 +0000 (10:28 +0300)]
dsync: Add missing space to handshake optional keys
Timo Sirainen [Tue, 26 Sep 2017 14:23:32 +0000 (16:23 +0200)]
dsync: Improve reason when logging "modseq .. no longer in transaction log"
Show the current highest, as well as the last common UID and the current
next UID. These can help to try to figure out problems.
Sergey Kitov [Wed, 20 Sep 2017 08:34:49 +0000 (11:34 +0300)]
global: remove unnecessary ENOENT checks from unlink_directory() calls
Sergey Kitov [Wed, 20 Sep 2017 07:46:16 +0000 (10:46 +0300)]
lib: unlink_directory() return value is changed to 1 in case of no error.
Sergey Kitov [Wed, 20 Sep 2017 07:45:26 +0000 (10:45 +0300)]
lib: unlink_directory_r() is refactored.
unlinking doesn't stop at unlink() errors, first error is written to
error_r, consequent errors are logged via i_error errno set to first
happened error. unlink_directory_r() is expecting *error_r to be set
to NULL. errno is set to 0 before each call to readdir().
Timo Sirainen [Fri, 22 Sep 2017 10:48:46 +0000 (13:48 +0300)]
mail-crypt: Fix linking order
Timo Sirainen [Fri, 22 Sep 2017 11:10:09 +0000 (14:10 +0300)]
lib: Define i_unreached() to __builtin_unreachable() with STATIC_CHECKER
This helps clang's alpha.deadcode.UnreachableCode checker.
Martti Rannanjärvi [Fri, 22 Sep 2017 12:07:25 +0000 (15:07 +0300)]
replication-plugin: Debug-log mailbox transaction reason
Martti Rannanjärvi [Wed, 20 Sep 2017 14:15:32 +0000 (17:15 +0300)]
lib-storage: Add reason to mailbox.transaction_begin()
Martti Rannanjärvi [Wed, 20 Sep 2017 11:42:00 +0000 (14:42 +0300)]
lib-storage: Add reason to mailbox_transaction_begin()
Remove mailbox_transaction_set_reason().
Timo Sirainen [Fri, 22 Sep 2017 10:34:47 +0000 (13:34 +0300)]
configure: Fix link order: libsmtp depends on libprogram-client
Martti Rannanjärvi [Thu, 21 Sep 2017 18:49:09 +0000 (21:49 +0300)]
lib-storage: Don't crash when opening inbox fails in mailbox-list-index-notify
Timo Sirainen [Thu, 21 Sep 2017 12:53:40 +0000 (15:53 +0300)]
lib-sql: Fix compiler warning with OSX
Timo Sirainen [Thu, 21 Sep 2017 14:53:04 +0000 (17:53 +0300)]
master: Don't throttle services that are already being destroyed
If process couldn't be created, because the service_list is already being
destroyed (e.g. due to reload), also don't enable unnecessary throttling
for the service.
Hopefully fixes these random errors that are logged alone:
master: Error: service(...): command startup failed, throttling for 2 secs
Timo Sirainen [Tue, 19 Sep 2017 10:52:30 +0000 (13:52 +0300)]
lib: If log writing to log process is blocking, show it in process title
This change also makes the log pipe non-blocking.
Timo Sirainen [Tue, 19 Sep 2017 10:49:03 +0000 (13:49 +0300)]
lib: Add process_title_get()
Timo Sirainen [Wed, 20 Sep 2017 16:09:58 +0000 (19:09 +0300)]
Add <%{pid}> to default mail_log_prefix
It's especially useful nowadays when the same session ID can be reused by
multiple processes with IMAP hibernation enabled.
Timo Sirainen [Wed, 20 Sep 2017 12:56:10 +0000 (15:56 +0300)]
doveadm: "Extraneous arguments found": Show the args in the error
Stephan Bosch [Wed, 20 Sep 2017 22:38:33 +0000 (00:38 +0200)]
lib-http: client: Send empty payload (Content-Length: 0) for requests that normally expect a payload.
This includes the standard POST and PUT methods.
Others need to use the new http_client_request_set_payload_empty() function to force sending an empty payload.
Timo Sirainen [Wed, 20 Sep 2017 12:03:55 +0000 (15:03 +0300)]
notify-status plugin: Use priv/status/<mailbox> for keys
priv/<mailbox>/status can't be used with dict-sql when <mailbox> has '/'.
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 10:33:06 +0000 (13:33 +0300)]
global: start relying on buffer_free(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- buffer_free(&E);
- }
+ buffer_free(&E);
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 10:26:57 +0000 (13:26 +0300)]
lib: buffer_free(NULL) should be a no-op
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 10:25:23 +0000 (13:25 +0300)]
global: start relying on pool_unref(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- pool_unref(&E);
- }
+ pool_unref(&E);
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 10:21:07 +0000 (13:21 +0300)]
lib: pool_unref(NULL) shoud be a no-op
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 10:19:36 +0000 (13:19 +0300)]
global: start relying on [io]_stream_unref(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- i_stream_unref(&E);
- }
+ i_stream_unref(&E);
@@
expression E;
@@
- if (E != NULL) {
- o_stream_unref(&E);
- }
+ o_stream_unref(&E);
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 10:09:07 +0000 (13:09 +0300)]
lib: [io]_stream_unref(NULL) should be a no-op
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 09:53:41 +0000 (12:53 +0300)]
global: start relying on [io]_stream_destroy(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- i_stream_destroy(&E);
- }
+ i_stream_destroy(&E);
@@
expression E;
@@
- if (E != NULL) {
- o_stream_destroy(&E);
- }
+ o_stream_destroy(&E);
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 09:49:00 +0000 (12:49 +0300)]
lib: [io]_stream_destroy(NULL) should be a no-op
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 09:33:23 +0000 (12:33 +0300)]
global: start relying on timeout_remove(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- timeout_remove(&E);
- }
+ timeout_remove(&E);
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 09:30:17 +0000 (12:30 +0300)]
lib: timeout_remove(NULL) should be a no-op
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 09:28:07 +0000 (12:28 +0300)]
global: start relying on io_remove{,_closed}(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- io_remove(&E);
- }
+ io_remove(&E);
@@
expression E;
@@
- if (E != NULL) {
- io_remove_closed(&E);
- }
+ io_remove_closed(&E);
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 09:19:22 +0000 (12:19 +0300)]
lib: io_remove(NULL) and io_remove_closed(NULL) should be no-ops
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 07:20:49 +0000 (10:20 +0300)]
global: start relying on i_close_fd(-1) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != -1)
- i_close_fd(&E);
+ i_close_fd(&E);