]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
7 years agolib-lda: Renamed struct mail_deliver_context fields for consistency with lib-smtp.
Stephan Bosch [Wed, 2 Nov 2016 23:20:55 +0000 (00:20 +0100)] 
lib-lda: Renamed struct mail_deliver_context fields for consistency with lib-smtp.

New fields are added in subsequent commits.

7 years agolmtp: Removed lmtp_address_translate setting.
Stephan Bosch [Fri, 4 Nov 2016 17:16:52 +0000 (18:16 +0100)] 
lmtp: Removed lmtp_address_translate setting.

It is assumed not to be used.

7 years agolib-mail: message-address: Added convenience functions that convert (single) addresse...
Stephan Bosch [Sun, 5 Nov 2017 01:00:43 +0000 (02:00 +0100)] 
lib-mail: message-address: Added convenience functions that convert (single) addresses to string.

7 years agolib-mail: message-address: Added functions to initialize a struct message_address.
Stephan Bosch [Thu, 19 Oct 2017 13:20:04 +0000 (15:20 +0200)] 
lib-mail: message-address: Added functions to initialize a struct message_address.

7 years agolib-smtp: address: Created SMTP address detail parsing function from message_detail_a...
Stephan Bosch [Sun, 29 Oct 2017 22:37:47 +0000 (23:37 +0100)] 
lib-smtp: address: Created SMTP address detail parsing function from message_detail_address_parse().

7 years agolib-smtp: Implemented parsing, manipulation and encoding of SMTP addresses.
Stephan Bosch [Sun, 6 Nov 2016 20:15:41 +0000 (21:15 +0100)] 
lib-smtp: Implemented parsing, manipulation and encoding of SMTP addresses.

7 years agolib-smtp: Implemented generic parser for basic SMTP data items.
Stephan Bosch [Sun, 6 Nov 2016 20:08:11 +0000 (21:08 +0100)] 
lib-smtp: Implemented generic parser for basic SMTP data items.

7 years agolib: connection: Added means to initialize connection to just be added to the connect...
Stephan Bosch [Fri, 27 Oct 2017 17:43:43 +0000 (19:43 +0200)] 
lib: connection: Added means to initialize connection to just be added to the connection list.

7 years agolib-storage: Make parsed postmaster_address available in mail_storage_settings->parse...
Stephan Bosch [Thu, 19 Oct 2017 12:04:20 +0000 (14:04 +0200)] 
lib-storage: Make parsed postmaster_address available in mail_storage_settings->parsed_postmaster_address.

7 years agolib-settings: Added support for running checks after variable expansion.
Stephan Bosch [Sat, 21 Oct 2017 11:13:00 +0000 (13:13 +0200)] 
lib-settings: Added support for running checks after variable expansion.

7 years agolmtp: Accept XCLIENT ADDR field IPv6 address both with and without "IPV6:" prefix.
Stephan Bosch [Wed, 22 Nov 2017 20:02:07 +0000 (21:02 +0100)] 
lmtp: Accept XCLIENT ADDR field IPv6 address both with and without "IPV6:" prefix.

This is the format that Postfix actually prescribes.
The new lib-smtp will add the prefix by default.

7 years agolib: llist: Fixed setting (after)->next->prev in DLLIST2_INSERT_AFTER_FULL.
Stephan Bosch [Mon, 20 Nov 2017 00:26:21 +0000 (01:26 +0100)] 
lib: llist: Fixed setting (after)->next->prev in DLLIST2_INSERT_AFTER_FULL.

This function was not yet used, so the problem did not affect existing code.

7 years agolib-settings: Fix spelling of 'expanded'
Josh Soref [Sun, 26 Feb 2017 03:19:51 +0000 (03:19 +0000)] 
lib-settings: Fix spelling of 'expanded'

7 years agoimap: Make sure command handlers are called with ostream corked
Timo Sirainen [Sun, 26 Nov 2017 00:11:57 +0000 (02:11 +0200)] 
imap: Make sure command handlers are called with ostream corked

This wasn't done when client input was continued. If COPY/MOVE was called
there, it crashed with:

Panic: file cmd-copy.c: line 50 (fetch_and_copy): assertion failed: (o_stream_is_corked(client->output))

7 years agodirector: DIRECTOR-LIST - Return results sorted by host
Timo Sirainen [Sun, 26 Nov 2017 10:33:33 +0000 (12:33 +0200)] 
director: DIRECTOR-LIST - Return results sorted by host

7 years agodirector: DIRECTOR-LIST - Move connection/host output to their own functions
Timo Sirainen [Sun, 26 Nov 2017 10:26:27 +0000 (12:26 +0200)] 
director: DIRECTOR-LIST - Move connection/host output to their own functions

7 years agodirector: Make director_host_cmp_p() public
Timo Sirainen [Sun, 26 Nov 2017 10:36:54 +0000 (12:36 +0200)] 
director: Make director_host_cmp_p() public

7 years agodirector: Improve PING/PONG timeout errors and add new warnings
Timo Sirainen [Fri, 24 Nov 2017 16:46:19 +0000 (18:46 +0200)] 
director: Improve PING/PONG timeout errors and add new warnings

Log a warning if PING-PONG takes over 5 secs in total, or also if the
recipient notices that the PING took >= 5 seconds to receive.

7 years agodirector: Add director_ping_idle/max_timeout setting.
Timo Sirainen [Fri, 24 Nov 2017 16:22:04 +0000 (18:22 +0200)] 
director: Add director_ping_idle/max_timeout setting.

director_ping_idle_timeout is used when there's otherwise no input coming
from the connection. Changed its default from 10 secs to 30 secs.

director_ping_max_timeout is used when the other director keeps sending
input, but among it is no PONG reply.

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 agoglobal: Use t_buffer_create
Aki Tuomi [Tue, 21 Nov 2017 21:07:56 +0000 (23:07 +0200)] 
global: Use t_buffer_create

sed -i -e 's/buffer_create_dynamic(pool_datastack_create(), */t_buffer_create(/g'

7 years agolib: buffer - Add t_buffer_create
Aki Tuomi [Tue, 21 Nov 2017 20:57:30 +0000 (22:57 +0200)] 
lib: buffer - Add t_buffer_create

Helper for making a datastack buffer

7 years agolib-storage: Fix sorting mails with the same primary sort key
Timo Sirainen [Fri, 24 Nov 2017 10:31:22 +0000 (12:31 +0200)] 
lib-storage: Fix sorting mails with the same primary sort key

The sorting order may have been wrong when there was a combination of:
 * Messages were sorted by a string (e.g. Subject)
 * Some messages had the same sort key (e.g. same base subject)
 * Within the messages with the same sort key, some of the messages already
   had the "sort-*" index number in Dovecot indexes, but some of them
   didn't.

The result was that Dovecot found that the two messages had exactly the same
sort key. It should have continued with the secondary sort key (e.g.
message sequence number), but it didn't.

7 years agoauth: Add lua passdb/userdb support
Aki Tuomi [Wed, 8 Nov 2017 13:42:32 +0000 (15:42 +0200)] 
auth: Add lua passdb/userdb support

7 years agolib-lua: Add lua helper library
Aki Tuomi [Sat, 11 Nov 2017 09:55:21 +0000 (11:55 +0200)] 
lib-lua: Add lua helper library

Provides a base lua library for lua extensibility

7 years agoconfigure: Detect lua
Aki Tuomi [Wed, 8 Nov 2017 12:09:26 +0000 (14:09 +0200)] 
configure: Detect lua

7 years agoauth: Add accessor for userdb-template fields
Aki Tuomi [Wed, 15 Nov 2017 17:13:39 +0000 (19:13 +0200)] 
auth: Add accessor for userdb-template fields

It's needed in lua

7 years agomempool-allocfree: Add linked-list malloc allocation
Aki Tuomi [Wed, 8 Nov 2017 11:30:24 +0000 (13:30 +0200)] 
mempool-allocfree: Add linked-list malloc allocation

This is useful when you want to actually free memory from pool too

7 years agostats: Do not log errors if /proc/self/io is not accessible
Aki Tuomi [Fri, 24 Nov 2017 07:52:24 +0000 (09:52 +0200)] 
stats: Do not log errors if /proc/self/io is not accessible

Some security options, used notably in docker, can prevent
access to this file even from root, so do not log errors
if the error is EACCES.

7 years agolib: test-path-util - whitespace & coding style cleanup in create_links()
Josef 'Jeff' Sipek [Mon, 20 Nov 2017 14:46:48 +0000 (09:46 -0500)] 
lib: test-path-util - whitespace & coding style cleanup in create_links()

7 years agoauth: Check that key is not empty in passdb or userdb template
Aki Tuomi [Wed, 22 Nov 2017 08:49:49 +0000 (10:49 +0200)] 
auth: Check that key is not empty in passdb or userdb template

Prevents nasty crash later on if template has 'key = value'

dovecot: auth: Panic: file auth-request.c: line 1746 (auth_request_set_field): assertion failed: (*name != '\0')

7 years agolib-storage: Add mailbox_set_critical() and mail_set_critical()
Timo Sirainen [Wed, 22 Nov 2017 10:16:46 +0000 (12:16 +0200)] 
lib-storage: Add mailbox_set_critical() and mail_set_critical()

These add the mailbox vname and mail UID to the log prefix and then call
mail_storage_set_critical().

7 years agologin-proxy: Fix hang in outgoing SSL connections
Timo Sirainen [Wed, 22 Nov 2017 10:02:11 +0000 (12:02 +0200)] 
login-proxy: Fix hang in outgoing SSL connections

The handshaking needs to be started explicitly.

7 years agologin-proxy: Log connection errors using IP, not hostname
Timo Sirainen [Tue, 21 Nov 2017 14:52:24 +0000 (16:52 +0200)] 
login-proxy: Log connection errors using IP, not hostname

The hostname can point to multiple IPs or there can be some other mismatch.
Logging the IP instead shows exactly what is happening.

7 years agolib: path-util: Improved conditional expressions in path_normalize() to match the...
Stephan Bosch [Mon, 20 Nov 2017 20:17:24 +0000 (21:17 +0100)] 
lib: path-util: Improved conditional expressions in path_normalize() to match the earlier adjusted assertions.

Added some more assertions in the process to make sure subtractions are always valid.

7 years agolib: Improve test-path-util unit test to catch off-by-one memory allocation errors
Timo Sirainen [Mon, 20 Nov 2017 13:53:55 +0000 (15:53 +0200)] 
lib: Improve test-path-util unit test to catch off-by-one memory allocation errors

7 years agolib: path-util - Allocate more space earlier
Aki Tuomi [Mon, 20 Nov 2017 14:01:25 +0000 (16:01 +0200)] 
lib: path-util - Allocate more space earlier

Fixes assert crash in path_normalize when termination
needs to happen at asize boundary.

Panic: file path-util.c: line 93 (path_normalize): assertion failed: ((size_t)((npath_pos - npath) + 1) < asize)

7 years agolib-storage: Add a fall through comment to fix gcc-7 warning
Martti Rannanjärvi [Mon, 20 Nov 2017 15:56:52 +0000 (17:56 +0200)] 
lib-storage: Add a fall through comment to fix gcc-7 warning

7 years agomdbox: Fix rebuilding when dovecot.map.index is missing map/ref extension
Timo Sirainen [Mon, 20 Nov 2017 15:03:47 +0000 (17:03 +0200)] 
mdbox: Fix rebuilding when dovecot.map.index is missing map/ref extension

The rebuild kept just repeatedly failing with:
Error: mdbox map .../dovecot.map.index corrupted: missing map extension

7 years agolib-storage: Fix mailbox_create_missing_dir() with storages that have no mail root dir
Timo Sirainen [Sat, 18 Nov 2017 21:14:25 +0000 (23:14 +0200)] 
lib-storage: Fix mailbox_create_missing_dir() with storages that have no mail root dir

The mailbox still exists even if the mail root directory doesn't, so there's
no point in even trying to stat() it.

7 years agolib-storage: Make sure mailbox autocreation doesn't get into infinite loop
Timo Sirainen [Sat, 18 Nov 2017 21:10:47 +0000 (23:10 +0200)] 
lib-storage: Make sure mailbox autocreation doesn't get into infinite loop

If mailbox_create() -> mailbox_open() fails with MAIL_ERROR_NOTFOUND, it
would have looped back to mailbox_create() and continued this until
running out of stack.

7 years agolib-storage: Add INDEXCACHE=<path> to mail_location
Timo Sirainen [Sat, 18 Nov 2017 16:57:51 +0000 (18:57 +0200)] 
lib-storage: Add INDEXCACHE=<path> to mail_location

This allows configuring a different directory for dovecot.index.cache files
than the rest of the index files.

7 years agolib-storage: mailbox_rename() - Improve debug logging when namespaces are incompatible
Timo Sirainen [Mon, 20 Nov 2017 12:28:40 +0000 (14:28 +0200)] 
lib-storage: mailbox_rename() - Improve debug logging when namespaces are incompatible

7 years agolib-index: Add mail_index_set_cache_dir() to change .cache's directory
Timo Sirainen [Sat, 18 Nov 2017 16:12:10 +0000 (18:12 +0200)] 
lib-index: Add mail_index_set_cache_dir() to change .cache's directory

7 years agolib-index: Add mail_cache_open_or_create_path()
Timo Sirainen [Sat, 18 Nov 2017 16:03:55 +0000 (18:03 +0200)] 
lib-index: Add mail_cache_open_or_create_path()

This allows moving cache file to another directory.

7 years agovirtual: Fix crash when saving to virtual mailbox whose physical box doesn't exist
Timo Sirainen [Fri, 17 Nov 2017 22:44:12 +0000 (00:44 +0200)] 
virtual: Fix crash when saving to virtual mailbox whose physical box doesn't exist

For example if using "!foo" in dovecot-virtual and "foo" doesn't exist, it crashed.
Now it gives a nice error message instead.

7 years agolib: path-util: Made assertions in path_normalize() more reliable and less confusing...
Stephan Bosch [Sat, 18 Nov 2017 18:06:55 +0000 (19:06 +0100)] 
lib: path-util: Made assertions in path_normalize() more reliable and less confusing to static analyzer.

7 years agolib: path-util - Add more code paths to test in path_normalize()
Timo Sirainen [Fri, 17 Nov 2017 20:37:00 +0000 (22:37 +0200)] 
lib: path-util - Add more code paths to test in path_normalize()

7 years agovirtual: Wrap mail.get_binary_stream() to fix it
Timo Sirainen [Fri, 17 Nov 2017 19:44:50 +0000 (21:44 +0200)] 
virtual: Wrap mail.get_binary_stream() to fix it

Fixes using FETCH BINARY[..] with virtual mailboxes crashing with:

Panic: file index-mail-binary.c: line 585 (index_mail_get_binary_stream): assertion failed: (mail->data.stream != NULL)

7 years agoquota: Fix error handling if maildirsize rewrite fails after recalculation
Timo Sirainen [Fri, 17 Nov 2017 18:56:28 +0000 (20:56 +0200)] 
quota: Fix error handling if maildirsize rewrite fails after recalculation

error could have been left uninitialized, potentially causing a crash.

7 years agofts-lucene: Fix potential memory leak
Timo Sirainen [Fri, 17 Nov 2017 18:55:55 +0000 (20:55 +0200)] 
fts-lucene: Fix potential memory leak

7 years agolib-dcrypt: test-stream - Make static analyzer happier
Timo Sirainen [Fri, 17 Nov 2017 18:53:41 +0000 (20:53 +0200)] 
lib-dcrypt: test-stream - Make static analyzer happier

Without this clang thinks it's possible that siz>sizeof(payload).

7 years agodoveadm-auth-server: Further fix json problems
Aki Tuomi [Wed, 15 Nov 2017 12:29:59 +0000 (14:29 +0200)] 
doveadm-auth-server: Further fix json problems

Remove excess comma from start, forgotten in 3e06a782584ea2c4ae2a8cb0451e9952f05f9dc8

7 years agolib-charset: Compile charset-utf8-only code always
Timo Sirainen [Thu, 9 Nov 2017 13:33:52 +0000 (15:33 +0200)] 
lib-charset: Compile charset-utf8-only code always

Mainly so that this code always gets compiled, so any bugs are found.

7 years agolib-charset: Allow plugins to replace charset_* functions
Timo Sirainen [Thu, 9 Nov 2017 13:18:29 +0000 (15:18 +0200)] 
lib-charset: Allow plugins to replace charset_* functions

They just need to point charset_utf8_vfuncs to their own implementation.

7 years agolib-charset: Move non-iconv UTF-8 only translation code to its own file
Timo Sirainen [Thu, 9 Nov 2017 13:12:05 +0000 (15:12 +0200)] 
lib-charset: Move non-iconv UTF-8 only translation code to its own file

7 years agomail-crypt: Do not free global keys if no error has occured
Aki Tuomi [Thu, 16 Nov 2017 11:27:23 +0000 (13:27 +0200)] 
mail-crypt: Do not free global keys if no error has occured

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 agoglobal: Replace o_stream_ignore_last_errors() with o_stream_abort() wherever possible
Timo Sirainen [Wed, 15 Nov 2017 10:57:34 +0000 (12:57 +0200)] 
global: Replace o_stream_ignore_last_errors() with o_stream_abort() wherever possible

7 years agolib: Add o_stream_abort()
Timo Sirainen [Wed, 15 Nov 2017 10:49:48 +0000 (12:49 +0200)] 
lib: Add o_stream_abort()

7 years agolib-smtp: Remove unnecessary o_stream_ignore_last_errors() call
Timo Sirainen [Wed, 15 Nov 2017 10:51:12 +0000 (12:51 +0200)] 
lib-smtp: Remove unnecessary o_stream_ignore_last_errors() call

The stream is already marked with o_stream_set_no_error_handling(TRUE).

7 years agolib-storage: Fix MAILBOX_LIST_INDEX_HIERARHCY_SEP spelling
Josef 'Jeff' Sipek [Thu, 2 Nov 2017 14:07:39 +0000 (10:07 -0400)] 
lib-storage: Fix MAILBOX_LIST_INDEX_HIERARHCY_SEP spelling

Original work by @jsoref

7 years agodoveadm: client - Cleanup: Simplify the input loop
Timo Sirainen [Wed, 8 Nov 2017 12:40:14 +0000 (14:40 +0200)] 
doveadm: client - Cleanup: Simplify the input loop

7 years agodoveadm: client - Cleanup: Remove unnecessary stream_errno check
Timo Sirainen [Wed, 8 Nov 2017 12:39:06 +0000 (14:39 +0200)] 
doveadm: client - Cleanup: Remove unnecessary stream_errno check

7 years agodoveadm: client - Cleanup: Remove unnecessary code indentation
Timo Sirainen [Thu, 9 Nov 2017 14:17:26 +0000 (16:17 +0200)] 
doveadm: client - Cleanup: Remove unnecessary code indentation

7 years agodoveadm: client - Cleanup: Handle input NULL first
Timo Sirainen [Wed, 8 Nov 2017 12:35:31 +0000 (14:35 +0200)] 
doveadm: client - Cleanup: Handle input NULL first

7 years agodoveadm: client - Cleanup: Set authenticate_sent in a more proper location
Timo Sirainen [Thu, 9 Nov 2017 14:18:13 +0000 (16:18 +0200)] 
doveadm: client - Cleanup: Set authenticate_sent in a more proper location

7 years agodoveadm: client - Cleanup: Don't check authenticate_sent twice
Timo Sirainen [Wed, 8 Nov 2017 12:32:25 +0000 (14:32 +0200)] 
doveadm: client - Cleanup: Don't check authenticate_sent twice

7 years agodoveadm: client - Read any pipelined replies after authentication reply
Timo Sirainen [Wed, 8 Nov 2017 12:20:49 +0000 (14:20 +0200)] 
doveadm: client - Read any pipelined replies after authentication reply

This practically shouldn't happen.

7 years agodoveadm: client - Cleanup: Read server input only once in the input handler
Timo Sirainen [Wed, 8 Nov 2017 12:17:04 +0000 (14:17 +0200)] 
doveadm: client - Cleanup: Read server input only once in the input handler

7 years agodoveadm: client - Fail if server sends more than one VERSION reply in handshake
Timo Sirainen [Wed, 8 Nov 2017 12:11:51 +0000 (14:11 +0200)] 
doveadm: client - Fail if server sends more than one VERSION reply in handshake

7 years ago*-login: Close SSL connections cleanly
Timo Sirainen [Wed, 15 Nov 2017 14:12:15 +0000 (16:12 +0200)] 
*-login: Close SSL connections cleanly

Don't close the socket before SSL "close notify" is sent.

7 years agolib-imap: imap_envelope_parse() - remove unnecessary data stack frame
Timo Sirainen [Wed, 15 Nov 2017 13:53:03 +0000 (15:53 +0200)] 
lib-imap: imap_envelope_parse() - remove unnecessary data stack frame

imap_envelope_parse_args() isn't using data stack at all, so this
unnecessarily complicates the code. It also prevents using datastack-pool
as the pool parameter.

7 years agolib-storage: mailbox-list-index - disable if MAILBOX_LIST_PROP_NO_LIST_INDEX set
Aki Tuomi [Wed, 15 Nov 2017 07:22:34 +0000 (09:22 +0200)] 
lib-storage: mailbox-list-index - disable if MAILBOX_LIST_PROP_NO_LIST_INDEX set

7 years agolib-storage: imapc - use MAILBOX_LIST_PROP_NO_LIST_INDEX
Aki Tuomi [Mon, 13 Nov 2017 13:28:08 +0000 (15:28 +0200)] 
lib-storage: imapc - use MAILBOX_LIST_PROP_NO_LIST_INDEX

mailbox list index does not work with imapc, so disable it.

Panic: file mail-storage.c: line 1858 (mailbox_get_metadata): assertion failed: ((items & MAILBOX_METADATA_GUID) == 0 || !guid_128_is_empty(metadata_r->guid))

7 years agolib-storage: mailbox-list-none - use MAILBOX_LIST_PROP_NO_LIST_INDEX flag
Aki Tuomi [Wed, 15 Nov 2017 07:16:12 +0000 (09:16 +0200)] 
lib-storage: mailbox-list-none - use MAILBOX_LIST_PROP_NO_LIST_INDEX flag

7 years agolib-storage: Add MAILBOX_LIST_PROP_NO_LIST_INDEX
Aki Tuomi [Mon, 13 Nov 2017 13:27:07 +0000 (15:27 +0200)] 
lib-storage: Add MAILBOX_LIST_PROP_NO_LIST_INDEX

If set, disables mailbox list index for the given list.

7 years agodoveadm-auth-server: Send comma only if we are sending field too
Aki Tuomi [Wed, 15 Nov 2017 08:28:37 +0000 (10:28 +0200)] 
doveadm-auth-server: Send comma only if we are sending field too

Fixes json output

7 years agolib-master: Drop support for SSL_TXT_SSLV2 in master-service-ssl-settings.c
Martti Rannanjärvi [Tue, 14 Nov 2017 11:49:22 +0000 (13:49 +0200)] 
lib-master: Drop support for SSL_TXT_SSLV2 in master-service-ssl-settings.c

OpenSSL headers are not included in master-service-ssl-settings.c, so
the check for SSL_TXT_SSLV2 is broken at the moment, and the feature is
not worth supporting since SSLv2 is obsolete.

7 years agom4: Refuse to build with OpenSSL version < 1.0.1
Martti Rannanjärvi [Wed, 15 Nov 2017 04:13:30 +0000 (06:13 +0200)] 
m4: Refuse to build with OpenSSL version < 1.0.1

7 years agolib: Add unit test for dec2str_buf()
Timo Sirainen [Tue, 14 Nov 2017 18:14:09 +0000 (20:14 +0200)] 
lib: Add unit test for dec2str_buf()

7 years agoauth: Remove userdb nss
Timo Sirainen [Tue, 14 Nov 2017 14:51:37 +0000 (16:51 +0200)] 
auth: Remove userdb nss

Its original purpose was because getpwnam() couldn't differentiate between
"user doesn't exist" and "temporary error", but this was solved by using
getpwnam_r() instead.

So all userdb nss users should be able to safely switch to userdb passwd.

7 years agoimap: SELECT/EXAMINE - Send * OK [CLOSED] before tagged BAD parameters reply
Timo Sirainen [Mon, 13 Nov 2017 22:09:10 +0000 (00:09 +0200)] 
imap: SELECT/EXAMINE - Send * OK [CLOSED] before tagged BAD parameters reply

7 years agoman: doveadm proxy -a parameter doesn't support TCP sockets
Timo Sirainen [Thu, 9 Nov 2017 14:30:34 +0000 (16:30 +0200)] 
man: doveadm proxy -a parameter doesn't support TCP sockets

7 years agofts-solr: Explicitly ask for XML responses
Simon Frankenberger [Thu, 9 Nov 2017 06:08:24 +0000 (07:08 +0100)] 
fts-solr: Explicitly ask for XML responses

With recent solr versions (7.0+) the default response
writer changed from XML to JSON. This commit sets the
"wt" query parameter for all requests, so that the right
response type is written.