]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
8 years agodirector: After CONNECT was received, make sure we disconnect
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.

8 years agodirector: When director is removed, notify it before disconnecting
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.

8 years agodirector: Don't reset directors' last_network_failure while handshaking
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.

8 years agodirector: Log info line for every incoming/outgoing connection
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.

8 years agodirector: Cleanup - move code to a new director_log_connect()
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.

8 years agodirector: Log info line whenever a director is added/removed from ring
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.

8 years agodirector: Improve debugging: Log ring desync when there is no right connection
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

8 years agodirector: When logging "ring SYNC lost", include sync seq number in message
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.

8 years agolib: chdir to / after chroot
Aki Tuomi [Thu, 14 Sep 2017 10:34:22 +0000 (13:34 +0300)] 
lib: chdir to / after chroot

Makes static analyzers more happy

8 years agodoveadm director ring remove: Wait ring sync before and after removal
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.

8 years agodirector: Return temporary auth failures using the new "code" field
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.

8 years agolib-mail: message_header_encode() cleanup - simplify pointer arithmetic
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.

8 years agoglobal: Add asserts to help static analyzers
Timo Sirainen [Wed, 13 Sep 2017 20:26:49 +0000 (23:26 +0300)] 
global: Add asserts to help static analyzers

8 years agolib-index: Remove size from struct mail_keywords.idx[]
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.

8 years agoman: Remove extra ^L from "doveadm fetch" example
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.

8 years agolib-storage: Fix updating mailbox GUID in mailbox list index when it's empty
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.

8 years agomaster: Don't send uninitialized byte to anvil along the log fd.
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.

8 years agocassandra: NULL values' sizes weren't initialized
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.

8 years agolib-index: If mail_index_view is leaked, include in Panic the file:line where it...
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

8 years agocassandra: Fix paged queries to work again
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.

8 years agolib-storage: Fix mailbox list notification assert-crash when mailbox is deleted
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

8 years agolib-smtp: lmtp-client: Fixed handling of unexpected reply while sending RCPT TO commands.
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.

8 years agodoveadm director kick: Fix -f parameter to work
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.

8 years agolib-index: mail_index_use_existing_permissions() - Ignore with INDEX=MEMORY
Timo Sirainen [Mon, 11 Sep 2017 09:59:27 +0000 (12:59 +0300)] 
lib-index: mail_index_use_existing_permissions() - Ignore with INDEX=MEMORY

8 years agolib-index: mail_index_use_existing_permissions() - Log error if stat() unexpectedly...
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

8 years agolib-storage: Avoid unnecessary stat()s in mailbox list index notifications
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.

8 years agolib-storage: Make sure mailbox list notification flush sees latest changes.
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.

8 years agolib: file_lock_set_unlink_on_free() - Avoid unlink() if another process is waiting...
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

8 years agocassandra: Disable prepared statements with protocol v3 and older
Timo Sirainen [Tue, 12 Sep 2017 10:23:51 +0000 (13:23 +0300)] 
cassandra: Disable prepared statements with protocol v3 and older

8 years agolib-smtp: Link with libcharset.la to avoid errors
Timo Sirainen [Mon, 11 Sep 2017 09:10:49 +0000 (12:10 +0300)] 
lib-smtp: Link with libcharset.la to avoid errors

8 years agolib-http: client: queue: Improved construction of timeout log message.
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.

8 years agolib-smtp: test-smtp-submit: Fixed memory leak in one test.
Stephan Bosch [Sat, 9 Sep 2017 10:27:16 +0000 (12:27 +0200)] 
lib-smtp: test-smtp-submit: Fixed memory leak in one test.

8 years agolib-smtp: test-smtp-submit: Improved checking of delivered message.
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.

8 years agolib-smtp: smtp-submit: Added support for asynchronous message submission.
Stephan Bosch [Fri, 5 May 2017 15:06:32 +0000 (17:06 +0200)] 
lib-smtp: smtp-submit: Added support for asynchronous message submission.

8 years agolib-lda: Moved smtp-submit to lib-smtp.
Stephan Bosch [Fri, 5 May 2017 11:26:46 +0000 (13:26 +0200)] 
lib-lda: Moved smtp-submit to lib-smtp.

8 years agolib-lda: Made smtp-submit standalone.
Stephan Bosch [Fri, 5 May 2017 11:21:16 +0000 (13:21 +0200)] 
lib-lda: Made smtp-submit standalone.

Removed dependencies on LDA.

8 years agolib-lda: Renamed smtp-client to smtp-submit (2/2).
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.

8 years agolib-lda: Renamed smtp-client to smtp-submit (1/2).
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.

8 years agolib-lda: Created tests for SMTP message submission using the smtp-client API.
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.

8 years agolib-storage: Preserve messages' vsize record when rebuilding index
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.

8 years agocassandra: Add support for prepared statements
Timo Sirainen [Tue, 22 Aug 2017 11:35:11 +0000 (14:35 +0300)] 
cassandra: Add support for prepared statements

8 years agocassandra: Cleanup - Create statement earlier
Timo Sirainen [Tue, 22 Aug 2017 10:55:15 +0000 (13:55 +0300)] 
cassandra: Cleanup - Create statement earlier

Simplifies the following changes

8 years agocassandra: sql_transaction_commit*() cleanup - handle multiple query failures earlier
Timo Sirainen [Thu, 24 Aug 2017 08:56:38 +0000 (11:56 +0300)] 
cassandra: sql_transaction_commit*() cleanup - handle multiple query failures earlier

This makes the handling same for the sync and async method. It also
simplifies code for the following commits.

8 years agocassandra: sql_transaction_commit_s() - Set query_type correctly
Timo Sirainen [Thu, 24 Aug 2017 08:13:32 +0000 (11:13 +0300)] 
cassandra: sql_transaction_commit_s() - Set query_type correctly

The queries were all sent with READ type instead of WRITE/DELETE. This
meant they were using potentially wrong consistency values. Although
synchronous commits aren't actually used anywhere, so this practically
this doesn't fix anything right now.

8 years agocassandra: sql_transaction_commit_s() - Don't allow multi-query transactions
Timo Sirainen [Thu, 24 Aug 2017 08:09:05 +0000 (11:09 +0300)] 
cassandra: sql_transaction_commit_s() - Don't allow multi-query transactions

They were already denied for asynchronous commits. Also the synchronous
commits aren't actually used anywhere, so this shouldn't break anything.

8 years agodict-sql: Use prepared statements
Timo Sirainen [Thu, 7 Sep 2017 12:40:16 +0000 (15:40 +0300)] 
dict-sql: Use prepared statements

Create a hash table of query template -> prepared statement and fill it out
as needed. This could have been done some alternative ways that wouldn't
require building the string first, but this should still be fast enough and
much easier to implement.

8 years agodict-sql: Flush pending atomic_inc on set, and pending set on atomic_inc
Timo Sirainen [Sat, 26 Aug 2017 20:27:21 +0000 (23:27 +0300)] 
dict-sql: Flush pending atomic_inc on set, and pending set on atomic_inc

8 years agodict-sql: Cleanup - change query generator functions to return statement
Timo Sirainen [Sat, 26 Aug 2017 20:17:45 +0000 (23:17 +0300)] 
dict-sql: Cleanup - change query generator functions to return statement

Instead of query+params. This is in preparation for the following changes.

8 years agodict-sql: Cleanup - Remove unnecessary code
Timo Sirainen [Tue, 15 Aug 2017 13:50:16 +0000 (16:50 +0300)] 
dict-sql: Cleanup - Remove unnecessary code

The values are explicitly added to params. sql_dict_update_query() doesn't
add them again. Since the "diff" parameter is already a long long type,
this avoids unnecessary conversion to string and back.

8 years agodict-sql: Use sql_statement_bind_*()
Timo Sirainen [Tue, 15 Aug 2017 13:38:33 +0000 (16:38 +0300)] 
dict-sql: Use sql_statement_bind_*()

8 years agodict-sql: Add signed "int" type
Timo Sirainen [Tue, 15 Aug 2017 12:37:01 +0000 (15:37 +0300)] 
dict-sql: Add signed "int" type

8 years agodict-sql: Use sql_statement_set_timestamp() instead of adding it to query
Timo Sirainen [Tue, 15 Aug 2017 11:55:48 +0000 (14:55 +0300)] 
dict-sql: Use sql_statement_set_timestamp() instead of adding it to query

8 years agodict-sql: Initial change to use sql_statement API
Timo Sirainen [Tue, 15 Aug 2017 11:46:10 +0000 (14:46 +0300)] 
dict-sql: Initial change to use sql_statement API

sql_statement_bind_*() will be followed by later changes.

8 years agodict-sql: Remove dict_sql_build_query.inc
Timo Sirainen [Tue, 15 Aug 2017 13:44:27 +0000 (16:44 +0300)] 
dict-sql: Remove dict_sql_build_query.inc

It's no longer useful with the current code.

8 years agodict-sql: Change "uint" type to mean 64bit instead of 32bit integer.
Timo Sirainen [Tue, 15 Aug 2017 11:27:40 +0000 (14:27 +0300)] 
dict-sql: Change "uint" type to mean 64bit instead of 32bit integer.

This is likely what is usually wanted (especially in e.g. quotas).
If someone actually wants it to be restricted to 32bit, we could add
uint32 later on.

8 years agolib-sql: Add support for prepared SQL statements.
Timo Sirainen [Tue, 22 Aug 2017 08:37:17 +0000 (11:37 +0300)] 
lib-sql: Add support for prepared SQL statements.

This initial implementation doesn't use prepared statements in drivers, but
simply generates the query string internally.

8 years agolib-sql: Explicitly specify used *_vfuncs methods for drivers.
Timo Sirainen [Tue, 22 Aug 2017 08:31:51 +0000 (11:31 +0300)] 
lib-sql: Explicitly specify used *_vfuncs methods for drivers.

This allows adding more methods without modifying all the existing drivers.

8 years agodoveadm proxy: Avoid DNS lookup for "host" if passdb also returns "hostip"
Timo Sirainen [Fri, 8 Sep 2017 08:02:29 +0000 (11:02 +0300)] 
doveadm proxy: Avoid DNS lookup for "host" if passdb also returns "hostip"

8 years agolmtp proxy: Avoid DNS lookup for "host" if passdb also returns "hostip"
Timo Sirainen [Fri, 8 Sep 2017 08:02:07 +0000 (11:02 +0300)] 
lmtp proxy: Avoid DNS lookup for "host" if passdb also returns "hostip"

8 years agoauth: Avoid DNS lookup for "host" if passdb returns also "hostip"
Timo Sirainen [Fri, 8 Sep 2017 08:01:20 +0000 (11:01 +0300)] 
auth: Avoid DNS lookup for "host" if passdb returns also "hostip"

8 years agolib: Only deprecate rand/rand_r on recent enough compilers
Aki Tuomi [Thu, 7 Sep 2017 09:18:55 +0000 (12:18 +0300)] 
lib: Only deprecate rand/rand_r on recent enough compilers

8 years agomaster: Write all the early warnings to log file after logging is initialized
Timo Sirainen [Tue, 5 Sep 2017 17:42:31 +0000 (20:42 +0300)] 
master: Write all the early warnings to log file after logging is initialized

Any warnings (or errors) logged before settings were read and logging was
initialized caused them to be only written to stderr. This caused them to
be lost too easily. Now they are also buffered in memory and then flushed
to log files once logging is initialized.

8 years agolib: Free io_switch_callbacks_free only after other atexit-callbacks
Timo Sirainen [Thu, 7 Sep 2017 09:44:46 +0000 (12:44 +0300)] 
lib: Free io_switch_callbacks_free only after other atexit-callbacks

Fixes a crash at deinit where io_loop_remove_switch_callback() was called in
lib_atexit() callback.

8 years agoglobal: Replace random_fill_weak with random_fill
Aki Tuomi [Mon, 4 Sep 2017 12:46:39 +0000 (15:46 +0300)] 
global: Replace random_fill_weak with random_fill

They are now the same thing

8 years agoglobal: Remove random_init/random_deinit calls
Aki Tuomi [Wed, 23 Aug 2017 11:12:20 +0000 (14:12 +0300)] 
global: Remove random_init/random_deinit calls

lib already initializes it.

8 years agolib: Simplify timing_add_usecs
Aki Tuomi [Wed, 23 Aug 2017 10:42:09 +0000 (13:42 +0300)] 
lib: Simplify timing_add_usecs

i_rand is guaranteed to return 32 bit integer

8 years agolib: Warn if rand is used
Aki Tuomi [Wed, 23 Aug 2017 09:59:30 +0000 (12:59 +0300)] 
lib: Warn if rand is used

8 years agoglobal: Replace rand with i_rand
Aki Tuomi [Wed, 23 Aug 2017 09:59:42 +0000 (12:59 +0300)] 
global: Replace rand with i_rand

8 years agolib: Use best available random number generator
Aki Tuomi [Wed, 23 Aug 2017 09:49:03 +0000 (12:49 +0300)] 
lib: Use best available random number generator

The best available method is used from short list of
getrandom, arc4random or reading /dev/urandom

8 years agolib: Replace rand.c with i_rand function
Aki Tuomi [Wed, 23 Aug 2017 09:38:07 +0000 (12:38 +0300)] 
lib: Replace rand.c with i_rand function

Replacement for rand

8 years agolib: Replace rand_set_seed with srand
Aki Tuomi [Mon, 4 Sep 2017 12:22:13 +0000 (15:22 +0300)] 
lib: Replace rand_set_seed with srand

Makes following commits easier, and also
makes sure that rand() will get seeded when
used by other libraries.

8 years agolib-test: Remove rand state dump
Aki Tuomi [Wed, 23 Aug 2017 10:02:36 +0000 (13:02 +0300)] 
lib-test: Remove rand state dump

It's not possible after next commit

8 years agoconfigure: Check for getrandom
Aki Tuomi [Wed, 23 Aug 2017 09:53:50 +0000 (12:53 +0300)] 
configure: Check for getrandom

8 years agolib: lib-signals: Removed explicit notification of ioloop change through lib_signals_...
Stephan Bosch [Thu, 2 Mar 2017 22:13:48 +0000 (23:13 +0100)] 
lib: lib-signals: Removed explicit notification of ioloop change through lib_signals_reset_ioloop() in favor of implicit method.

Before, if the ioloop changed, the application had to explicitly notify lib-signals using lib_signals_reset_ioloop().
This is error-prone and requires doing this all over the Dovecot code base.
Now, lib-signals registers an ioloop switch callback that deals with this implicitly.
The application can detach lib-signals from the ioloop explicitly if delayed signal handling is not required/desired in the new ioloop.
Specific delayed signal handlers can be exempt from this automated behavior using a flag, meaning that such signal handlers need to be moved between ioloops explicitly.

8 years agolib-storage: convert dbox-multi to use container_of
Josef 'Jeff' Sipek [Fri, 1 Sep 2017 12:10:52 +0000 (15:10 +0300)] 
lib-storage: convert dbox-multi to use container_of

8 years agolib-storage: convert dbox-single to use container_of
Josef 'Jeff' Sipek [Fri, 1 Sep 2017 12:09:00 +0000 (15:09 +0300)] 
lib-storage: convert dbox-single to use container_of

8 years agolib-storage: convert dbox-common to use container_of
Josef 'Jeff' Sipek [Fri, 1 Sep 2017 12:06:54 +0000 (15:06 +0300)] 
lib-storage: convert dbox-common to use container_of

8 years agolib-storage: convert cydir to use container_of
Josef 'Jeff' Sipek [Mon, 28 Aug 2017 08:52:52 +0000 (11:52 +0300)] 
lib-storage: convert cydir to use container_of

8 years agolib-storage: convert shared to use container_of
Josef 'Jeff' Sipek [Mon, 28 Aug 2017 08:52:06 +0000 (11:52 +0300)] 
lib-storage: convert shared to use container_of

8 years agolib-storage: convert raw to use container_of
Josef 'Jeff' Sipek [Mon, 28 Aug 2017 08:51:34 +0000 (11:51 +0300)] 
lib-storage: convert raw to use container_of

8 years agolib-storage: convert imapc to use container_of
Josef 'Jeff' Sipek [Mon, 28 Aug 2017 08:50:40 +0000 (11:50 +0300)] 
lib-storage: convert imapc to use container_of

8 years agolib-storage: convert pop3c to use container_of
Josef 'Jeff' Sipek [Mon, 28 Aug 2017 08:26:20 +0000 (11:26 +0300)] 
lib-storage: convert pop3c to use container_of

8 years agolib-storage: convert mbox to use container_of
Josef 'Jeff' Sipek [Mon, 28 Aug 2017 08:24:21 +0000 (11:24 +0300)] 
lib-storage: convert mbox to use container_of

8 years agolib-storage: convert maildir to use container_of
Josef 'Jeff' Sipek [Mon, 28 Aug 2017 08:15:45 +0000 (11:15 +0300)] 
lib-storage: convert maildir to use container_of

8 years agolib: introduce container_of
Josef 'Jeff' Sipek [Tue, 13 Sep 2016 19:01:56 +0000 (15:01 -0400)] 
lib: introduce container_of

This is a simple but type safe implementation.

8 years agolib-storage: rename IMAPC_CONTEXT to IMAPC_SEARCHCTX
Josef 'Jeff' Sipek [Fri, 1 Sep 2017 11:57:20 +0000 (14:57 +0300)] 
lib-storage: rename IMAPC_CONTEXT to IMAPC_SEARCHCTX

8 years agoauth: Rename overlooked "original_username" after c3e50b
Manuel Mausz [Mon, 4 Sep 2017 14:52:01 +0000 (16:52 +0200)] 
auth: Rename overlooked "original_username" after c3e50b

In c3e50b854dec3f9a51dbaecf2ee56197125a003f "original_username" field got renamed to "original-username".

8 years agodoveadm-server: http: Fixed crash occurring when disconnecting a client at server...
Stephan Bosch [Sun, 18 Jun 2017 17:55:23 +0000 (19:55 +0200)] 
doveadm-server: http: Fixed crash occurring when disconnecting a client at server deinit.

8 years ago*-login: Cache director_username_hash between KICK-DIRECTOR-HASH commands
Timo Sirainen [Wed, 19 Jul 2017 13:53:17 +0000 (16:53 +0300)] 
*-login: Cache director_username_hash between KICK-DIRECTOR-HASH commands

This should make the kicking much faster, which is important when director
is moving thousands of users.

8 years agolib-mail: Make sure mail_user_hash() won't return 0 as the hash.
Timo Sirainen [Wed, 19 Jul 2017 13:49:18 +0000 (16:49 +0300)] 
lib-mail: Make sure mail_user_hash() won't return 0 as the hash.

It doesn't seem to actually happen, but this makes sure of it.

8 years agodoveadm-fs: Fix argument handling
Aki Tuomi [Sun, 27 Aug 2017 10:55:52 +0000 (13:55 +0300)] 
doveadm-fs: Fix argument handling

If argument contains - and needs to be passed to doveadm-fs
then it needs -- to make sure getopt won't choke on it, and
due to this, we need to use getopt in doveadm-fs too, to make
sure -- gets removed.

8 years agodoveadm-dict: Convert to new parameter handling
Aki Tuomi [Sun, 27 Aug 2017 09:50:35 +0000 (12:50 +0300)] 
doveadm-dict: Convert to new parameter handling

Fixes problems with negative numbers as parameters

8 years agodoveadm: Make sure positional arguments end up in right place
Aki Tuomi [Sun, 27 Aug 2017 09:57:51 +0000 (12:57 +0300)] 
doveadm: Make sure positional arguments end up in right place

Otherwise -- is placed into wrong place and breaks command line
reparsing in legacy functions.

8 years agoinit: Execute /etc/default/dovecot on init, if it exists
Tom Sommer [Tue, 7 Feb 2017 12:06:31 +0000 (13:06 +0100)] 
init: Execute /etc/default/dovecot on init, if it exists

8 years agoinit: Execute /etc/sysconfig/dovecot on init, if it exists
Tom Sommer [Thu, 12 Jan 2017 09:02:13 +0000 (10:02 +0100)] 
init: Execute /etc/sysconfig/dovecot on init, if it exists

Helps users set `ulimit`, `DAEMON` etc. without having to touch the init.d script.

8 years agoauth: cache: don't log password mismatch twice
manuel [Mon, 4 Sep 2017 15:43:31 +0000 (17:43 +0200)] 
auth: cache: don't log password mismatch twice

If auth cache is enabled and the last auth was successful dovecot assumes the
password has been changed and invalidates the cache which results in
double logging of the same password mismatch.
This also applies to expired negative cache entries.

8 years agodsync: Ignore missing remote mailbox when doing unidirectional sync
Aki Tuomi [Tue, 5 Sep 2017 07:43:46 +0000 (10:43 +0300)] 
dsync: Ignore missing remote mailbox when doing unidirectional sync

If there are some folders on remote system that
are being ignored by remote brain, do not error out.

8 years agolib-storage: Fix INBOX notifications to set correct events
Timo Sirainen [Mon, 4 Sep 2017 14:48:52 +0000 (17:48 +0300)] 
lib-storage: Fix INBOX notifications to set correct events

This fixes IMAP NOTIFY so it doesn't send STATUS notifications to INBOX when
it doesn't have to.

8 years agolib-storage: List index notify cleanup - move code to separate functions
Timo Sirainen [Mon, 4 Sep 2017 14:37:05 +0000 (17:37 +0300)] 
lib-storage: List index notify cleanup - move code to separate functions

No functional changes. In preparation for the next commit.

8 years agolib-storage: Remove INBOX notification checks if mailbox events aren't requested
Timo Sirainen [Mon, 4 Sep 2017 13:59:52 +0000 (16:59 +0300)] 
lib-storage: Remove INBOX notification checks if mailbox events aren't requested

Nothing would be done with the results of those checks.

Note that MAILBOX_LIST_NOTIFY_UIDVALIDITY can be handled using mailbox list
index, even for INBOX with mailbox_list_index_include_inbox=no.