]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
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);
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 07:13:15 +0000 (10:13 +0300)]
lib: i_close_fd(-1) should be a no-op
Timo Sirainen [Tue, 19 Sep 2017 22:47:38 +0000 (01:47 +0300)]
director: Fix flush to kick the user also when all backends are down
The user's host can't change, because there are no other hosts. So add a
new parameter to force the kick anyway.
Timo Sirainen [Tue, 19 Sep 2017 11:48:54 +0000 (14:48 +0300)]
cassandra: Timestamp should be in microseconds, not milliseconds
Josef 'Jeff' Sipek [Mon, 18 Sep 2017 11:15:44 +0000 (14:15 +0300)]
global: use i_rand_limit() and i_rand_minmax() when possible
Josef 'Jeff' Sipek [Mon, 18 Sep 2017 10:55:08 +0000 (13:55 +0300)]
lib: introduce i_rand_limit() and i_rand_minmax()
Josef 'Jeff' Sipek [Mon, 18 Sep 2017 13:48:41 +0000 (16:48 +0300)]
lib-index: fix off-by-one in index flag update test
When selecting the second seq, the max value we should generate is
hdr.messages_count - not one less than that.
Timo Sirainen [Tue, 19 Sep 2017 08:18:30 +0000 (11:18 +0300)]
lib-storage: Fail if two namespaces try to wrongly share the same LISTINDEX
If they have different mailboxes-path, they can't be sharing the same
mailbox list index. The previous behavior caused Dovecot to silently
overwrite the list index whenever each of the namespaces were accessed,
resulting in bad performance.
Timo Sirainen [Mon, 18 Sep 2017 20:04:55 +0000 (23:04 +0300)]
notify-status: Remove first_unseen_seq field
The sequence number keeps changing, so it's very unlikely to be useful.
It's also not always as efficiently available as the other fields, so
better to avoid having it.
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:26:51 +0000 (14:26 +0300)]
lib-storage: convert struct pop3_mail casts to container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:11:06 +0000 (14:11 +0300)]
lib-storage: convert struct imapc_mail casts to container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 10:04:01 +0000 (13:04 +0300)]
lib-storage: convert index to use container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:29:08 +0000 (14:29 +0300)]
lib-storage: convert missed mbox casts to container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:28:27 +0000 (14:28 +0300)]
lib-storage: convert missed raw storage casts to container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:24:46 +0000 (14:24 +0300)]
lib-storage: convert missed maildir casts to container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:21:03 +0000 (14:21 +0300)]
lib-storage: convert missed imapc casts to container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:08:44 +0000 (14:08 +0300)]
lib-storage: convert missed cydir casts to container_of
Sergey Kitov [Fri, 15 Sep 2017 12:17:08 +0000 (15:17 +0300)]
auth: Expand %{ldap_dn} to ldap_get_dn().
Timo Sirainen [Thu, 14 Sep 2017 09:50:29 +0000 (12:50 +0300)]
director: Avoid "ring sync timeout" errors when all backends are down
doveadm commands were failing with it. Also pending request failures were
logged as failing due to ring sync timeout, instead of because no hosts.
Timo Sirainen [Thu, 14 Sep 2017 10:02:40 +0000 (13:02 +0300)]
director: Delay calling state_change_callback() after user kick is finished
Otherwise it can get into recursive loop and cause problems.
Timo Sirainen [Thu, 14 Sep 2017 09:42:13 +0000 (12:42 +0300)]
doveadm director: Improve logging unexpected disconnections from director socket
Previously it just logged "failed", which wasn't very understandable.
Timo Sirainen [Tue, 22 Aug 2017 13:32:32 +0000 (16:32 +0300)]
director: Fix crash when flush is run and all backends are down.
Instead of moving the users elsewhere, just kill them and flush the backend.
Timo Sirainen [Fri, 15 Sep 2017 08:49:16 +0000 (11:49 +0300)]
lib: uri_parser_init*() - initialize allow_pct_nul
Unless the caller explicitly cleared the parser's memory, allow_pct_nul was
somewhat random. All the code in Dovecot core did this, but some plugins
didn't.
Timo Sirainen [Thu, 14 Sep 2017 15:13:05 +0000 (18:13 +0300)]
director: Fix ring sync wait after DIRECTOR-REMOVE
It was sending OK twice, and the first OK was too early.
Timo Sirainen [Thu, 14 Sep 2017 14:59:05 +0000 (17:59 +0300)]
director: Ignore CONNECT requests to hosts that have been removed already
Timo Sirainen [Thu, 14 Sep 2017 14:57:29 +0000 (17:57 +0300)]
director: After CONNECT was received, make sure we disconnect
The remote side won't be reading anything after the CONNECT, so we have to
disconnect anyway. If we decide that the CONNECT request is wrong, reconnect
after a short delay and hope that the remote agrees with us the next time.
Timo Sirainen [Thu, 14 Sep 2017 14:48:50 +0000 (17:48 +0300)]
director: When director is removed, notify it before disconnecting
This way the removed director will know that it's been removed, and it
can also more quickly forward the removal to other directors.
Timo Sirainen [Thu, 14 Sep 2017 14:38:24 +0000 (17:38 +0300)]
director: Don't reset directors' last_network_failure while handshaking
The reset is done mainly to make it faster for a director that has been down
to connect back to the ring, without other directors still thinking that
it's down. But DIRECTOR that is sent during handshake says nothing about
whether the director is up at the moment or not.
Timo Sirainen [Thu, 14 Sep 2017 14:35:02 +0000 (17:35 +0300)]
director: Log info line for every incoming/outgoing connection
This can help with debugging problems.
Timo Sirainen [Thu, 14 Sep 2017 14:33:19 +0000 (17:33 +0300)]
director: Cleanup - move code to a new director_log_connect()
Also adds a missing ')' to the log line.
Timo Sirainen [Thu, 14 Sep 2017 14:29:48 +0000 (17:29 +0300)]
director: Log info line whenever a director is added/removed from ring
This can help with debugging problems.
Timo Sirainen [Thu, 14 Sep 2017 15:13:33 +0000 (18:13 +0300)]
director: Improve debugging: Log ring desync when there is no right connection
Timo Sirainen [Thu, 14 Sep 2017 14:26:39 +0000 (17:26 +0300)]
director: When logging "ring SYNC lost", include sync seq number in message
This can help with debugging.
Aki Tuomi [Thu, 14 Sep 2017 10:34:22 +0000 (13:34 +0300)]
lib: chdir to / after chroot
Makes static analyzers more happy
Timo Sirainen [Thu, 14 Sep 2017 08:57:27 +0000 (11:57 +0300)]
doveadm director ring remove: Wait ring sync before and after removal
This helps mainly with automated tests.
Timo Sirainen [Thu, 14 Sep 2017 10:19:26 +0000 (13:19 +0300)]
director: Return temporary auth failures using the new "code" field
The "temp" is no longer used.
Timo Sirainen [Wed, 13 Sep 2017 20:35:04 +0000 (23:35 +0300)]
lib-mail: message_header_encode() cleanup - simplify pointer arithmetic
This should make static analyzers happier.
Timo Sirainen [Wed, 13 Sep 2017 20:26:49 +0000 (23:26 +0300)]
global: Add asserts to help static analyzers
Timo Sirainen [Wed, 13 Sep 2017 20:24:01 +0000 (23:24 +0300)]
lib-index: Remove size from struct mail_keywords.idx[]
This was confusing static analyzers, which thought that using [1] meant that
its size really was 1.
Timo Sirainen [Wed, 13 Sep 2017 15:06:43 +0000 (18:06 +0300)]
man: Remove extra ^L from "doveadm fetch" example
It's no longer sent.
Timo Sirainen [Wed, 13 Sep 2017 13:13:34 +0000 (16:13 +0300)]
lib-storage: Fix updating mailbox GUID in mailbox list index when it's empty
Normally the GUID shouldn't be empty at this point. Updating mailbox GUID is
also very rare. So this was unlikely to cause any problems in practise.
Timo Sirainen [Wed, 13 Sep 2017 13:09:05 +0000 (16:09 +0300)]
master: Don't send uninitialized byte to anvil along the log fd.
The byte was ignored by anvil, so it didn't cause any real problems.
Timo Sirainen [Wed, 13 Sep 2017 13:06:48 +0000 (16:06 +0300)]
cassandra: NULL values' sizes weren't initialized
This was only a problem if sql_result_get_field_value_binary() was
attempted to be used for a NULL value.
Timo Sirainen [Wed, 13 Sep 2017 15:32:23 +0000 (18:32 +0300)]
lib-index: If mail_index_view is leaked, include in Panic the file:line where it was opened
Timo Sirainen [Wed, 13 Sep 2017 12:16:59 +0000 (15:16 +0300)]
cassandra: Fix paged queries to work again
When continuing the result, consistency was reset to 0 (=ANY), which caused
the queries to fail. There's no need to initialize the statement again when
continuing it. Also set result->consistency to be correct mainly for
debugging purposes.
Timo Sirainen [Mon, 11 Sep 2017 09:27:17 +0000 (12:27 +0300)]
lib-storage: Fix mailbox list notification assert-crash when mailbox is deleted
Reproduced with if IMAP NOTIFY is used for non-selected mailboxes without
MailboxName being specified. Another session then does changes to a
mailbox and immediately deletes it, which causes the crash.
Fixes:
Panic: file mailbox-list-index-notify.c: line 751: unreached
Stephan Bosch [Tue, 12 Sep 2017 22:28:38 +0000 (00:28 +0200)]
lib-smtp: lmtp-client: Fixed handling of unexpected reply while sending RCPT TO commands.
It caused a segfault.
Timo Sirainen [Fri, 8 Sep 2017 13:00:53 +0000 (16:00 +0300)]
doveadm director kick: Fix -f parameter to work
It already worked as --passdb-field, but now it matches the usage string.
Timo Sirainen [Mon, 11 Sep 2017 09:59:27 +0000 (12:59 +0300)]
lib-index: mail_index_use_existing_permissions() - Ignore with INDEX=MEMORY
Timo Sirainen [Mon, 11 Sep 2017 09:58:28 +0000 (12:58 +0300)]
lib-index: mail_index_use_existing_permissions() - Log error if stat() unexpectedly fails
Timo Sirainen [Mon, 11 Sep 2017 10:54:12 +0000 (13:54 +0300)]
lib-storage: Avoid unnecessary stat()s in mailbox list index notifications
If mailbox list gets a notification there's no need to stat() the INBOX, and
vice versa. Also if the notification was already seen and a callback timeout
set, there's no need to keep stat()ing.
Timo Sirainen [Mon, 11 Sep 2017 10:48:17 +0000 (13:48 +0300)]
lib-storage: Make sure mailbox list notification flush sees latest changes.
This is mainly useful with imaptest test scripts to make sure they're seeing
the changes done by the other session, without assuming that inotify will
always notify about the change before NOOP is run (it doesn't).
Do this only if mailbox_idle_check_interval>0, so it's not run when periodic
stat()s are wanted to be avoided.
Timo Sirainen [Tue, 12 Sep 2017 11:54:57 +0000 (14:54 +0300)]
lib: file_lock_set_unlink_on_free() - Avoid unlink() if another process is waiting on the lock
Timo Sirainen [Tue, 12 Sep 2017 10:23:51 +0000 (13:23 +0300)]
cassandra: Disable prepared statements with protocol v3 and older
Timo Sirainen [Mon, 11 Sep 2017 09:10:49 +0000 (12:10 +0300)]
lib-smtp: Link with libcharset.la to avoid errors
Stephan Bosch [Sat, 9 Sep 2017 10:58:12 +0000 (12:58 +0200)]
lib-http: client: queue: Improved construction of timeout log message.
Earlier change used a literal prefix size, rather than inferring the size from the actual prefix string.
Stephan Bosch [Sat, 9 Sep 2017 10:27:16 +0000 (12:27 +0200)]
lib-smtp: test-smtp-submit: Fixed memory leak in one test.
Stephan Bosch [Sat, 9 Sep 2017 10:22:47 +0000 (12:22 +0200)]
lib-smtp: test-smtp-submit: Improved checking of delivered message.
This addresses a couple of scan-build "dead assignment" warnings.
Stephan Bosch [Fri, 5 May 2017 15:06:32 +0000 (17:06 +0200)]
lib-smtp: smtp-submit: Added support for asynchronous message submission.
Stephan Bosch [Fri, 5 May 2017 11:26:46 +0000 (13:26 +0200)]
lib-lda: Moved smtp-submit to lib-smtp.
Stephan Bosch [Fri, 5 May 2017 11:21:16 +0000 (13:21 +0200)]
lib-lda: Made smtp-submit standalone.
Removed dependencies on LDA.
Stephan Bosch [Fri, 5 May 2017 11:06:39 +0000 (13:06 +0200)]
lib-lda: Renamed smtp-client to smtp-submit (2/2).
Renamed smtp_client identifiers to smtp_submit.
Also, created temporary backwards-compatibility in smtp-client.h.
Stephan Bosch [Fri, 5 May 2017 10:55:49 +0000 (12:55 +0200)]
lib-lda: Renamed smtp-client to smtp-submit (1/2).
Renamed the files.
Stephan Bosch [Tue, 28 Feb 2017 22:56:47 +0000 (23:56 +0100)]
lib-lda: Created tests for SMTP message submission using the smtp-client API.
Timo Sirainen [Fri, 8 Sep 2017 09:20:21 +0000 (12:20 +0300)]
lib-storage: Preserve messages' vsize record when rebuilding index
Since vsize is often used by quota, losing this can be very expensive.
If the vsize is wrong, it gets fixed automatically when fetching the
message body.
Timo Sirainen [Tue, 22 Aug 2017 11:35:11 +0000 (14:35 +0300)]
cassandra: Add support for prepared statements
Timo Sirainen [Tue, 22 Aug 2017 10:55:15 +0000 (13:55 +0300)]
cassandra: Cleanup - Create statement earlier
Simplifies the following changes