Timo Sirainen [Thu, 14 Dec 2017 21:10:22 +0000 (23:10 +0200)]
*-login: Avoid unnecessary "OK Waiting for authentication process to respond"
These happened with SSL connections when the process was starting up.
The ssl-istream was triggering the IO callback, which was thinking that the
client was sending a command. If this happened early on before auth process
connection was finished, this caused several unnecessary notifications to
the client.
Stephan Bosch [Thu, 14 Dec 2017 20:50:58 +0000 (21:50 +0100)]
lib-http: client: Check whether client is running in a wait loop with the correct condition.
This used to check client->ioloop != NULL, but now it should check client->waiting.
Previous commit (e8a1b62fe4a81b211dcccd1a58b44f254074eab6) omitted a few instances where this should have been changed.
Stephan Bosch [Thu, 14 Dec 2017 09:46:39 +0000 (10:46 +0100)]
lda: Do not replace the NULL sender with a default <MAILER-DAEMON> address.
Only do this substitution locally where a NULL sender would cause problems, not everywhere else.
This e.g. causes problems when determining whether to send a rejection somewhere; attempts would be made to mail <MAILER-DAEMON>.
Also other envelope-based (Sieve) tests would get confused.
Timo Sirainen [Wed, 13 Dec 2017 23:36:50 +0000 (01:36 +0200)]
LAYOUT=fs: Fix listing prefix/INBOX
Removed some confusing special case code that didn't seem to work very well.
Implemented this now properly so that prefix/INBOX is listed as \NoSelect
mailbox whenever it has children.
It's not actually possible to differentiate between INBOX and prefix/INBOX
in the storage for a inbox=yes namespace, because they both are converted
into the same storage_name=INBOX.
Stephan Bosch [Wed, 13 Dec 2017 20:52:41 +0000 (21:52 +0100)]
lib-http: client: peer: Properly handle claiming an existing connection.
If no other connections were being created, request handling was not restarted.
This problem sometimes caused the client to hang.
Fixed by calling http_client_peer_connection_success() upon claiming an existing connection.
Timo Sirainen [Wed, 13 Dec 2017 12:19:41 +0000 (14:19 +0200)]
imap: Fix o_stream_is_corked() assert check
All the callers cork the stream, so this can only mean that the corking
failed because the connection was already closed. Continue handling the
input anyway.
Fixes:
Panic: file imap-client.c: line 1236 (client_handle_input): assertion failed: (o_stream_is_corked(client->output))
Timo Sirainen [Tue, 12 Dec 2017 16:10:40 +0000 (18:10 +0200)]
LAYOUT=index: Fix updating STATUS changes in mailbox list index
Mailbox list index backend code was overriding sync_init and sync_deinit
methods, which STATUS handling had already already overridden. They both
used the same super struct, so STATUS's sync_* were never called.
Timo Sirainen [Mon, 4 Dec 2017 18:33:58 +0000 (20:33 +0200)]
log: Fix restoring global log prefix
It was allocated from data stack, which was freed by
master_service_init_finish(). This may have caused wrong prefix to be
used for log's internal error messages, or restoring the global log
prefix could have crashed:
Timo Sirainen [Wed, 22 Nov 2017 14:41:51 +0000 (15:41 +0100)]
lib-master: Add log_debug setting
lib-master understands only the global log_debug setting, which is passed
to it via environment from master process, or alternatively via doveconf
when executing standalone programs. Any per-user log_debug settings need
to be handled explicitly elsewhere.
Timo Sirainen [Mon, 23 Oct 2017 08:18:59 +0000 (11:18 +0300)]
lib: Add event API
The events are hierarchical and the child events inherit the parents'
fields. The events will be attached to "objects", which gives them some
context. For example each mail user, mailbox and mail will have its own
event. The events can also have a log prefix, so logging events to e.g.
mail will always log a consistent prefix that identifies which mail is
being logged about.
The events will also be used for statistics. Typically this is done by
logging a debug event, which contains fields that are interesting for
statistics. The interesting events will have a name, which can be used
to identify them when configuring which statistics are wanted to be
tracked. It's possible to also track events that have no name, but that
requires using the source code's filename:line as the event name. That
of course may change between releases, so it's not very reliable.