]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
7 years agovirtual: Clamp backend uids to available uids in virtual_get_virtual_uids
Aki Tuomi [Mon, 25 Jun 2018 10:13:43 +0000 (13:13 +0300)] 
virtual: Clamp backend uids to available uids in virtual_get_virtual_uids

7 years agolib-imap-client: Fix crash when ostream output blocks before connection finishes
Timo Sirainen [Mon, 18 Jun 2018 10:15:55 +0000 (13:15 +0300)] 
lib-imap-client: Fix crash when ostream output blocks before connection finishes

It's possible that ostream tries to add IO_WRITE callback before
imapc_connection_connected() callback is called.

Fixes:
Panic: io_add(0x2) called twice fd=15, callback=0x... -> 0x...

7 years agoimapc: Move selected=TRUE to imap_mailbox_select_finish()
Timo Sirainen [Mon, 25 Jun 2018 09:16:25 +0000 (12:16 +0300)] 
imapc: Move selected=TRUE to imap_mailbox_select_finish()

Minor code deduplication cleanup.

7 years agoimapc: Fix potential assert-crash when selecting empty mailbox
Timo Sirainen [Mon, 25 Jun 2018 09:10:55 +0000 (12:10 +0300)] 
imapc: Fix potential assert-crash when selecting empty mailbox

imapc_mailbox_fetch_state_finish() should have been expunging all the mails,
but it didn't happen since UIDNEXT wasn't received yet at the time EXISTS
was sent, so sync_uid_next was always 0 when checking it. Fix this by
calling imapc_mailbox_fetch_state_finish() only after SELECT/EXAMINE tagged
reply is received.

This practically happened only when index files were used. It could also
happen without index files, if the session had received new mails after
opening the mailbox, then getting disconnected and before reconnect was
finished all the mails were externally expunged.

Fixes:
Panic: file imapc-sync.c: line 328 (imapc_initial_sync_check): assertion failed: (mail_index_is_expunged(view, lseq) || seq_range_exists(&ctx->mbox->delayed_expunged_uids, luid))

7 years agoauth: Move auth_policy_deinit later
Aki Tuomi [Fri, 22 Jun 2018 21:23:04 +0000 (00:23 +0300)] 
auth: Move auth_policy_deinit later

Fixes signal 11 crash, which happens when
auth_worker_destroy is called which finishes
up requests.

7 years agolib-smtp: server: Make sure conn->state.data_failed is only set when no previous...
Stephan Bosch [Wed, 20 Jun 2018 12:01:18 +0000 (14:01 +0200)] 
lib-smtp: server: Make sure conn->state.data_failed is only set when no previous BDAT/BURL is pending.

Otherwise, the server would sometimes send 503 error for the first BDAT/BURL
command, while a subsequent command was actually failing earlier than the
initial one completed. Additionally, this caused a panic crash.

Panic was:

submission(stephan)<8353><C+7QBfysKluhIAAAmoV78g>: Panic: Input stream /home/stephan/Maildir/cur/1517515808.M176007P2993.johanna,S=1903,W=1956:2,DFS unexpectedly has references

7 years agolib-storage: fail storage: Allocate event for mailbox.
Stephan Bosch [Wed, 20 Jun 2018 10:40:37 +0000 (12:40 +0200)] 
lib-storage: fail storage: Allocate event for mailbox.

Absence of event causes segfault when event logging is performed for the
mailbox.

7 years agom4/dovecot.m4: run-test.sh - disable valgrind for individual tests
Phil Carmody [Mon, 4 Jun 2018 16:58:23 +0000 (19:58 +0300)] 
m4/dovecot.m4: run-test.sh - disable valgrind for individual tests

OpenSSL doesn't like valgrind on my setup, so permit a local instalation
to have a list of excluded binaries that won't use valgrind in make check.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
7 years agolmtp, submission: Remove extra spaces from "state = X" in disconnect log line
Timo Sirainen [Wed, 20 Jun 2018 07:49:46 +0000 (10:49 +0300)] 
lmtp, submission: Remove extra spaces from "state = X" in disconnect log line

Other Dovecot log messages don't have spaces in key=value.

7 years agolib: Fix memory leak at deinit if log_core_filter is set
Timo Sirainen [Tue, 19 Jun 2018 14:42:55 +0000 (17:42 +0300)] 
lib: Fix memory leak at deinit if log_core_filter is set

7 years agolib-ssl-iostream: Enable partial writes and moving buffers
Aki Tuomi [Wed, 20 Jun 2018 05:52:52 +0000 (08:52 +0300)] 
lib-ssl-iostream: Enable partial writes and moving buffers

Dovecot is able to provide same content to SSL_write, and
can also take care of consuming written data from the buffer.

Fixes SSL_write failed:error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry

7 years agoimapc: Fix handling UIDVALIDITY changes
Timo Sirainen [Tue, 19 Jun 2018 09:33:49 +0000 (12:33 +0300)] 
imapc: Fix handling UIDVALIDITY changes

Index was being correctly reset, but the transaction was rolled back.

7 years agolib-index: Make sure error is set on sync & commit failures
Timo Sirainen [Tue, 19 Jun 2018 09:31:43 +0000 (12:31 +0300)] 
lib-index: Make sure error is set on sync & commit failures

This avoids "BUG: Unknown internal index error" after view is marked
inconsistent or after index is deleted.

7 years agoquota-clone: Send quota clone data to dict asynchronously
Timo Sirainen [Tue, 19 Jun 2018 12:46:41 +0000 (15:46 +0300)] 
quota-clone: Send quota clone data to dict asynchronously

Based on patch by Michael Slusarz

7 years agoquota-clone: Move state tracking to user context
Timo Sirainen [Tue, 19 Jun 2018 12:00:02 +0000 (15:00 +0300)] 
quota-clone: Move state tracking to user context

This way there's no need to do multiple flushes when e.g. multiple
mailboxes change.

The flush had to be removed from close(), because the code path recurses:

 * mailbox_transaction_commit() when mail is saved
 * quota_count() starts counting the quota, which opens and closes mailbox
 * quota_clone_mailbox_close() attempts to flush quota, which again recurses
into quota_count(), which returns 0 for the quota value.

Based on patch by Michael Slusarz

7 years agoquota: Add quota_root_iter_init_user()
Timo Sirainen [Tue, 19 Jun 2018 11:12:45 +0000 (14:12 +0300)] 
quota: Add quota_root_iter_init_user()

7 years agolib-dcrypt: istream-decrypt - Fix memory leak when stream is seeked backwards
Timo Sirainen [Tue, 12 Jun 2018 18:07:38 +0000 (21:07 +0300)] 
lib-dcrypt: istream-decrypt - Fix memory leak when stream is seeked backwards

The key already exists in memory at that time.

7 years agomaster: Don't recreate master UNIX listener socket on reload
Timo Sirainen [Mon, 18 Jun 2018 19:44:53 +0000 (22:44 +0300)] 
master: Don't recreate master UNIX listener socket on reload

This way it works similar to all other listeners and it's not even
temporarily unavailable.

7 years agomaster: Close all listener fds at deinit.
Timo Sirainen [Mon, 18 Jun 2018 19:38:48 +0000 (22:38 +0300)] 
master: Close all listener fds at deinit.

Just makes the deinit cleaner.

7 years agomaster: Set listener fd to -1 after closing it
Timo Sirainen [Mon, 18 Jun 2018 19:53:38 +0000 (22:53 +0300)] 
master: Set listener fd to -1 after closing it

The listener fds weren't used for anything afterwards, so it wasn't a
problem so far. The next commit requires it though.

7 years agolib-smtp: Allocate ORCPT addr_type from given memory pool, not data stack
Timo Sirainen [Tue, 12 Jun 2018 17:49:59 +0000 (20:49 +0300)] 
lib-smtp: Allocate ORCPT addr_type from given memory pool, not data stack

This could have caused crashes when parsing ORCPT.

7 years agoimapc: Fix assert-crash if syncing adds delayed expunges, but fails afterwards
Timo Sirainen [Sat, 16 Jun 2018 16:40:34 +0000 (19:40 +0300)] 
imapc: Fix assert-crash if syncing adds delayed expunges, but fails afterwards

Fixes:
Panic: file imapc-sync.c: line 328 (imapc_initial_sync_check): assertion failed: (mail_index_is_expunged(view, lseq) || seq_range_exists(&ctx->mbox->delayed_expunged_uids, luid))

7 years agoimapc: Fix potential assert-crash when reconnecting during syncing
Timo Sirainen [Sat, 16 Jun 2018 16:37:27 +0000 (19:37 +0300)] 
imapc: Fix potential assert-crash when reconnecting during syncing

Fixes:
Panic: file imapc-sync.c: line 328 (imapc_initial_sync_check): assertion failed: (mail_index_is_expunged(view, lseq) || seq_range_exists(&ctx->mbox->delayed_expunged_uids, luid))

7 years agoimapc: Fix assert-crash when reconnecting during initial FETCH finds expunges
Timo Sirainen [Sat, 16 Jun 2018 12:56:26 +0000 (15:56 +0300)] 
imapc: Fix assert-crash when reconnecting during initial FETCH finds expunges

The initial FETCH is automatically retried on failure, but the FETCH state
wasn't reset during the reconnection.

Fixes:
Panic: file imapc-sync.c: line 328 (imapc_initial_sync_check): assertion failed: (mail_index_is_expunged(view, lseq) || seq_range_exists(&ctx->mbox->delayed_expunged_uids, luid))

7 years agoimapc: Fix assert-crash when reconnecting expunges newly added messages
Timo Sirainen [Sat, 16 Jun 2018 12:09:53 +0000 (15:09 +0300)] 
imapc: Fix assert-crash when reconnecting expunges newly added messages

The initial FETCH 1:* during reconnection may notice some messages that are
missing and tries to expunge them. But those messages could still be in
delayed_sync_trans, and currently lib-index doesn't support expunging anything
but the latest mail from a transaction.

Fixes:
Panic: file mail-index-transaction-update.c: line 337 (mail_index_expunge_last_append): assertion failed: (seq == t->last_new_seq)

7 years agoimapc: Move expunging from index to imapc_mailbox_index_expunge()
Timo Sirainen [Sat, 16 Jun 2018 12:08:26 +0000 (15:08 +0300)] 
imapc: Move expunging from index to imapc_mailbox_index_expunge()

7 years agolib: When log writing keeps returning EAGAIN, change process title only once
Timo Sirainen [Mon, 18 Jun 2018 14:03:01 +0000 (17:03 +0300)] 
lib: When log writing keeps returning EAGAIN, change process title only once

Otherwise each call will use up data stack memory.

7 years agolib: If log write returns EAGAIN, use poll() instead of ioloop for waiting
Timo Sirainen [Mon, 18 Jun 2018 13:19:55 +0000 (16:19 +0300)] 
lib: If log write returns EAGAIN, use poll() instead of ioloop for waiting

As explained in 861d40b9aebabccae7d48e49a18cbc631ab1fefe commit message,
ioloop can call various callbacks and it can also recurse back to error
logging. Using poll() directly is safer.

7 years agolib: Revert earlier "log write is blocking" handling change
Timo Sirainen [Mon, 18 Jun 2018 13:07:30 +0000 (16:07 +0300)] 
lib: Revert earlier "log write is blocking" handling change

1) It was buggy, because it set O_NONBLOCK rather than removing it.

2) fd flags are shared across all the processes using the fd. We can't
reliably implement the process title update, because some processes are
blocking on the log write() before they change the process title.

Reverts 861d40b9aebabccae7d48e49a18cbc631ab1fefe

7 years agolib-imap-client: Remove assert from imapc_client_mailbox_reconnect
Timo Sirainen [Sat, 16 Jun 2018 16:58:57 +0000 (19:58 +0300)] 
lib-imap-client: Remove assert from imapc_client_mailbox_reconnect

It's possible for the assert to trigger if there are multiple reconnections.
imapc_connection_can_reconnect() checks a bit later whether the reconnection
can still be done.

7 years agoimapc: Don't trust mail stream to have correct CRLFs
Timo Sirainen [Mon, 18 Jun 2018 16:13:30 +0000 (19:13 +0300)] 
imapc: Don't trust mail stream to have correct CRLFs

It's not that expensive to just recalculate them. If they're not correct in
the stream, it can result in e.g. truncated emails due to wrong virtual_size
being used in body_size calculation. The wrong CRLFs can especially happen
if plugins modify the stream in istream_opened() hook.

7 years agodoveadm dump: Fix dumping "vsize" header in dovecot.index
Timo Sirainen [Wed, 13 Jun 2018 17:09:32 +0000 (20:09 +0300)] 
doveadm dump: Fix dumping "vsize" header in dovecot.index

It was trying to print it as the "vsize" header in dovecot.list.index.
This caused confusing output, as well as potentially accessing memory
out of bounds.

7 years agodoveadm log find: Fix memory leak
Timo Sirainen [Wed, 13 Jun 2018 17:08:08 +0000 (20:08 +0300)] 
doveadm log find: Fix memory leak

7 years agodoveadm user: Fix memory leak
Timo Sirainen [Wed, 13 Jun 2018 17:07:52 +0000 (20:07 +0300)] 
doveadm user: Fix memory leak

7 years agodsync: Fix memory leak - unreference iostreams at deinit
Timo Sirainen [Wed, 13 Jun 2018 17:07:28 +0000 (20:07 +0300)] 
dsync: Fix memory leak - unreference iostreams at deinit

Only some of the code paths need unreferencing, so also add a reference to
the other code paths.

7 years agodsync: ibc - reference iostreams internally
Timo Sirainen [Wed, 13 Jun 2018 17:06:11 +0000 (20:06 +0300)] 
dsync: ibc - reference iostreams internally

This makes it clearer who needs to reference and unreference the streams.

7 years agostr_data(): cast return to correct type to fix include in c++ code
Danny Al-Gaaf [Wed, 30 May 2018 09:16:04 +0000 (11:16 +0200)] 
str_data(): cast return to correct type to fix include in c++ code

/usr/include/dovecot/str.h: In function ‘const unsigned char* str_data(const string_t*)’:
/usr/include/dovecot/str.h:22:14: warning: invalid conversion from ‘const void*’ to ‘const unsigned char*’ [-fpermissive]
  return str->data;
         ~~~~~^~~~

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
7 years agolib: istream-try - Don't assert-crash with empty parent istream
Timo Sirainen [Fri, 8 Jun 2018 20:17:04 +0000 (23:17 +0300)] 
lib: istream-try - Don't assert-crash with empty parent istream

Fixes:
Panic: file istream.c: line 327 (i_stream_read_memarea): assertion failed: (stream->eof)

7 years agolib-master: Allow calling master_service_deinit() without _init_finish()
Timo Sirainen [Tue, 12 Jun 2018 21:58:55 +0000 (00:58 +0300)] 
lib-master: Allow calling master_service_deinit() without _init_finish()

7 years agolib: restrict-access: Free chroot_dir at deinit
Timo Sirainen [Tue, 12 Jun 2018 19:05:52 +0000 (22:05 +0300)] 
lib: restrict-access: Free chroot_dir at deinit

7 years agolib: Free global_event_stack array at deinit
Timo Sirainen [Tue, 12 Jun 2018 19:05:35 +0000 (22:05 +0300)] 
lib: Free global_event_stack array at deinit

7 years agovirtual: Fix memory leak when selecting mailboxes with '-' or /metadata
Timo Sirainen [Tue, 12 Jun 2018 15:01:21 +0000 (18:01 +0300)] 
virtual: Fix memory leak when selecting mailboxes with '-' or /metadata

7 years agomail-crypt-acl: Fix memory leak when updating ACLs
Timo Sirainen [Tue, 12 Jun 2018 14:23:35 +0000 (17:23 +0300)] 
mail-crypt-acl: Fix memory leak when updating ACLs

7 years agolib-dcrypt, mail-crypt: Fix leaking memory when using non-global keys
Timo Sirainen [Tue, 12 Jun 2018 14:08:04 +0000 (17:08 +0300)] 
lib-dcrypt, mail-crypt: Fix leaking memory when using non-global keys

The users' private keys had one reference too much. Because of key cache,
most likely the keys were leaked only once at deinit.

Changed the i_stream_create_decrypt_callback() API so that it allows the
callback to create the key itself without having to store it anywhere.

In this case the key was already added to cache, which increased its
refcount. So an alternative fix would have been to simply unreferenced the
key before returning it. It's a bit ugly though to rely on such caches,
since without the cache the code would be buggy.

7 years agomail-crypt: Fix memory leak in "doveadm mailbox cryptokey generate"
Timo Sirainen [Tue, 12 Jun 2018 13:56:51 +0000 (16:56 +0300)] 
mail-crypt: Fix memory leak in "doveadm mailbox cryptokey generate"

7 years agolib-smtp: server: Fix memory leak when handling BDAT command
Timo Sirainen [Tue, 12 Jun 2018 13:49:36 +0000 (16:49 +0300)] 
lib-smtp: server: Fix memory leak when handling BDAT command

7 years agoimapc: Fix leaking memory when sending imapc commands after authentication failure
Timo Sirainen [Tue, 12 Jun 2018 13:45:26 +0000 (16:45 +0300)] 
imapc: Fix leaking memory when sending imapc commands after authentication failure

7 years agolib-storage: Fix memory leak when mail_storage_service_next() is called multiple...
Timo Sirainen [Tue, 12 Jun 2018 13:07:25 +0000 (16:07 +0300)] 
lib-storage: Fix memory leak when mail_storage_service_next() is called multiple times

dsync uses it twice for the same mail_storage_service_user.

7 years agodoveadm-dict: Initialize set variable in cmd_dict_init
Aki Tuomi [Mon, 11 Jun 2018 11:22:38 +0000 (14:22 +0300)] 
doveadm-dict: Initialize set variable in cmd_dict_init

Makes valgrind happy with clang's optimizations

7 years agodoveadm-dict: Remove spurious `key =` debug logging
Aki Tuomi [Mon, 11 Jun 2018 11:06:20 +0000 (14:06 +0300)] 
doveadm-dict: Remove spurious `key =` debug logging

Was added in 42db3821

7 years agoimap: Finish client ostream at disconnect
Timo Sirainen [Thu, 7 Jun 2018 11:20:33 +0000 (14:20 +0300)] 
imap: Finish client ostream at disconnect

With IMAP COMPRESS this sends the EOF marker, indicating cleanly closed
connection.

7 years agodoveadm: Fix compiler warning
Timo Sirainen [Fri, 8 Jun 2018 16:56:01 +0000 (19:56 +0300)] 
doveadm: Fix compiler warning

7 years agodoveadm: Simplify destroying ioloop using o_stream_switch_ioloop_to()
Timo Sirainen [Tue, 5 Jun 2018 17:28:45 +0000 (20:28 +0300)] 
doveadm: Simplify destroying ioloop using o_stream_switch_ioloop_to()

7 years agodoveadm-server: Fix hang when sending a lot of output to clients
Timo Sirainen [Tue, 5 Jun 2018 17:23:52 +0000 (20:23 +0300)] 
doveadm-server: Fix hang when sending a lot of output to clients

Nowadays ostream adds its io to the stream's specified ioloop, not to
current ioloop.

7 years agolib-compression: Use i_stream_nonseekable_try_seek() instead of reimplementing it
Timo Sirainen [Tue, 5 Jun 2018 10:57:26 +0000 (13:57 +0300)] 
lib-compression: Use i_stream_nonseekable_try_seek() instead of reimplementing it

7 years agolib-compression: Use i_stream_default_stat() instead of reimplementing it
Timo Sirainen [Tue, 5 Jun 2018 10:53:51 +0000 (13:53 +0300)] 
lib-compression: Use i_stream_default_stat() instead of reimplementing it

7 years agolib-compression: deflate ostream - Use Z_FINISH on final flush
Timo Sirainen [Tue, 5 Jun 2018 11:22:08 +0000 (14:22 +0300)] 
lib-compression: deflate ostream - Use Z_FINISH on final flush

Nowadays we have o_stream_finish(), so we can differentiate between
intermediate flush and final flush. Using this allows istream-zlib to
cleanly see that the stream ends.

7 years agolib: i_stream_default_stat() - Get seekable streams' sizes by reading the stream
Timo Sirainen [Tue, 5 Jun 2018 10:34:47 +0000 (13:34 +0300)] 
lib: i_stream_default_stat() - Get seekable streams' sizes by reading the stream

After the stream size is found, seek back to original offset.

7 years agolib-dcrypt: istream-decrypt - Add support for seeking
Timo Sirainen [Tue, 5 Jun 2018 10:34:02 +0000 (13:34 +0300)] 
lib-dcrypt: istream-decrypt - Add support for seeking

7 years agolib: Add i_stream_nonseekable_try_seek()
Timo Sirainen [Tue, 5 Jun 2018 10:25:30 +0000 (13:25 +0300)] 
lib: Add i_stream_nonseekable_try_seek()

This can be used by istreams to more easily implement seeking backwards when
it has to be done by first seeking back to offset 0 and reading from there.

7 years agoquota-clone: Fix CONTEXT_REQUIRE use
Aki Tuomi [Mon, 28 May 2018 09:57:03 +0000 (12:57 +0300)] 
quota-clone: Fix CONTEXT_REQUIRE use

Fixes Panic: Module context quota_clone_user_module missing

Broken in 7f7e7c16d956de8e92376a0633ca6e4cb85e8d84

7 years agolib-storage: Set index_mail_data.body_size if it can be calculated easily
Timo Sirainen [Mon, 4 Jun 2018 16:16:04 +0000 (19:16 +0300)] 
lib-storage: Set index_mail_data.body_size if it can be calculated easily

Probably doesn't help with anything currently, but makes the code more
consistent in how it works.

7 years agoimapc: Don't use RFC822.SIZE values for message body size calculation
Timo Sirainen [Thu, 31 May 2018 13:52:54 +0000 (16:52 +0300)] 
imapc: Don't use RFC822.SIZE values for message body size calculation

If the RFC822.SIZE doesn't match the exact stream size, the body size
calculation will become wrong. The only downside to this patch is that
now the body size will need to be calculated by parsing the stream, but
there shouldn't be any need to do that unless the body was already
FETCHed, so it shouldn't cause any extra IMAP traffic.

7 years agolib-storage: Move code to index_mail_try_set_body_size()
Timo Sirainen [Mon, 4 Jun 2018 16:03:20 +0000 (19:03 +0300)] 
lib-storage: Move code to index_mail_try_set_body_size()

This also adds a check to make sure virtual_size is set. With the current
caller it was already guaranteed to be set.

7 years agolib-storage: Don't set virtual_size from index record if it's already set
Timo Sirainen [Thu, 31 May 2018 13:49:34 +0000 (16:49 +0300)] 
lib-storage: Don't set virtual_size from index record if it's already set

The existing virtual_size may be a correct one, while the one in the index
may be wrong. This will be an especially important fix with the next
commit, because it would make the existing inexact_total_sizes=FALSE wrong.

7 years agolib-storage: Don't enforce creation of vsize header.
Timo Sirainen [Mon, 4 Jun 2018 16:37:15 +0000 (19:37 +0300)] 
lib-storage: Don't enforce creation of vsize header.

It's useful for caching quota=count and for STATUS (X-SIZE). If neither is
used the header shouldn't be created and kept up-to-date. If the header is
enabled, it also triggers creation of per-email vsize records.

7 years agopush-notification: Add lua driver
Aki Tuomi [Wed, 14 Mar 2018 17:42:42 +0000 (19:42 +0200)] 
push-notification: Add lua driver

7 years agomail-lua: Add Lua support plugin for mail storage
Aki Tuomi [Wed, 14 Mar 2018 17:07:53 +0000 (19:07 +0200)] 
mail-lua: Add Lua support plugin for mail storage

7 years agolib-lua: Add lua_pushboolean helper to push real booleans
Aki Tuomi [Wed, 14 Mar 2018 16:49:50 +0000 (18:49 +0200)] 
lib-lua: Add lua_pushboolean helper to push real booleans

Makes boolean handling in dovecot code slightly easier

7 years agopush-notification: Fix mailbox unsubscribe event
Aki Tuomi [Wed, 14 Mar 2018 18:05:29 +0000 (20:05 +0200)] 
push-notification: Fix mailbox unsubscribe event

Subscribe should be FALSE here.

7 years agoimap: Fix assert-crash when client is disconnected during a long COPY/MOVE
Timo Sirainen [Mon, 28 May 2018 07:32:21 +0000 (10:32 +0300)] 
imap: Fix assert-crash when client is disconnected during a long COPY/MOVE

Similar fix than 481992bfe2740bdec70fcd7366dea50ed9128966

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

7 years agodovecot.service: Update LimitNOFILE=65535
Hannu Ylitalo [Tue, 29 May 2018 07:29:50 +0000 (10:29 +0300)] 
dovecot.service: Update LimitNOFILE=65535

Current value of 8192 is too low for most production setups and it needs
to be changed every time something is deployed. Setting the default to
65535 is enough for most production environments so this would be one
task less when deploying a production platform.

7 years agoauth: pass overriden auth_debug setting to auth process
Sergey Kitov [Wed, 23 May 2018 11:39:44 +0000 (14:39 +0300)] 
auth: pass overriden auth_debug setting to auth process

7 years agolib-storage: Replace "if(mail_debug)" with "if(event_want_debug_log)"
Sergey Kitov [Tue, 20 Mar 2018 09:22:43 +0000 (11:22 +0200)] 
lib-storage: Replace "if(mail_debug)" with "if(event_want_debug_log)"

7 years agoplugins: replace "if(mail_debug){i_debug}" with "e_debug"
Sergey Kitov [Tue, 20 Mar 2018 09:20:44 +0000 (11:20 +0200)] 
plugins: replace "if(mail_debug){i_debug}" with "e_debug"

7 years agolib-storage: Replace "if(mail_debug){i_debug}" "e_debug"
Sergey Kitov [Tue, 20 Mar 2018 09:05:13 +0000 (11:05 +0200)] 
lib-storage: Replace "if(mail_debug){i_debug}" "e_debug"

7 years agolib-storage: Force mail_storage_service_user event debug when mail_debug=yes
Sergey Kitov [Thu, 24 May 2018 12:18:30 +0000 (15:18 +0300)] 
lib-storage: Force mail_storage_service_user event debug when mail_debug=yes

7 years agolda & lib-lda: "if(mail_debug){i_debug}" with "e_debug"
Sergey Kitov [Tue, 20 Mar 2018 08:51:21 +0000 (10:51 +0200)] 
lda & lib-lda: "if(mail_debug){i_debug}" with "e_debug"

7 years agoindexer: Replace "if(mail_debug){i_debug}" with "e_debug"
Sergey Kitov [Tue, 20 Mar 2018 08:49:08 +0000 (10:49 +0200)] 
indexer: Replace "if(mail_debug){i_debug}" with "e_debug"

7 years agoimap: Replace "if(mail_debug){i_debug}" with "e_debug"
Sergey Kitov [Tue, 20 Mar 2018 08:46:19 +0000 (10:46 +0200)] 
imap: Replace "if(mail_debug){i_debug}" with "e_debug"

7 years agolib-imap-urlauth & imap-urlauth: replace "if(mail_debug){i_debug}" with "e_debug...
Sergey Kitov [Tue, 20 Mar 2018 08:17:27 +0000 (10:17 +0200)] 
lib-imap-urlauth & imap-urlauth: replace "if(mail_debug){i_debug}" with "e_debug(client->event)"

7 years agoimap-urlauth: Add event with "imap-urlauth" category to struct client of imap-urlauth
Sergey Kitov [Tue, 20 Mar 2018 07:52:38 +0000 (09:52 +0200)] 
imap-urlauth: Add event with "imap-urlauth" category to struct client of imap-urlauth

7 years agoglobal: Replace check for auth_debug with event_want_debug_log in doveadm-auth::auth_...
Sergey Kitov [Tue, 20 Mar 2018 07:05:26 +0000 (09:05 +0200)] 
global: Replace check for auth_debug with event_want_debug_log in doveadm-auth::auth_connected()

These functions will create event with "auth" category and unref it in
the end.

7 years agoglobal: Replace "if(auth_debug){i_debug(...)}" with e_debug(event, ...)
Sergey Kitov [Mon, 19 Mar 2018 14:10:49 +0000 (16:10 +0200)] 
global: Replace "if(auth_debug){i_debug(...)}" with e_debug(event, ...)

event is one of: global auth::auth_event,
auth_client_connection->event, auth_request->event,
login-common::event_auth. These event have category "auth".

7 years agoglobal: Remove unnecessary checks for mail_debug and auth_request->debug
Sergey Kitov [Mon, 19 Mar 2018 12:50:31 +0000 (14:50 +0200)] 
global: Remove unnecessary checks for mail_debug and auth_request->debug

These checks are performed before calling auth_request_log_debug() and
push_notification_driver_debug(), while the same checks are performed
inside of these functions, and they return without doing anything.

7 years agoauth: Add event with category "auth" to struct auth_request.
Sergey Kitov [Mon, 19 Mar 2018 11:53:33 +0000 (13:53 +0200)] 
auth: Add event with category "auth" to struct auth_request.

7 years agoauth: Add event with category "auth" to struct auth_client_connection.
Sergey Kitov [Mon, 19 Mar 2018 10:16:23 +0000 (12:16 +0200)] 
auth: Add event with category "auth" to struct auth_client_connection.

7 years agologin-common: Add global event_auth with "auth" category.
Sergey Kitov [Mon, 19 Mar 2018 09:44:59 +0000 (11:44 +0200)] 
login-common: Add global event_auth with "auth" category.

7 years agolib: Add event_want_debug and event_want_debug_log macros
Sergey Kitov [Mon, 19 Mar 2018 09:20:58 +0000 (11:20 +0200)] 
lib: Add event_want_debug and event_want_debug_log macros

7 years agoauth: Add global auth_event with category "auth".
Sergey Kitov [Mon, 19 Mar 2018 09:14:22 +0000 (11:14 +0200)] 
auth: Add global auth_event with category "auth".

7 years agopop3c: Ensure pop3c index directory is autocreated
Aki Tuomi [Tue, 29 May 2018 08:53:15 +0000 (11:53 +0300)] 
pop3c: Ensure pop3c index directory is autocreated

Otherwise we might think that the box has been unexpectedly
autodeleted and pop3_migration will fail.

Broken by 91ee70ed04d33fecd7fc94621f236013d520d7b3

7 years agolib-dict-backend: Fix building --with-cdb --without-shared-libs
Timo Sirainen [Fri, 25 May 2018 11:44:10 +0000 (14:44 +0300)] 
lib-dict-backend: Fix building --with-cdb --without-shared-libs

7 years agolib: Fix filtering by event name in log_core_filter
Timo Sirainen [Sun, 27 May 2018 12:42:26 +0000 (15:42 +0300)] 
lib: Fix filtering by event name in log_core_filter

event->sending_name was already cleared by the time it was checked, so any
event:* filters never matched.

7 years agopush-notification: Add SSL support for OX driver
Michael Slusarz [Fri, 25 May 2018 03:43:42 +0000 (21:43 -0600)] 
push-notification: Add SSL support for OX driver

7 years agoimap: Log unhibernation debug message only with mail_debug=yes
Timo Sirainen [Sun, 27 May 2018 12:48:42 +0000 (15:48 +0300)] 
imap: Log unhibernation debug message only with mail_debug=yes

7 years agolib-smtp: client: Avoid sending an XCLIENT command longer than 512 bytes.
Stephan Bosch [Sat, 26 May 2018 12:49:01 +0000 (14:49 +0200)] 
lib-smtp: client: Avoid sending an XCLIENT command longer than 512 bytes.

Send several separate XCLIENT commands instead. This way, it complies with the
base SMTP line length limit and with Postfix' original specification for the
XCLIENT command.

With the XCLIENT fields that Dovecot currently uses, this is very unlikely to
happen. Still, this needs to be fixed to make things reliable.

7 years agolib-smtp: client: Do not start authentication before initial XCLIENT gets reply.
Stephan Bosch [Sun, 27 May 2018 09:30:06 +0000 (11:30 +0200)] 
lib-smtp: client: Do not start authentication before initial XCLIENT gets reply.

7 years agolib-smtp: server: Provide full proxy data to the conn_proxy_data_updated() callback.
Stephan Bosch [Sat, 26 May 2018 13:44:43 +0000 (15:44 +0200)] 
lib-smtp: server: Provide full proxy data to the conn_proxy_data_updated() callback.

Before, it would only provide the fields that were updated, meaning that some
fields would remain unset, which caused problems for LMTP when more than one
XCLIENT command was sent or the ADDR field was not specified.

7 years agoglobal: start relying on http_client_request_abort(NULL) being a no-op
Josef 'Jeff' Sipek [Fri, 25 May 2018 23:13:30 +0000 (19:13 -0400)] 
global: start relying on http_client_request_abort(NULL) being a no-op

Cleanup performed with the following semantic patch:

@@
expression E;
@@

- if (E != NULL) {
-  http_client_request_abort(&E);
- }
+ http_client_request_abort(&E);

7 years agolib-http: http_client_request_abort(NULL) should be a no-op
Josef 'Jeff' Sipek [Fri, 25 May 2018 23:11:35 +0000 (19:11 -0400)] 
lib-http: http_client_request_abort(NULL) should be a no-op