]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Fri, 28 Sep 2018 10:30:51 +0000 (13:30 +0300)]
push-notification-driver-lua: Include date from MessageAppend
Aki Tuomi [Fri, 28 Sep 2018 10:30:01 +0000 (13:30 +0300)]
push-notification-event-messageappend: Include date information parsed from headers
Consistency with MessageNew
Aki Tuomi [Fri, 28 Sep 2018 10:01:58 +0000 (13:01 +0300)]
push-notification: Make sure txn messages are unique
save_count is not reliable as it's not incremented for events like
flag changes.
Aki Tuomi [Thu, 27 Sep 2018 06:54:10 +0000 (09:54 +0300)]
push-notification-driver-lua: Always use DLUA_LOG_LABEL
Aki Tuomi [Thu, 27 Sep 2018 06:52:59 +0000 (09:52 +0300)]
push-notification-driver-lua: Properly register all events
Aki Tuomi [Tue, 25 Sep 2018 12:49:21 +0000 (15:49 +0300)]
mail-lua: Fix gc code to push key first then value
Otherwise it uses nil as key, which makes no sense and leads to eventual crash.
Aki Tuomi [Tue, 25 Sep 2018 11:09:55 +0000 (14:09 +0300)]
push-notification-driver-lua: tx begin pushed mail user not username
Aki Tuomi [Tue, 25 Sep 2018 11:09:28 +0000 (14:09 +0300)]
push-notification-driver-lua: Do not push user again
User is already pushed in tx begin, and can be stored there into the context.
Aki Tuomi [Tue, 25 Sep 2018 11:08:59 +0000 (14:08 +0300)]
push-notification-driver-lua: Move event push earlier
Simplifies code
Aki Tuomi [Tue, 25 Sep 2018 09:24:02 +0000 (12:24 +0300)]
mail-lua: Add deinit_pre function
Aki Tuomi [Mon, 24 Sep 2018 12:29:12 +0000 (15:29 +0300)]
push-notification-driver-lua: Reference mail user only if initialization is successful
Will cause assert-crash otherwise if initialization fails
Aki Tuomi [Mon, 24 Sep 2018 12:24:19 +0000 (15:24 +0300)]
push-notification-driver-lua: Fix symbol names
Aki Tuomi [Mon, 24 Sep 2018 12:23:59 +0000 (15:23 +0300)]
mail-lua: Deinit script after others
Some other plugin might need Lua for deinit
Aki Tuomi [Mon, 24 Sep 2018 11:46:19 +0000 (14:46 +0300)]
push-notification-driver-lua: Use Lua references for context
Aki Tuomi [Mon, 24 Sep 2018 12:07:26 +0000 (15:07 +0300)]
mail-lua: Implement mail_lua_plugin_get_script
It was forgotten in
950c7e06dbf7f1cd696653af95b8c0053a9e86da
Sergey Kitov [Mon, 1 Oct 2018 08:02:58 +0000 (11:02 +0300)]
lib-master: Unit test for sending events to stats.
Timo Sirainen [Tue, 2 Oct 2018 07:22:11 +0000 (10:22 +0300)]
lib-master: ipc-client: Don't free command too early
When multiple replies were received by IPC only the final reply should free
the command. This may have caused e.g. "doveadm proxy list" to crash.
Broken by
435f0545b200767c25a5daee17cd6b4998d03710
Josef 'Jeff' Sipek [Wed, 19 Sep 2018 12:50:26 +0000 (15:50 +0300)]
dbox: cache pop3 order and uidl when saving mails
Josef 'Jeff' Sipek [Wed, 19 Sep 2018 12:49:56 +0000 (15:49 +0300)]
lib-storage/index: Add a helper to cache pop3 order and uidl
Josef 'Jeff' Sipek [Thu, 20 Sep 2018 10:32:46 +0000 (06:32 -0400)]
global: Use uint32_t for pop3 order
Aki Tuomi [Tue, 24 Jul 2018 06:51:39 +0000 (09:51 +0300)]
lib-ssl-iostream: If certificate check fails, suggest checking ssl ca settings
Aki Tuomi [Mon, 23 Jul 2018 09:40:15 +0000 (12:40 +0300)]
lib-ssl-iostream: Always fall back to default CAs for client contexts
When creating a client context, we always try to load the default
CA, if no CA settings have been provided. This makes it also possible
to allow invalid certs without specifying ssl_client_ca settings,
and also makes dovecot trust system store by default for outgoing
connections.
Stephan Bosch [Wed, 26 Sep 2018 10:25:59 +0000 (12:25 +0200)]
lib-smtp: client: Make the initialization of the connection after SSL handshake reliable.
Before, the connection was not guaranteed to be fully initialized after the SSL
handshake. The problem would occur when the handshake finished while writing the
SSL output stream. In a similar HTTP client issue, this caused a segfault.
Stephan Bosch [Tue, 25 Sep 2018 22:26:32 +0000 (00:26 +0200)]
lib-http: client: Fix segfault by making the initialization of the connection after SSL handshake reliable.
Before, the connection was not guaranteed to be fully initialized after the SSL
handshake. The problem would occur when the handshake finished while writing the
SSL output stream.
Aki Tuomi [Wed, 19 Sep 2018 09:34:57 +0000 (12:34 +0300)]
doveadm-auth-server: Fix cmd_list output to use JSON
Fixes output for HTTP client
Aki Tuomi [Wed, 19 Sep 2018 09:27:50 +0000 (12:27 +0300)]
doveadm-auth-server: Do not use i_fatal on user listing error
Breaks error reporting to HTTP client
Stephan Bosch [Wed, 19 Sep 2018 20:26:08 +0000 (22:26 +0200)]
lib-smtp: reply-parser: Fix closing the text_lines array with NULL sentinel.
For (EHLO) replies with more than 7 lines, the text_lines array of the reply did
not end in NULL, causing a segfault.
Stephan Bosch [Wed, 5 Sep 2018 19:56:42 +0000 (21:56 +0200)]
lib-storage: Change default postmaster_address setting to "postmaster@<user domain or server hostname>".
The former "postmaster@<user domain>" default would only yield a valid
postmaster address when there is a domain part in the username. The new default
uses a conditional variable expansion choose "%d" when it is not empty and the
new "%{hostname}" otherwise.
Stephan Bosch [Wed, 5 Sep 2018 19:24:15 +0000 (21:24 +0200)]
lib-storage: mail-user: Add "%{hostname}" variable expansion.
Stephan Bosch [Wed, 5 Sep 2018 19:23:05 +0000 (21:23 +0200)]
lib-storage: mail-user: Add convenience functions for obtaining postmaster address.
Stephan Bosch [Wed, 5 Sep 2018 19:11:15 +0000 (21:11 +0200)]
lib-storage: Move postmaster_address setting from mail_storage_settings to mail_user_settings.
Timo Sirainen [Tue, 18 Sep 2018 22:28:13 +0000 (01:28 +0300)]
imap-login: Remove extra '+' from state strings in log output
If multiple outgoing commands were in progress, the state should have
said e.g. "state=capability+login", not "state=capability+++login".
Timo Sirainen [Wed, 19 Sep 2018 08:32:08 +0000 (11:32 +0300)]
director: Add assert to make sure doveadm connection's IO isn't added multiple times
Timo Sirainen [Fri, 7 Sep 2018 17:04:48 +0000 (20:04 +0300)]
doveadm: Make sure to stop running commands requiring synced ring when ring is no longer synced
A command could desync the ring, and no more commands should be run
afterwards.
This also fixes a bug where a command that desyncs the ring is supposed to
wait for the ring being synced before returning OK, but returns it
immediately instead.
Timo Sirainen [Wed, 19 Sep 2018 09:41:39 +0000 (12:41 +0300)]
global: Don't try to send stats from unit tests
Timo Sirainen [Thu, 13 Sep 2018 12:30:22 +0000 (15:30 +0300)]
lib: i_zero*() - Give compiler error if it's wrongly used on an array
Timo Sirainen [Thu, 13 Sep 2018 12:29:45 +0000 (15:29 +0300)]
lib-master, auth: Fix clearing memory
It doesn't look like these being wrong were causing any bugs.
Timo Sirainen [Tue, 11 Sep 2018 12:54:39 +0000 (15:54 +0300)]
doveadm stats dump: Fix potentially not writing all stats output
It depended on whether uninitialized stack memory was 0 or not.
Timo Sirainen [Tue, 11 Sep 2018 07:10:13 +0000 (10:10 +0300)]
man, doveadm: Rename "mailbox cache compress" to "mailbox cache purge"
The "compress" word makes it sound like e.g. zlib compression. The "purge"
word is used for a similar behavior with mdbox purging.
Stephan Bosch [Thu, 13 Sep 2018 07:16:41 +0000 (09:16 +0200)]
lib-http: test-http-client-errors: Address another reliability issue in "peer reuse failure" test.
Stephan Bosch [Thu, 13 Sep 2018 18:44:22 +0000 (20:44 +0200)]
lib-http: response: Add convenience functions for status evaluation.
Martti Rannanjärvi [Thu, 13 Sep 2018 10:01:52 +0000 (13:01 +0300)]
lib-sql: Fix wrong sql_query_finished_event() success parameter use
Martti Rannanjärvi [Thu, 13 Sep 2018 09:36:20 +0000 (12:36 +0300)]
driver-sqlite: Don't give false out of memory errors
Only log error from sqlite3_errmsg() when connected to the db, since
otherwise dovecot logs false "out of memory" errors.
Martti Rannanjärvi [Tue, 11 Sep 2018 08:21:36 +0000 (11:21 +0300)]
driver-sqlite: Fix crash and event leak in driver_sqlite_query_s()
Aki Tuomi [Wed, 12 Sep 2018 07:19:16 +0000 (10:19 +0300)]
driver-sqlite: Add error to sql_query_finished event on error
Aki Tuomi [Wed, 12 Sep 2018 07:18:48 +0000 (10:18 +0300)]
driver-pgsql: Add error to sql_query_finished if it fails
Aki Tuomi [Wed, 12 Sep 2018 07:17:49 +0000 (10:17 +0300)]
driver-cassandra: Add error to sql_query_finished event on error
Martti Rannanjärvi [Tue, 11 Sep 2018 08:42:46 +0000 (11:42 +0300)]
util: Fix compile with tcpwrap
Stephan Bosch [Tue, 17 Jul 2018 22:51:56 +0000 (00:51 +0200)]
lib-smtp: server: Change command hooks API to allow many parallel hooks with individual context.
This e.g. allows many server plugins to hook into command execution without
interfering with eachother.
Michael M Slusarz [Mon, 27 Aug 2018 03:53:56 +0000 (21:53 -0600)]
push-notification: Fix initializing push notification mailbox triggers
None of the mailbox triggers were working, since the transaction was
not being correctly initialized.
Martti Rannanjärvi [Mon, 10 Sep 2018 09:19:29 +0000 (12:19 +0300)]
driver-sqlite: Assign db in driver_sqlite_exec()
This fixes a crash.
Timo Sirainen [Fri, 7 Sep 2018 08:19:43 +0000 (11:19 +0300)]
stats: Wait for clients to disconnect at shutdown
Timo Sirainen [Thu, 6 Sep 2018 14:04:00 +0000 (17:04 +0300)]
global: Replace MASTER_SERVICE_FLAG_SEND_STATS with _DONT_SEND_STATS
Most services want to send statistics, so it's better to reverse the flag
behavior. Mark the few services that don't want stats with
MASTER_SERVICE_FLAG_DONT_SEND_STATS.
Timo Sirainen [Thu, 6 Sep 2018 16:48:09 +0000 (19:48 +0300)]
master: Start service processes only after adding all service listeners
Otherwise the processes could try to connect to services that aren't being
listened on, causing errors. Especially stats-writer socket needs to be
available early on.
Josef 'Jeff' Sipek [Fri, 7 Sep 2018 14:43:43 +0000 (10:43 -0400)]
lib-storage: Don't try to deserialize bodystructure if we already have it
Fixes:
Panic: file message-part-data.c: line 37 (message_part_data_is_plain_7bit): assertion failed: (data != NULL)
Josef 'Jeff' Sipek [Thu, 6 Sep 2018 15:07:22 +0000 (11:07 -0400)]
lib-storage: Simplify an assertion condition
Since the i_assert() is guarded by a check for save_bodystructure_header
being true, the whole condition can be simplified.
Josef 'Jeff' Sipek [Thu, 6 Sep 2018 15:06:17 +0000 (11:06 -0400)]
lib-storage: Don't try to process header if we haven't parsed the body structure
Fixes:
Panic: file index-mail-headers.c: line 294 (index_mail_parse_header): assertion failed: (part != NULL)
Stephan Bosch [Thu, 6 Sep 2018 01:40:55 +0000 (03:40 +0200)]
lib-http: client: peer: Log the number of pending connections consistently in relevant debug messages.
Use the same style everywhere and log it where it makes sense.
Stephan Bosch [Thu, 6 Sep 2018 01:33:59 +0000 (03:33 +0200)]
lib-http: client: peer: Maintain a list of connections pending on behalf of a peer.
Before, pending connections were only listed in the peer pool.
Stephan Bosch [Thu, 6 Sep 2018 01:23:26 +0000 (03:23 +0200)]
lib-http: client: connection: Unlist the connection as pending immediately in http_client_connection_failure().
Stephan Bosch [Wed, 5 Sep 2018 23:57:43 +0000 (01:57 +0200)]
lib-http: client: connection: Remove the connection from the peer pool pending list in a separate function.
Stephan Bosch [Thu, 6 Sep 2018 13:22:30 +0000 (15:22 +0200)]
lib-http: client: peer: Notify all peers in a peer pool about a successful connection.
This allows peers for which the last connection attempt failed (which was not
the last pending attempt in the pool) to try again. This solves a problem that
could potentially cause a hang with multiple parallel clients creating serveral
new connections at once.
Stephan Bosch [Thu, 6 Sep 2018 14:03:58 +0000 (16:03 +0200)]
lib-http: client: peer: Add debug message for http_client_peer_connection_failure().
Stephan Bosch [Thu, 6 Sep 2018 13:56:44 +0000 (15:56 +0200)]
lib-http: client: peer: Clarify debug message in http_client_peer_connection_failed_pool().
Stephan Bosch [Thu, 6 Sep 2018 13:54:02 +0000 (15:54 +0200)]
lib-http: client: peer: Log debug message before calling peer pool in http_client_peer_connection_success().
Stephan Bosch [Thu, 6 Sep 2018 13:50:36 +0000 (15:50 +0200)]
lib-http: client: peer: Rename http_client_peer_connection_failed_any() to http_client_peer_connection_failed_pool().
Stephan Bosch [Thu, 6 Sep 2018 01:11:18 +0000 (03:11 +0200)]
lib-http: client: peer: Always run http_client_queue_connection_failure() upon definitive connection failure.
The recorded peer->connecting flag was highly unreliable in a scenario involving
starting parallel connections. This way, the linked queues can update their
state accordingly. Also, this will not cause empty queues to initiate new
connection, because empty queues will do nothing after updating the connection
state.
This problem caused a client ioloop hang in high-load conditions.
Stephan Bosch [Thu, 6 Sep 2018 12:57:28 +0000 (14:57 +0200)]
lib-http: client: peer: Move http_client_peer_connection_failure().
Stephan Bosch [Thu, 6 Sep 2018 01:02:16 +0000 (03:02 +0200)]
lib-http: client: queue: Do not fail claimed requests unless the queue is being destroyed.
Before, connection failure would also abort requests already being sent on
another connection, which is premature at best.
Stephan Bosch [Thu, 6 Sep 2018 00:57:24 +0000 (02:57 +0200)]
lib-http: client: queue: Fix the number of pending requests listed in http_client_queue_connection_failure() debug message.
Stephan Bosch [Thu, 6 Sep 2018 00:51:09 +0000 (02:51 +0200)]
lib-http: client: peer: Determine number of pending peers in http_client_peer_shared_connection_failure() itself.
Before, the number of pending peers was a parameter, but that was only for a
single peer pool. This is wrong, since the one peer can have many different
pools (depending on how many clients with incompatible configs share this
peer).
Stephan Bosch [Thu, 6 Sep 2018 12:49:59 +0000 (14:49 +0200)]
lib-http: client: peer: Notify definitive connection failure only within a peer pool.
Other peer pools have different configuration, which may actually succeed and
will arrive at this point when their own connections fail anyway.
Aki Tuomi [Thu, 6 Sep 2018 06:36:07 +0000 (09:36 +0300)]
driver-sqlite: Fix event usage in driver_sqlite_exec
Broken in
850f874971a7afa4f1f7b47df37fca082dc415a1
Aki Tuomi [Wed, 5 Sep 2018 16:34:20 +0000 (19:34 +0300)]
pop3: Do not expunge \Deleted mails without QUIT
Prevents loss of email if connection
is unexpectedly terminated.
Aki Tuomi [Wed, 5 Sep 2018 10:20:02 +0000 (13:20 +0300)]
lib-sql: Do not create event for old drivers
They can't use it anyways
Martti Rannanjärvi [Wed, 5 Sep 2018 09:25:56 +0000 (12:25 +0300)]
lib: Test event category parent matching
Aki Tuomi [Wed, 5 Sep 2018 05:34:28 +0000 (08:34 +0300)]
driver-sqlpool: Only strdup error on error
Satisfies static analyzers
Aki Tuomi [Tue, 4 Sep 2018 17:30:12 +0000 (20:30 +0300)]
driver-sqlite: Document why rollback is called when commit fails
Aki Tuomi [Sun, 2 Sep 2018 16:14:17 +0000 (19:14 +0300)]
driver-cassandra: Add events
Aki Tuomi [Sat, 1 Sep 2018 10:50:27 +0000 (13:50 +0300)]
driver-pgsql: Add events
Aki Tuomi [Fri, 31 Aug 2018 10:30:11 +0000 (13:30 +0300)]
driver-sqlite: Add events
Aki Tuomi [Fri, 31 Aug 2018 06:45:59 +0000 (09:45 +0300)]
driver-mysql: Add events
Aki Tuomi [Fri, 31 Aug 2018 06:31:48 +0000 (09:31 +0300)]
driver-sqlpool: Add events
Aki Tuomi [Thu, 30 Aug 2018 11:23:10 +0000 (14:23 +0300)]
lib-sql: Add events
Aki Tuomi [Mon, 3 Sep 2018 10:59:41 +0000 (13:59 +0300)]
auth: Use sql_init_full
Aki Tuomi [Tue, 4 Sep 2018 06:31:25 +0000 (09:31 +0300)]
global: Replace sql_db_cache_new with sql_db_cache_new2
Aki Tuomi [Mon, 3 Sep 2018 11:13:55 +0000 (14:13 +0300)]
dict-sql: Use sql_db_cache_new2
Aki Tuomi [Mon, 3 Sep 2018 11:12:05 +0000 (14:12 +0300)]
lib-sql: Add sql_db_cache_new2 that uses the new sql_init_full initializer
Aki Tuomi [Sun, 2 Sep 2018 15:45:14 +0000 (18:45 +0300)]
driver-cassandra: Add init_full
Aki Tuomi [Sun, 2 Sep 2018 15:39:47 +0000 (18:39 +0300)]
driver-cassandra: Return error from connection string parser
Aki Tuomi [Tue, 4 Sep 2018 06:43:32 +0000 (09:43 +0300)]
driver-cassandra: Add driver_cassandra_free
Aki Tuomi [Sat, 1 Sep 2018 10:43:19 +0000 (13:43 +0300)]
driver-pgsql: Add init_full
Aki Tuomi [Tue, 4 Sep 2018 06:39:06 +0000 (09:39 +0300)]
driver-pgsql: Add driver_pgsql_free
Aki Tuomi [Fri, 31 Aug 2018 10:29:56 +0000 (13:29 +0300)]
driver-sqlite: Add init_full
Aki Tuomi [Mon, 3 Sep 2018 09:17:40 +0000 (12:17 +0300)]
driver-mysql: Add init_full
Aki Tuomi [Fri, 31 Aug 2018 11:07:44 +0000 (14:07 +0300)]
driver-mysql: Allocate mysql connection ourselves
This allows reusing the same mysql object on reconnect,
and simplifies cleanup in case initialization fails.
Aki Tuomi [Mon, 3 Sep 2018 09:15:55 +0000 (12:15 +0300)]
driver-mysql: Return error in connection string parser
Aki Tuomi [Thu, 30 Aug 2018 11:17:13 +0000 (14:17 +0300)]
driver-sqlpool: Add driver_sqlpool_init_full
Needed by SQL API change
Aki Tuomi [Fri, 31 Aug 2018 09:43:11 +0000 (12:43 +0300)]
driver-sqlpool: Use init_full when available
Aki Tuomi [Thu, 30 Aug 2018 11:18:41 +0000 (14:18 +0300)]
lib-sql: Add init_full vfunction