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.
This makes the code more consistent since most of the repo uses the
no-parens style. These inconsistencies were found using
`git grep '(&([^*]'` and any use of the parens in macros was ignored for
safety reasons.
Stephan Bosch [Tue, 12 Dec 2017 20:53:42 +0000 (21:53 +0100)]
submission-login: Added default listener for secure submission on port 465 (submissions).
This is analogous to pop3s and imaps.
Efforts to standardize the use of this port are almost finished: https://datatracker.ietf.org/doc/draft-ietf-uta-email-deep/
Stephan Bosch [Mon, 11 Dec 2017 14:55:32 +0000 (15:55 +0100)]
lmtp: Fix segfault occurring in client_read_settings().
This problem is caused by recent changes.
The code attempts to access client->conn to obtain connection security info, which is not yet assigned at that point.
It is doubtful whether assigning those security flags is useful at that stage, but it now uses the ssl flag from the master_service_connection instead.
Stephan Bosch [Sat, 9 Dec 2017 01:34:52 +0000 (02:34 +0100)]
lib-master: master-auth: Pass more information about the user connection to the backend in struct master_auth_request.
Adds remote and local ports and security information about the connection.
This changes the master-auth protocol incompatibly, so the major version is updated.
Stephan Bosch [Mon, 26 Sep 2016 07:25:32 +0000 (09:25 +0200)]
imap-urlauth: Allow connections from services other than IMAP.
The imap-urlauth service detects the new submission service and assigns the appropriate privileges.
The dovecot-token authentication mechanism provides information on which service connected to it.