]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
7 years agodirector: Log exactly how long PING was waited on before it timed out.
Timo Sirainen [Fri, 24 Nov 2017 16:18:45 +0000 (18:18 +0200)] 
director: Log exactly how long PING was waited on before it timed out.

7 years agodirector: DIRECTOR-LIST - Add "ring " prefix to self's status
Timo Sirainen [Sun, 26 Nov 2017 10:20:26 +0000 (12:20 +0200)] 
director: DIRECTOR-LIST - Add "ring " prefix to self's status

This is to make it a bit easier to understand the difference between a
connection's "handshaking" state vs. "ring handshaking" state.

7 years agodirector: DIRECTOR-LIST - Show number of USERs sent/received in "handshaking" state
Timo Sirainen [Sun, 26 Nov 2017 10:19:36 +0000 (12:19 +0200)] 
director: DIRECTOR-LIST - Show number of USERs sent/received in "handshaking" state

7 years agodirector: Include number of users sent in handshake in disconnection log lines
Timo Sirainen [Sun, 26 Nov 2017 10:13:35 +0000 (12:13 +0200)] 
director: Include number of users sent in handshake in disconnection log lines

7 years agodirector: Show number of incoming USERs/sec in ps title
Timo Sirainen [Sun, 26 Nov 2017 01:45:00 +0000 (03:45 +0200)] 
director: Show number of incoming USERs/sec in ps title

7 years agodirector: Include number of USERs received in disconnection log lines
Timo Sirainen [Sat, 25 Nov 2017 21:28:12 +0000 (23:28 +0200)] 
director: Include number of USERs received in disconnection log lines

Separate handshake and refresh USERs.

7 years agodirector: Don't send USERs in handshake that were already sent between handshake
Timo Sirainen [Sat, 25 Nov 2017 08:01:31 +0000 (10:01 +0200)] 
director: Don't send USERs in handshake that were already sent between handshake

If the user was refreshed since the handshake was started, it means that
the same user was already sent to the other side (added to the stream
immediately after it was received/handled). There's no need to send it
again.

This fixes a potentally infinite handshake when users are rapidly changing
and the handshake iterator never sees the end of the list. (Each refreshed
user is moved to the end of the list, so handshaking can keep sending the
same user over and over again.)

7 years agodirector: Delay sorting users until there are no more user iterators
Timo Sirainen [Sat, 25 Nov 2017 08:05:27 +0000 (10:05 +0200)] 
director: Delay sorting users until there are no more user iterators

This shouldn't have normally happened. Only when an outgoing handshake was
going on at the same time as a) another outgoing handshake was going on, or
b) doveadm was doing HOST-RESET-USERS

7 years agodirector: Avoid USER loops with >1s ring latency also with old directors
Timo Sirainen [Sat, 25 Nov 2017 23:31:08 +0000 (01:31 +0200)] 
director: Avoid USER loops with >1s ring latency also with old directors

Do this by ignoring USER refreshes that were already updated recently.
The "recently" is calculated by director_user_expire/4 seconds ago, but
with an upper limit of 15 secs. This means that the USER loops can now
only exist if the director ring latency is above 15 seconds. (Once all
directors in the ring are running the new version, there's no looping
at any latency.)

7 years agodirector: Avoid USER loops when ring latency is over 1 second
Timo Sirainen [Sat, 25 Nov 2017 23:19:35 +0000 (01:19 +0200)] 
director: Avoid USER loops when ring latency is over 1 second

Do this by adding a timestamp parameter to USER events. This way if it
takes over 1 second for the USER event to traverse the ring, it won't get
into an infinite loop getting the user updated over and over again.

7 years agodirector: Replace USER command during handshake with "U"
Timo Sirainen [Sat, 25 Nov 2017 23:14:01 +0000 (01:14 +0200)] 
director: Replace USER command during handshake with "U"

This clearly differentiates the two commands and allows extending the USER
command with new parameters without mixing it up with the handshake-USER.

7 years agodirector: Ignore refresh requests for already expired user timestamps
Timo Sirainen [Sat, 25 Nov 2017 23:06:43 +0000 (01:06 +0200)] 
director: Ignore refresh requests for already expired user timestamps

7 years agodirector: Keep users unsorted during handshake and sort them at the end
Timo Sirainen [Fri, 17 Nov 2017 11:24:59 +0000 (13:24 +0200)] 
director: Keep users unsorted during handshake and sort them at the end

This is simpler and sometimes more efficient than the current way of
immediately inserting the users to the correct place in the linked list.
This is especially useful if handshaking is mixed with regular USER updates,
because each switch between them required walking the linked list backwards
to find the proper insert position.

It's not a big problem if the users list is temporarily unordered. It mainly
means that some of the users won't be expired as early as they should have.

7 years agodirector: Make sure users are sorted after unfinished handshake
Timo Sirainen [Fri, 17 Nov 2017 16:53:18 +0000 (18:53 +0200)] 
director: Make sure users are sorted after unfinished handshake

The users were sorted after the handshake was finished, but if the
connection was closed before that hapepned, the users were left
unsorted. This could have caused the users to not expire early
enough.

7 years agodirector: Make sure user's timestamp isn't set to future
Timo Sirainen [Fri, 17 Nov 2017 12:56:20 +0000 (14:56 +0200)] 
director: Make sure user's timestamp isn't set to future

The sending director could have the system clock slightly in the future.

7 years agodirector: Make sure a missing right-side connection is always reconnected
Timo Sirainen [Wed, 15 Nov 2017 22:53:34 +0000 (00:53 +0200)] 
director: Make sure a missing right-side connection is always reconnected

This code shouldn't be needed, but add it just to be sure.

7 years agodirector: Reconnect after detecting a write failure to director
Timo Sirainen [Wed, 15 Nov 2017 22:44:17 +0000 (00:44 +0200)] 
director: Reconnect after detecting a write failure to director

If disconnection is detected during write failure, or "Output buffer full"
occurs, the connection is disconnected. However, if this was the right side
connection, it wasn't automatically reconnected to. This left the ring
nonworking.

7 years agolib-http: client: Send empty payload (Content-Length: 0) for requests that normally...
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.

7 years agodirector: Fix director_max_parallel_moves/kicks type
Timo Sirainen [Thu, 9 Nov 2017 10:24:16 +0000 (12:24 +0200)] 
director: Fix director_max_parallel_moves/kicks type

Should be uint, not time.

7 years agolib-storage: When copying mails, copy also empty cache fields
Timo Sirainen [Mon, 6 Nov 2017 16:59:34 +0000 (18:59 +0200)] 
lib-storage: When copying mails, copy also empty cache fields

This mainly means that it copies cache fields for nonexistent message
headers. Those are still important, because otherwise Dovecot doesn't know
whether they exist or not.

7 years agodirector: Add director_max_parallel_moves/kicks settings
Timo Sirainen [Tue, 7 Nov 2017 15:36:05 +0000 (17:36 +0200)] 
director: Add director_max_parallel_moves/kicks settings

The director_max_parallel_moves setting controls the default limit, which
can still be increased by explicitly using the doveadm director flush
--max-parallel" parameter.

7 years agodirector: Limit max kicking count
Aki Tuomi [Mon, 6 Nov 2017 08:36:07 +0000 (10:36 +0200)] 
director: Limit max kicking count

7 years agodirector: Add kick_callback to director
Aki Tuomi [Tue, 7 Nov 2017 12:34:32 +0000 (14:34 +0200)] 
director: Add kick_callback to director

This callback gets called whenever director has performed
a kick.

7 years ago*-login: Add login_proxy_notify_path setting to configure proxy-notify path
Timo Sirainen [Fri, 27 Oct 2017 13:45:16 +0000 (16:45 +0300)] 
*-login: Add login_proxy_notify_path setting to configure proxy-notify path

A single FIFO can be a bottleneck, so this could be set to e.g.:

login_proxy_notify_path = proxy-notify%1R{pid}

or:

login_proxy_notify_path = proxy-notify%10N{pid}

7 years agodirector: Allow proxy-notify to optionally be a socket
Timo Sirainen [Fri, 27 Oct 2017 13:24:54 +0000 (16:24 +0300)] 
director: Allow proxy-notify to optionally be a socket

Dovecot isn't using this currently, but it can be useful if external
services want to send notifications.

7 years agodirector: Support multiple proxy-notify connections
Timo Sirainen [Fri, 27 Oct 2017 13:20:15 +0000 (16:20 +0300)] 
director: Support multiple proxy-notify connections

7 years agodirector: Make sure HOST-RESET-USERS isn't used with max_moving_users=0
Timo Sirainen [Sun, 5 Nov 2017 21:51:56 +0000 (23:51 +0200)] 
director: Make sure HOST-RESET-USERS isn't used with max_moving_users=0

The reset command would just hang in that case. doveadm would never have
sent this, so this is just an extra sanity check.

7 years agodirector: Show in process title how many users are being kicked.
Timo Sirainen [Sun, 5 Nov 2017 21:27:36 +0000 (23:27 +0200)] 
director: Show in process title how many users are being kicked.

7 years agodirector: Show in process title how many requests are being delayed.
Timo Sirainen [Sun, 5 Nov 2017 21:01:56 +0000 (23:01 +0200)] 
director: Show in process title how many requests are being delayed.

7 years agodirector: Log an error if login process sends unexpected reply to KICK* commands
Timo Sirainen [Mon, 6 Nov 2017 08:57:03 +0000 (10:57 +0200)] 
director: Log an error if login process sends unexpected reply to KICK* commands

7 years agodirector: Log whenever HOST-RESET-USERS is used
Timo Sirainen [Sun, 5 Nov 2017 20:53:23 +0000 (22:53 +0200)] 
director: Log whenever HOST-RESET-USERS is used

7 years agodirector: Include used CPU secs in director connection log messages
Timo Sirainen [Sun, 5 Nov 2017 20:38:27 +0000 (22:38 +0200)] 
director: Include used CPU secs in director connection log messages

It's counting the process's full CPU seconds used since the handshake
started, so it's not specific to the connection itself. Still, this is
likely to be very useful in debugging whether a slow handshake was due
to CPU usage or something else.

7 years agodirector: Deduplicate code into director_connection_set_connected()
Timo Sirainen [Sun, 5 Nov 2017 20:37:27 +0000 (22:37 +0200)] 
director: Deduplicate code into director_connection_set_connected()

7 years agodirector: Include peak output buffer size in director connection log messages
Timo Sirainen [Sun, 5 Nov 2017 20:27:41 +0000 (22:27 +0200)] 
director: Include peak output buffer size in director connection log messages

7 years agodirector: Don't block too long when sending users during director handshake
Timo Sirainen [Sun, 5 Nov 2017 23:30:13 +0000 (01:30 +0200)] 
director: Don't block too long when sending users during director handshake

All the other work is blocked while the users are being sent.

7 years agolib: str_parse/to_*int*() - minor optimization
Timo Sirainen [Sun, 5 Nov 2017 19:36:55 +0000 (21:36 +0200)] 
lib: str_parse/to_*int*() - minor optimization

7 years agodirector: Avoid str_printfa() in director_connection_send_users()
Timo Sirainen [Sat, 4 Nov 2017 13:29:29 +0000 (15:29 +0200)] 
director: Avoid str_printfa() in director_connection_send_users()

Optimizes the CPU usage.

7 years agodirector: Avoid str_printfa() in login_host_callback()
Timo Sirainen [Sat, 4 Nov 2017 00:17:55 +0000 (02:17 +0200)] 
director: Avoid str_printfa() in login_host_callback()

Optimizes the CPU usage.

7 years agodirector: Change request callback to take mail_host parameter
Timo Sirainen [Sat, 4 Nov 2017 00:05:26 +0000 (02:05 +0200)] 
director: Change request callback to take mail_host parameter

This allows accessing the IP address both as struct and as string without
any conversions.

7 years agodirector: Use *_host.ip_str to avoid net_ip2addr() calls
Timo Sirainen [Fri, 3 Nov 2017 23:59:27 +0000 (01:59 +0200)] 
director: Use *_host.ip_str to avoid net_ip2addr() calls

7 years agodirector: Add director_host.ip_str
Timo Sirainen [Fri, 3 Nov 2017 23:51:25 +0000 (01:51 +0200)] 
director: Add director_host.ip_str

This avoids having to use net_ip2addr() all the time to convert it into a
string.

7 years agodirector: Add mail_host.ip_str
Timo Sirainen [Fri, 3 Nov 2017 23:49:29 +0000 (01:49 +0200)] 
director: Add mail_host.ip_str

This avoids having to use net_ip2addr() all the time to convert it into a
string.

7 years agodirector: Use t_strsplit_tabescaped_inplace() for director connection input
Timo Sirainen [Fri, 3 Nov 2017 23:48:41 +0000 (01:48 +0200)] 
director: Use t_strsplit_tabescaped_inplace() for director connection input

7 years agolib: net_addr2ip() - Optimize for parsing IPv4 addresses
Timo Sirainen [Fri, 3 Nov 2017 23:43:41 +0000 (01:43 +0200)] 
lib: net_addr2ip() - Optimize for parsing IPv4 addresses

7 years agolib: net_ip2addr() - Optimize by allocating destination memory immediately
Timo Sirainen [Fri, 3 Nov 2017 23:42:37 +0000 (01:42 +0200)] 
lib: net_ip2addr() - Optimize by allocating destination memory immediately

It doesn't really matter if we allocate a few extra bytes.

7 years agolib: *_strsplit() - implement more efficient version for a single separator char
Timo Sirainen [Fri, 3 Nov 2017 23:40:24 +0000 (01:40 +0200)] 
lib: *_strsplit() - implement more efficient version for a single separator char

7 years agolib: Implement t_strsplit_tabescaped_inplace()
Timo Sirainen [Fri, 3 Nov 2017 23:39:38 +0000 (01:39 +0200)] 
lib: Implement t_strsplit_tabescaped_inplace()

This is a more efficient version of t_strsplit_tabescaped(), which modifies
the input string instead of duplicating it.

7 years agolib: t_strsplit_tabescaped() - don't create unnecessary data stack mempool
Timo Sirainen [Fri, 3 Nov 2017 23:37:19 +0000 (01:37 +0200)] 
lib: t_strsplit_tabescaped() - don't create unnecessary data stack mempool

unsafe_data_stack_pool is more efficient to use

7 years agolib: str_tabunescape() - optimize initial escape char lookup
Timo Sirainen [Fri, 3 Nov 2017 23:35:44 +0000 (01:35 +0200)] 
lib: str_tabunescape() - optimize initial escape char lookup

strchr() is faster than looping ourself.

7 years agodirector: Don't recreate timeout on every user lookup
Timo Sirainen [Fri, 3 Nov 2017 23:34:02 +0000 (01:34 +0200)] 
director: Don't recreate timeout on every user lookup

Recreate it only when the timeout should change.

7 years agodirector: Fix off-by-one when checking if user weakness is stuck
Timo Sirainen [Sun, 5 Nov 2017 21:11:25 +0000 (23:11 +0200)] 
director: Fix off-by-one when checking if user weakness is stuck

When the weakness was exactly at the second, the weakness wasn't detected
and the next expiration timeout was removed entirely. This shouldn't have
caused any bigger problems, because another user lookup on the following
second would have then detected the weakness, removed the user and restored
the next expiration timeout.

7 years agodirector: Show each director connection in doveadm DIRECTOR-LIST
Timo Sirainen [Thu, 26 Oct 2017 10:56:25 +0000 (13:56 +0300)] 
director: Show each director connection in doveadm DIRECTOR-LIST

Previously the host was shown only once, regardless of how many connections
it had. This especially helps when there are just two directors, but also
can be useful when showing incoming/outgoing connections that are still
in handshaking phase.

7 years agodoveadm director ring status: Add more fields related to connection status
Timo Sirainen [Thu, 26 Oct 2017 11:10:51 +0000 (14:10 +0300)] 
doveadm director ring status: Add more fields related to connection status

7 years agodirector: Track show long the last ring sync took.
Timo Sirainen [Thu, 26 Oct 2017 11:18:50 +0000 (14:18 +0300)] 
director: Track show long the last ring sync took.

7 years agodirector: Track connections' last ping time
Timo Sirainen [Thu, 26 Oct 2017 11:07:56 +0000 (14:07 +0300)] 
director: Track connections' last ping time

7 years agodirector: Add director_connection_get_status()
Timo Sirainen [Thu, 26 Oct 2017 10:07:30 +0000 (13:07 +0300)] 
director: Add director_connection_get_status()

Can be used to access connection-specific status information.

7 years agodirector: Fix updating director connection's last_output timestamp
Timo Sirainen [Thu, 26 Oct 2017 10:02:32 +0000 (13:02 +0300)] 
director: Fix updating director connection's last_output timestamp

It was previously updated only in ostream's flush callback, which was called
only when there were a lot of output. This only caused the "last output"
timestamp in disconnection log lines to be wrong.

7 years agodoveadm director: Parse timestamp parameters with str_to_time()
Timo Sirainen [Thu, 26 Oct 2017 09:44:34 +0000 (12:44 +0300)] 
doveadm director: Parse timestamp parameters with str_to_time()

7 years agodirector: Close director connection immediately when output buffer is full
Timo Sirainen [Wed, 25 Oct 2017 14:22:42 +0000 (17:22 +0300)] 
director: Close director connection immediately when output buffer is full

Only the ostream was closed, which didn't actually cause the disconnection
until the other side closed the connection.

7 years agodirector: Add director_output_buffer_size setting
Timo Sirainen [Wed, 25 Oct 2017 14:18:03 +0000 (17:18 +0300)] 
director: Add director_output_buffer_size setting

This allows configuring the max buffer size for outgoing connections.
Previously it was hardcoded to 10 MB, which wasn't necessarily enough for
very busy directors.

7 years agolib-fs: Fix fs_wrapper_write_stream_finish() to work with async parent fs
Timo Sirainen [Mon, 16 Oct 2017 10:53:58 +0000 (13:53 +0300)] 
lib-fs: Fix fs_wrapper_write_stream_finish() to work with async parent fs

This only became a problem with the previous fs-compress change.

7 years agolib-storage: Fix assert-crash when searching header and MIMEPART
Timo Sirainen [Thu, 19 Oct 2017 11:39:01 +0000 (14:39 +0300)] 
lib-storage: Fix assert-crash when searching header and MIMEPART

For now this is just a bit kludgy workaround. The proper fix requires
larger changes, which aren't worth the effort right now.

For example:
doveadm fetch -u testuser uid MAILBOX inbox FROM foo MIMEPART FILENAME CONTAINS bar BODY baz

Crashes with:
Panic: file index-mail-headers.c: line 294 (index_mail_parse_header): assertion failed: (part != NULL)

8 years agoauth: Fix %{ldap_dn} not to leak memory
Timo Sirainen [Thu, 19 Oct 2017 12:39:28 +0000 (15:39 +0300)] 
auth: Fix %{ldap_dn} not to leak memory

8 years agoacl plugin: avoid "'struct stat' declared inside parameter list" warning
Josef 'Jeff' Sipek [Wed, 11 Oct 2017 20:33:57 +0000 (16:33 -0400)] 
acl plugin: avoid "'struct stat' declared inside parameter list" warning

8 years agoAdded "ULL" to the hex literals that needed it.
Bill Cole [Tue, 10 Oct 2017 21:40:04 +0000 (17:40 -0400)] 
Added "ULL" to the hex literals that needed it.

On 32-bit platforms with older compilers (e.g. gcc 4.2 on MacOS 10.6
running on a 1st-gen Core Duo) a 'long' is 4 bytes and the compiler does
not automatically use a 'long long' when needed, but instead generates
an error. e.g.:

libtool: compile:  /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib-mail -I../../../src/lib-index -I../../../src/lib-storage -I../../../src/plugins/fts -I../../../src/doveadm -I/opt/local/include/openssl -I/opt/local/include -I/opt/local/include/CLucene/ext -pipe -Os -arch i386 -D__STDC_LIMIT_MACROS -MT lucene-wrapper.lo -MD -MP -MF .deps/lucene-wrapper.Tpo -c lucene-wrapper.cc  -fno-common -DPIC -o .libs/lucene-wrapper.o
In file included from ../../../src/lib/lib.h:33,
                 from lucene-wrapper.cc:4:
../../../src/lib/byteorder.h:94: error: integer constant is too large for ‘long’ type
../../../src/lib/byteorder.h:95: error: integer constant is too large for ‘long’ type
../../../src/lib/byteorder.h:96: error: integer constant is too large for ‘long’ type
../../../src/lib/byteorder.h:97: error: integer constant is too large for ‘long’ type
make[4]: *** [lucene-wrapper.lo] Error 1

Adding the 'ULL' to the end of the 16-digit hex literals that are used
to test the structure of 64-bit integers fixes this and avoids any
problem which could arise from the compiler using a 32-bit type for
those literals that could fit in 32 bites.

8 years agocassandra: Support "timestamp" type fields properly
Timo Sirainen [Mon, 16 Oct 2017 12:41:56 +0000 (15:41 +0300)] 
cassandra: Support "timestamp" type fields properly

Fixes setting them with prepared statements. Reading them never worked
earlier.

8 years agocassandra: Include "prepared" when logging about prepared statement queries
Timo Sirainen [Mon, 16 Oct 2017 12:12:12 +0000 (15:12 +0300)] 
cassandra: Include "prepared" when logging about prepared statement queries

Mainly useful for debugging/testing.

8 years agocassandra: Fix using bigint types with unprepared statements
Timo Sirainen [Mon, 16 Oct 2017 11:49:56 +0000 (14:49 +0300)] 
cassandra: Fix using bigint types with unprepared statements

This reverts the code to not using the statements with binding at all.
Alternative fix would be to start using explicit int32 or int64 parameter
types, but that breaks backwards compatibility a bit.

8 years agodoveadm proxy: Don't crash if remote doesn't support log proxying
Timo Sirainen [Sat, 14 Oct 2017 09:54:18 +0000 (12:54 +0300)] 
doveadm proxy: Don't crash if remote doesn't support log proxying

8 years agofs-compress: Allow compress level 0 to skip compression
Timo Sirainen [Fri, 13 Oct 2017 09:34:01 +0000 (12:34 +0300)] 
fs-compress: Allow compress level 0 to skip compression

This can be useful when combined with the "maybe-" prefix, so Dovecot will
support reading compressed files without creating new ones.

8 years agolib-storage: Add settings to configure lib-index optimization parameters
Timo Sirainen [Mon, 9 Oct 2017 13:37:08 +0000 (16:37 +0300)] 
lib-storage: Add settings to configure lib-index optimization parameters

The defaults are expected to be pretty good, but these settings make it
easier to test whether other values might be more optimal.

8 years agolib-index: Add mail_index_cache_optimization_settings
Timo Sirainen [Mon, 9 Oct 2017 12:37:51 +0000 (15:37 +0300)] 
lib-index: Add mail_index_cache_optimization_settings

8 years agolib-index: Add mail_index_base_optimization_settings
Timo Sirainen [Mon, 9 Oct 2017 12:24:45 +0000 (15:24 +0300)] 
lib-index: Add mail_index_base_optimization_settings

8 years agolib-index: Replace mail_index_set_log_rotation() with mail_index_set_optimization_set...
Timo Sirainen [Mon, 9 Oct 2017 12:15:08 +0000 (15:15 +0300)] 
lib-index: Replace mail_index_set_log_rotation() with mail_index_set_optimization_settings()

This allows more easily adding optimization-related settings.

8 years agofs-compress: Support reading uncompressed input by prefixing compression format with...
Timo Sirainen [Fri, 6 Oct 2017 15:33:24 +0000 (18:33 +0300)] 
fs-compress: Support reading uncompressed input by prefixing compression format with "maybe-"

8 years agolib: Add istream-try
Timo Sirainen [Fri, 6 Oct 2017 15:31:12 +0000 (18:31 +0300)] 
lib: Add istream-try

This can be used to automatically detect the underlying istream format from
a given list of choices.

8 years agolib: io_stream_set_error() - Allow one of the parameters to be the old error
Timo Sirainen [Mon, 9 Oct 2017 15:31:52 +0000 (18:31 +0300)] 
lib: io_stream_set_error() - Allow one of the parameters to be the old error

8 years agolib-master: Allow a second log initialization after settings have been read.
Timo Sirainen [Wed, 11 Oct 2017 10:03:51 +0000 (13:03 +0300)] 
lib-master: Allow a second log initialization after settings have been read.

This fixes logging with services that bypass the log service (lda or -L
parameter).

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: ostream-multiplex - ignore flush return value
Timo Sirainen [Tue, 10 Oct 2017 12:38:13 +0000 (15:38 +0300)] 
lib: ostream-multiplex - ignore flush return value

There's nothing that can be done about it at close() time. Silences static
analyzer warnings.

8 years agolib: ostream-multiplex - remove unnecessary flushes
Timo Sirainen [Tue, 10 Oct 2017 12:37:39 +0000 (15:37 +0300)] 
lib: ostream-multiplex - remove unnecessary flushes

8 years agolib: istream-multiplex - Minor optimization
Timo Sirainen [Tue, 10 Oct 2017 09:33:08 +0000 (12:33 +0300)] 
lib: istream-multiplex - Minor optimization

There's no need to find channel when we already know it. This also helps
static analyzers to understand that req_channel can't be NULL.

8 years agodoveadm-mail-crypt: Do not return prematurely in key generate
Aki Tuomi [Tue, 10 Oct 2017 09:52:15 +0000 (12:52 +0300)] 
doveadm-mail-crypt: Do not return prematurely in key generate

Broken by 446d7d9ddfe122e152b832c13fc28d164ae2c5e9

8 years agoostream-multiplex: Check flush return value
Aki Tuomi [Fri, 6 Oct 2017 06:02:49 +0000 (09:02 +0300)] 
ostream-multiplex: Check flush return value

8 years agotest-ostream-escaped: Check flush return value
Aki Tuomi [Fri, 6 Oct 2017 05:55:33 +0000 (08:55 +0300)] 
test-ostream-escaped: Check flush return value

Found by coverity

8 years agodoveadm-server: Remove flush before multiplex
Aki Tuomi [Fri, 6 Oct 2017 05:54:38 +0000 (08:54 +0300)] 
doveadm-server: Remove flush before multiplex

It's not really necessary, found by coverity

8 years agoiostream-multiplex: Check return values in tests
Aki Tuomi [Fri, 6 Oct 2017 05:52:18 +0000 (08:52 +0300)] 
iostream-multiplex: Check return values in tests

8 years agodoveadm: Return after destroying connection
Aki Tuomi [Fri, 6 Oct 2017 05:46:00 +0000 (08:46 +0300)] 
doveadm: Return after destroying connection

Prevents NULL deferences, found by coverity.

8 years agodoveadm mcp keypair generate: Fix -f parameter
Timo Sirainen [Thu, 17 Aug 2017 11:17:46 +0000 (14:17 +0300)] 
doveadm mcp keypair generate: Fix -f parameter

8 years agopop3: Expand settings to fix rawlog_dir
Timo Sirainen [Fri, 6 Oct 2017 11:39:00 +0000 (14:39 +0300)] 
pop3: Expand settings to fix rawlog_dir

Even if %variables weren't used in rawlog_dir, the path was always prefixed
with "0".

8 years agodoveadm-mail-crypt: Print existing folder key hash when aborting generate
Martti Rannanjärvi [Fri, 6 Oct 2017 09:47:06 +0000 (12:47 +0300)] 
doveadm-mail-crypt: Print existing folder key hash when aborting generate

8 years agodoveadm-mail-crypt: Print existing userkey hash when aborting generate
Martti Rannanjärvi [Fri, 6 Oct 2017 08:07:23 +0000 (11:07 +0300)] 
doveadm-mail-crypt: Print existing userkey hash when aborting generate

8 years agomail-crypt: Improve doveadm output
Aki Tuomi [Thu, 5 Oct 2017 12:53:16 +0000 (15:53 +0300)] 
mail-crypt: Improve doveadm output

8 years agomail-crypt: Fix key generation handling
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.

8 years agoostream-multiplex: Unreference stream parent
Aki Tuomi [Mon, 9 Oct 2017 15:21:24 +0000 (18:21 +0300)] 
ostream-multiplex: Unreference stream parent

Otherwise it won't get free'd.

8 years agodoveadm: Add remote(host) prefix to all proxied logs
Timo Sirainen [Mon, 9 Oct 2017 10:55:06 +0000 (13:55 +0300)] 
doveadm: Add remote(host) prefix to all proxied logs

8 years agodoveadm log test: Fix it to work again
Timo Sirainen [Mon, 9 Oct 2017 11:28:17 +0000 (14:28 +0300)] 
doveadm log test: Fix it to work again

Broken by 719abeb2088987f213a33a7dd1fe78958beaef03

8 years agolib: ostream-multiplex - set ostream_private.parent
Timo Sirainen [Mon, 9 Oct 2017 10:19:32 +0000 (13:19 +0300)] 
lib: ostream-multiplex - set ostream_private.parent

Unlike with istream-multiplex, there are no issues with I/Os. Only the
parent stream will have the I/O. Using the default parent adds the
missing methods that otherwise would have needed to be implemented:
 - cork
 - flush_pending
 - switch_ioloop

8 years agolib: istream-multiplex - Forward i_stream_switch_ioloop() to parent
Timo Sirainen [Mon, 9 Oct 2017 10:14:23 +0000 (13:14 +0300)] 
lib: istream-multiplex - Forward i_stream_switch_ioloop() to parent

Most istreams do this because istream_private.parent is set to the parent
stream, but this can't be done with istream-multiplex. The main problem
with attempting to do the same with istream-multiplex is that the different
channels don't share the same I/O. Just because one channel received data
doesn't mean that other channels received any data. (It would be possible
to solve this by implementing a new method that allows overriding
i_stream_set_io(), but I'm not sure if that's a good idea either.)

8 years agoacl: Fix compiler warning with -Wstrict-bool
Timo Sirainen [Sun, 8 Oct 2017 22:22:47 +0000 (01:22 +0300)] 
acl: Fix compiler warning with -Wstrict-bool