]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Sun, 17 Dec 2017 18:41:52 +0000 (20:41 +0200)]
lib: Fix using appended log prefixes for events when full prefix isn't replaced
Timo Sirainen [Sun, 17 Dec 2017 18:39:39 +0000 (20:39 +0200)]
lib: Fix using failure_context.log_prefix with internal log process communication
Timo Sirainen [Sun, 17 Dec 2017 18:38:38 +0000 (20:38 +0200)]
log: Add "disable log prefix" flag to log lines
Timo Sirainen [Sun, 17 Dec 2017 18:35:58 +0000 (20:35 +0200)]
lib: Add event_send()
Timo Sirainen [Sun, 17 Dec 2017 18:35:42 +0000 (20:35 +0200)]
lib: Rename event_send() to event_vsend()
Stephan Bosch [Fri, 15 Dec 2017 22:28:58 +0000 (23:28 +0100)]
lmtp: local: Properly handle a user being over quota.
Recent changes caused quota enforcement to be ineffective.
Stephan Bosch [Fri, 15 Dec 2017 20:31:44 +0000 (21:31 +0100)]
lmtp: local: Make sure pending recipient is always destroyed.
Before, the recipient was not freed when the server/connection ended prematurely.
Timo Sirainen [Thu, 14 Dec 2017 21:00:00 +0000 (23:00 +0200)]
login-proxy: Add back support for ssl_client_cert/key
Forgot to add these while rewriting login-proxy to use lib-ssl-iostream.
Timo Sirainen [Thu, 14 Dec 2017 20:59:30 +0000 (22:59 +0200)]
lib-ssl-iostream: If allow_invalid_cert=TRUE, skip verifying hostname
Timo Sirainen [Fri, 15 Dec 2017 12:42:54 +0000 (14:42 +0200)]
lib-master: Fix master_service_ssl_settings_to_iostream_set() for client settings
ssl_verify_client_cert setting applies only to server side. For client side
we always verify the SSL certificate validity.
Timo Sirainen [Fri, 15 Dec 2017 12:11:37 +0000 (14:11 +0200)]
lib-http: Add http_client_init_private()
This allows creating a HTTP client without a shared context, in case it's
needed for some reason.
Timo Sirainen [Fri, 15 Dec 2017 12:10:43 +0000 (14:10 +0200)]
lib-http: Change http_client_init() to use the global shared client context
This is most likely what is usually wanted.
Timo Sirainen [Fri, 15 Dec 2017 12:08:20 +0000 (14:08 +0200)]
lib-http: Add http_client_get_global_context()
Timo Sirainen [Thu, 14 Dec 2017 19:49:08 +0000 (21:49 +0200)]
fts: Code cleanup
Timo Sirainen [Thu, 14 Dec 2017 19:42:45 +0000 (21:42 +0200)]
fts: Don't try to retry parsing if indexing already fails
Timo Sirainen [Thu, 14 Dec 2017 19:39:08 +0000 (21:39 +0200)]
fts: Use consistent naming for retriable_err_msg
It's only for retriable errors, not errors in general
Timo Sirainen [Thu, 14 Dec 2017 19:34:31 +0000 (21:34 +0200)]
fts: Make sure may_need_retry is reset between attempts.
It wasn't if the second attempt failed early.
Timo Sirainen [Thu, 14 Dec 2017 19:26:28 +0000 (21:26 +0200)]
fts: Add assert to make sure fts_parser.deinit() returns retriable_error_msg when needed
Timo Sirainen [Thu, 14 Dec 2017 19:25:54 +0000 (21:25 +0200)]
fts: fts-parser-tika - Add assert to make sure retriable_error_msg is set
Timo Sirainen [Thu, 14 Dec 2017 19:25:14 +0000 (21:25 +0200)]
fts: fts-parser-script - Fix deinit return value
Timo Sirainen [Thu, 14 Dec 2017 19:23:30 +0000 (21:23 +0200)]
fts: fts-parser-html - Fix deinit return value
Timo Sirainen [Thu, 14 Dec 2017 19:53:14 +0000 (21:53 +0200)]
fts: fts_parser_deinit() - Fix default return value
Timo Sirainen [Thu, 14 Dec 2017 19:24:10 +0000 (21:24 +0200)]
fts: Add comment to fts_parser_deinit() describing its API
Timo Sirainen [Thu, 14 Dec 2017 08:31:26 +0000 (10:31 +0200)]
lib: Fix static analyzer warning about uninitialized va_list
Timo Sirainen [Thu, 14 Dec 2017 10:01:33 +0000 (12:01 +0200)]
lib-storage: Delay error handing for invalid postmaster_address setting
Timo Sirainen [Thu, 14 Dec 2017 18:56:36 +0000 (20:56 +0200)]
cassandra: Fix crash when using prepared statements
Broken by
cae3c6903c10682429f9849ab1a25093e3f538e4
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.
Timo Sirainen [Thu, 14 Dec 2017 21:23:13 +0000 (23:23 +0200)]
global: Finish fixing oldstats plugin/service rename
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.
Stephan Bosch [Thu, 14 Dec 2017 09:42:07 +0000 (10:42 +0100)]
lib-lda: Properly check whether MAIL FROM is the NULL sender <>.
There's a function for that, since comparison with NULL pointer is not sufficient.
Timo Sirainen [Wed, 13 Dec 2017 18:53:09 +0000 (20:53 +0200)]
lib-master: stats-client - Fix reconnection if handshake wait fails
Fixes:
Warning: Timeout leak: 0x5555556ac8d0 (stats-client.c:132)
Stephan Bosch [Thu, 14 Dec 2017 12:02:10 +0000 (13:02 +0100)]
submission-login: Fix another NULL dereference occurring at an invalid reply from the backend server.
The text variable was still being used when it could be NULL. Made the offending code dependent on the reply validity check.
Problem found by Coverity.
Timo Sirainen [Thu, 14 Dec 2017 12:13:11 +0000 (14:13 +0200)]
oldstats plugin: Fix init/deinit function names
Timo Sirainen [Thu, 14 Dec 2017 00:11:28 +0000 (02:11 +0200)]
lib-storage: mailbox_list_index - Don't overwrite INBOX's flags with prefix/INBOX's
This made the real INBOX appear as if it was \NoSelect
Timo Sirainen [Thu, 14 Dec 2017 00:10:27 +0000 (02:10 +0200)]
lib-storage: mailbox_list_index - indentation cleanup
Timo Sirainen [Wed, 13 Dec 2017 23:39:32 +0000 (01:39 +0200)]
lib-storage: mailbox_list_index - List prefix/INBOX if it necessary
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.
Timo Sirainen [Wed, 13 Dec 2017 23:34:25 +0000 (01:34 +0200)]
LAYOUT=fs: List INBOX as \NoInferiors when necessary
Timo Sirainen [Wed, 13 Dec 2017 23:31:10 +0000 (01:31 +0200)]
LAYOUT=index: List INBOX as \NoInferiors when necessary
Timo Sirainen [Wed, 13 Dec 2017 23:23:45 +0000 (01:23 +0200)]
LAYOUT=Maildir++: List INBOX as \NoInferiors when necessary
Timo Sirainen [Wed, 13 Dec 2017 23:23:01 +0000 (01:23 +0200)]
lib-storage: Add mail_namespace_is_inbox_noinferiors()
Timo Sirainen [Fri, 8 Dec 2017 14:14:11 +0000 (16:14 +0200)]
imapc: Don't skip listing "INBOX" when INBOX/ namespace prefix is used.
The INBOX was still listed as part of the autocreated mailboxes, unless
MAILBOX_LIST_ITER_NO_AUTO_BOXES was used.
Timo Sirainen [Wed, 13 Dec 2017 17:11:02 +0000 (19:11 +0200)]
lib: mempool-allocfree - make static analyzer happier with pool clearing
It was thinking that already freed memory was being accessed.
Timo Sirainen [Wed, 13 Dec 2017 18:55:59 +0000 (20:55 +0200)]
dbox: Fix creating dbox-alt-root symlink when mail root directory doesn't exist
Broken by
74664ac6dcf88cfc2ae6378c87c20ba694385a23
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.
Stephan Bosch [Wed, 13 Dec 2017 17:16:07 +0000 (18:16 +0100)]
lib-http: test-http-payload: Terminate the test if it is hanging for some reason.
Stephan Bosch [Wed, 13 Dec 2017 16:27:10 +0000 (17:27 +0100)]
lib-http: test-http-payload: Amend shared client tests to do both download and echo tests.
Also, the original download tests were named wrong.
Stephan Bosch [Wed, 13 Dec 2017 16:29:09 +0000 (17:29 +0100)]
lib-http: test-http-payload: Fixed indent problems.
Timo Sirainen [Wed, 13 Dec 2017 12:44:01 +0000 (14:44 +0200)]
doveadm stats dump: Add -r parameter to reset stats after dumping
Timo Sirainen [Wed, 13 Dec 2017 12:43:43 +0000 (14:43 +0200)]
stats: Add DUMP-RESET command to reset stats after dumping them
Timo Sirainen [Tue, 12 Dec 2017 19:38:46 +0000 (21:38 +0200)]
lib-storage: Delay creating mail root directory until it's necessary
Timo Sirainen [Tue, 12 Dec 2017 19:36:07 +0000 (21:36 +0200)]
lib-storage: Make sure index root is created when it's the same as root directory
This is required by the following commit.
Stephan Bosch [Wed, 9 Aug 2017 18:06:00 +0000 (20:06 +0200)]
lib-http: client: Made http_client record the current ioloop it is switched to.
This prevents http_client_wait() from switching the client to an ioloop it was never explicitly switched to.
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 [Wed, 13 Dec 2017 13:48:17 +0000 (15:48 +0200)]
LAYOUT=index: Fix crash in doveadm force-resync if storage doesn't implement list_index_rebuild()
Broken by recent changes.
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 [Wed, 13 Dec 2017 13:54:40 +0000 (15:54 +0200)]
lib-master: Fix logging "Expected FILTER" error
Timo Sirainen [Wed, 13 Dec 2017 13:54:11 +0000 (15:54 +0200)]
stats: Fix logging unknown client command error
Martti Rannanjärvi [Wed, 13 Dec 2017 12:37:59 +0000 (14:37 +0200)]
.gitignore: Ignore src/old-stats/old-stats
Timo Sirainen [Mon, 4 Dec 2017 21:39:41 +0000 (23:39 +0200)]
lib-http: Add named event: http_request_finished
Timo Sirainen [Mon, 4 Dec 2017 19:56:29 +0000 (21:56 +0200)]
doveadm: Add new "stats dump" command
Timo Sirainen [Mon, 4 Dec 2017 19:23:44 +0000 (21:23 +0200)]
global: Enable MASTER_SERVICE_FLAG_SEND_STATS for mail processes
Timo Sirainen [Mon, 4 Dec 2017 18:39:05 +0000 (20:39 +0200)]
lib: connection - When receiving invalid VERSION line, log the line contents
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:
Panic: file strfuncs.c: line 147 (t_noalloc_strdup_vprintf): assertion failed: ((unsigned int)ret == *size_r-1)
Timo Sirainen [Thu, 7 Dec 2017 22:15:40 +0000 (00:15 +0200)]
lib-http: client: Replace http_*_debug() with e_debug()
Timo Sirainen [Mon, 4 Dec 2017 10:58:47 +0000 (12:58 +0200)]
lib-http: client: Remove redundant debug logging checks
Timo Sirainen [Mon, 4 Dec 2017 10:35:46 +0000 (12:35 +0200)]
lib-http: client: Add support for event API
Timo Sirainen [Mon, 4 Dec 2017 10:27:00 +0000 (12:27 +0200)]
lib-http: Cleanup - Add name parameter to http_client_host_create()
Timo Sirainen [Sun, 3 Dec 2017 17:31:20 +0000 (19:31 +0200)]
lib-fs: Replace i_error() calls with e_error()
Timo Sirainen [Sun, 3 Dec 2017 17:26:11 +0000 (19:26 +0200)]
lib-fs: Add fs_file/iter_init_with_event()
Use the event for logging critical errors
Timo Sirainen [Mon, 4 Dec 2017 13:06:36 +0000 (15:06 +0200)]
lib-fs: Add fs_file/iter_init_parent()
Timo Sirainen [Mon, 4 Dec 2017 12:55:01 +0000 (14:55 +0200)]
lib-fs: Set fs_iter.flags immediately in fs_iter_init()
This way backends don't need to set it.
Timo Sirainen [Mon, 4 Dec 2017 12:53:37 +0000 (14:53 +0200)]
lib-fs: Split allocation from fs.iter_init() to a separate fs.iter_alloc()
Timo Sirainen [Mon, 4 Dec 2017 12:43:53 +0000 (14:43 +0200)]
lib-fs: Split allocation from fs.file_init() to a separate fs.file_alloc()
Timo Sirainen [Thu, 23 Nov 2017 16:46:23 +0000 (17:46 +0100)]
lib-master: Add stats-client
Enable it if MASTER_SERVICE_FLAG_SEND_STATS is set
Timo Sirainen [Wed, 22 Nov 2017 16:36:09 +0000 (17:36 +0100)]
stats: Add new stats service
Timo Sirainen [Tue, 21 Nov 2017 17:22:38 +0000 (18:22 +0100)]
imap: Add imap_command_finished event.
This can be used to get per-command statistics.
Timo Sirainen [Tue, 21 Nov 2017 15:05:30 +0000 (16:05 +0100)]
imap: Add client_command_context.event and use it as global event while running
Timo Sirainen [Tue, 21 Nov 2017 14:33:59 +0000 (15:33 +0100)]
imap: Add client.event and use it as mail_*user's parent event
Timo Sirainen [Tue, 21 Nov 2017 12:13:49 +0000 (13:13 +0100)]
lib-index: mail_index_set_error() - log error using index's event
Timo Sirainen [Tue, 21 Nov 2017 12:13:40 +0000 (13:13 +0100)]
lib-index: Add mail_index.event
Timo Sirainen [Tue, 21 Nov 2017 12:03:03 +0000 (13:03 +0100)]
lib-storage: mail_storage_set_critical() - log error using user's event
Fix test-storage unit test to also initialize mail_user.event so it won't
crash.
Timo Sirainen [Tue, 21 Nov 2017 11:59:40 +0000 (12:59 +0100)]
lib-storage: Add mail.event
Timo Sirainen [Tue, 21 Nov 2017 11:51:10 +0000 (12:51 +0100)]
lib-storage: Add mailbox.event
Timo Sirainen [Mon, 20 Nov 2017 18:33:40 +0000 (19:33 +0100)]
lib-storage: Add mail_user.event and give parent event in mail_user_alloc*()
Timo Sirainen [Mon, 20 Nov 2017 16:26:42 +0000 (17:26 +0100)]
lib-storage: Add mail_storage_service_user.event and use it as the global event
The event is set in the same place as where the user's default logging
prefix is changed.
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 [Wed, 22 Nov 2017 13:51:47 +0000 (14:51 +0100)]
lib: Add event filtering to debug logging
Timo Sirainen [Wed, 22 Nov 2017 12:55:51 +0000 (13:55 +0100)]
lib: Add event filter
This currently supports matching events by:
* name
* source file:line
* categories
* key=value fields
Timo Sirainen [Mon, 4 Dec 2017 19:20:49 +0000 (21:20 +0200)]
lib: Add event_import() and event_export()
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.
Timo Sirainen [Fri, 17 Nov 2017 10:37:15 +0000 (12:37 +0200)]
lib: Add failure_context.log_prefix to override the default
Timo Sirainen [Mon, 13 Nov 2017 14:08:15 +0000 (16:08 +0200)]
lib: Add i_log_typev()
Timo Sirainen [Mon, 11 Dec 2017 23:04:29 +0000 (01:04 +0200)]
lib: ioloop.h - improve ioloop context comments
Timo Sirainen [Mon, 11 Dec 2017 23:20:52 +0000 (01:20 +0200)]
lib-storage: Remove mail_storage_service_io_deactivate()
We now require that ioloop context is always properly deactivated, so
there's no need for the function.
Timo Sirainen [Mon, 11 Dec 2017 23:19:04 +0000 (01:19 +0200)]
imap, pop3: Remove unnecessary call to mail_storage_service_io_deactivate()
The context is automatically deactivated when service user is freed.
Timo Sirainen [Mon, 11 Dec 2017 23:17:22 +0000 (01:17 +0200)]
lib-storage: mail_storage_service_io_[de]activate_user() - [de]activate the whole ioloop context
Timo Sirainen [Mon, 11 Dec 2017 23:33:08 +0000 (01:33 +0200)]
lib-storage: mail_storage_service_user_unref() - deactivate user before removing callbacks
Otherwise the next commit won't work correctly.
Timo Sirainen [Mon, 11 Dec 2017 23:12:43 +0000 (01:12 +0200)]
lib-storage: Create ioloop context regardless of logging settings
This will be needed by the following commits.