]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Wed, 28 Feb 2018 14:23:07 +0000 (16:23 +0200)]
Released v2.3.0.1.
Aki Tuomi [Mon, 26 Feb 2018 10:53:19 +0000 (12:53 +0200)]
lib-master: Fix dns_match_wildcard result value check
It returns 0, not TRUE.
Aki Tuomi [Fri, 23 Feb 2018 13:31:11 +0000 (15:31 +0200)]
lib-master: Check local_name only if both filter and input have it
Broken in
cedc777a1acf830af4cf0b6e9b0f343c81e20adc
Aki Tuomi [Mon, 19 Feb 2018 12:19:08 +0000 (14:19 +0200)]
lib-dns: Move before lib-master
Aki Tuomi [Thu, 30 Nov 2017 18:52:11 +0000 (20:52 +0200)]
login-common: Enable config filtering by local name
Prevents servername misuse.
Aki Tuomi [Thu, 30 Nov 2017 13:47:25 +0000 (15:47 +0200)]
lib-master: Support validating config filters against requests
Validation will sanitize the input request and drop any fields
that have no filter in config. E.g. if you have a local block
with name, and nothing else, then lip/rip will be dropped
from the request.
Aki Tuomi [Thu, 30 Nov 2017 13:46:52 +0000 (15:46 +0200)]
config: Add command to request all filters
Aki Tuomi [Thu, 30 Nov 2017 13:46:40 +0000 (15:46 +0200)]
config: Add config_filter_get_all
Returns all filters
Timo Sirainen [Thu, 11 Jan 2018 18:38:14 +0000 (13:38 -0500)]
*-login: Fix clients linked list corruption with SSL connections
This could have resulted in infinite loops or some of the clients being
skipped for some operations.
Timo Sirainen [Fri, 22 Dec 2017 16:58:11 +0000 (18:58 +0200)]
global: Call rfc822_parser_deinit() wherever possible
Timo Sirainen [Tue, 9 Jan 2018 16:33:59 +0000 (11:33 -0500)]
lib-mail: Refactor code to make the next commit smaller
Timo Sirainen [Fri, 22 Dec 2017 16:56:53 +0000 (18:56 +0200)]
lib-mail: Add rfc822_parser_deinit()
It's not a strict requirement to call this, but it assert-crashes if the
state isn't valid.
Timo Sirainen [Fri, 22 Dec 2017 16:42:53 +0000 (18:42 +0200)]
lib-mail: Make sure parsers don't accidentally go much beyond end pointer
Timo Sirainen [Fri, 22 Dec 2017 16:36:55 +0000 (18:36 +0200)]
lib-mail: Fix out-of-bounds read when parsing an invalid email address
The included unit test doesn't fail, but running it with valgrind shows
"Invalid read of size 1" error.
Broken in
d6737a17a27402e7a262f7ba8a2ed588d576f23c
Discovered by Aleksandar Nikolic of Cisco Talos
Timo Sirainen [Fri, 22 Dec 2017 16:36:09 +0000 (18:36 +0200)]
lib-mail: test-message-address - Add TEST_MESSAGE_ADDRESS_FLAG_SKIP_LIST flag
This commit just adds the flag and sets it to 0 for all existing tests.
Timo Sirainen [Fri, 22 Dec 2017 16:31:52 +0000 (18:31 +0200)]
lib-mail: rfc822-parser - Add asserts to make sure parser state is correct
Aki Tuomi [Fri, 26 Jan 2018 08:55:54 +0000 (10:55 +0200)]
lib-auth: Remove request after abort
Otherwise the request will still stay in hash table
and get dereferenced when all requests are aborted
causing an attempt to access free'd memory.
Found by Apollon Oikonomopoulos <apoikos@debian.org>
Broken in
1a29ed2f96da1be22fa5a4d96c7583aa81b8b060
Timo Sirainen [Mon, 18 Dec 2017 14:50:51 +0000 (16:50 +0200)]
lib-auth: Fix memory leak in auth_client_request_abort()
This caused memory leaks when authentication was aborted. For example
with IMAP:
a AUTHENTICATE PLAIN
*
Broken by
9137c55411aa39d41c1e705ddc34d5bd26c65021
Timo Sirainen [Fri, 22 Dec 2017 13:35:03 +0000 (15:35 +0200)]
Released v2.3.0.
Timo Sirainen [Fri, 22 Dec 2017 13:12:30 +0000 (15:12 +0200)]
doveadm dump: Add "multiplex" dump type
This allows dumping all channels from istream-multiplex stream.
Timo Sirainen [Fri, 22 Dec 2017 13:11:45 +0000 (15:11 +0200)]
doveadm dump: Allow doveadm_cmd_dump.test() to be NULL
This means that there's no auto-detection for the dump type.
Timo Sirainen [Fri, 22 Dec 2017 13:10:00 +0000 (15:10 +0200)]
lib: istream-multiplex - Return error if the last packet wasn't fully read
Timo Sirainen [Fri, 22 Dec 2017 13:07:28 +0000 (15:07 +0200)]
doveadm: Fix potential crash or reading garbage from doveadm-server
The connection's input buffer may have been reallocated or otherwise moved
while checking for log input.
Timo Sirainen [Fri, 22 Dec 2017 11:36:32 +0000 (13:36 +0200)]
doveadm: Don't connect to stats-writer for the "quick init" commands
Timo Sirainen [Fri, 22 Dec 2017 11:20:41 +0000 (13:20 +0200)]
lib-master: Add master_service_init_stats_client()
This allows initializing the stats client after master_service_init() if
necessary.
Timo Sirainen [Fri, 22 Dec 2017 11:27:48 +0000 (13:27 +0200)]
lib-master: Hide connect(stats-writer) errors when running via CLI
Only hide errors that occur if the stats process isn't running, i.e. when
socket isn't found or there's no listener. This way e.g. permission errors
are still logged, which points to a wrong configuration.
Aki Tuomi [Fri, 22 Dec 2017 11:34:45 +0000 (13:34 +0200)]
auth: Fix password and scheme handling in Lua db
This was only partially fixed in
c86575ac9776d0995355d03719c82e7ceac802e6
Timo Sirainen [Fri, 22 Dec 2017 07:42:50 +0000 (09:42 +0200)]
imap-old-stats plugin: Finish renaming the plugin
The init functions and dependency were named wrong, so it didn't work.
Timo Sirainen [Fri, 22 Dec 2017 07:37:53 +0000 (09:37 +0200)]
m4: Fix detecting libsodium to use LIBS instead of LDFLAGS
Patch by Eray Aslan
Timo Sirainen [Fri, 22 Dec 2017 07:36:48 +0000 (09:36 +0200)]
m4: Avoid _FORTIFY_SOURCE redefinition warnings
Some source based distros like Gentoo already enable -D_FORTIFY_SOURCE=2
by default resulting in the following warnings during build:
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<built-in>: note: this is the location of the previous definition
Patch by Eray Aslan
Timo Sirainen [Fri, 22 Dec 2017 07:59:27 +0000 (09:59 +0200)]
example-config: Fix postmaster_address comment
The default value was wrong.
Timo Sirainen [Fri, 22 Dec 2017 09:25:06 +0000 (11:25 +0200)]
doveadm-server: Fix potential hangs with SSL connections
Timo Sirainen [Mon, 18 Dec 2017 19:58:16 +0000 (21:58 +0200)]
auth: Don't include LIBSODIUM_LIBS in dependencies
Put it into AUTH_LIBS among other libraries that are used by auth.
Stephan Bosch [Thu, 21 Dec 2017 22:09:13 +0000 (23:09 +0100)]
lib-smtp: server: STARTTLS command: Call smtp_server_connection_set_ssl_streams() after calling the conn_start_tls() connection callback.
This is called instead smtp_server_connection_set_streams(), so that the connection is now marked as SSL-secured.
This fixes a submission-login bug that prevented client login when ssl=required.
Stephan Bosch [Thu, 21 Dec 2017 22:07:10 +0000 (23:07 +0100)]
lib-smtp: server: Add smtp_server_connection_set_ssl_streams().
It wraps smtp_server_connection_set_streams() and additionally marks the connection as SSL-secured.
Stephan Bosch [Thu, 21 Dec 2017 22:00:18 +0000 (23:00 +0100)]
lib-smtp: server: Change conn_start_tls() connection callback to return a success status.
Timo Sirainen [Mon, 18 Dec 2017 22:29:03 +0000 (00:29 +0200)]
man: Update version number to v2.3
Stephan Bosch [Mon, 18 Dec 2017 15:45:23 +0000 (16:45 +0100)]
lib-smtp: server: Fixed assertion in smtp_server_connection_next_reply() checking whether command is fully replied.
It did not handle LMTP DATA/BDAT command correctly, for which there can be multiple replies.
This fixes mixing local/remote recipients in LMTP, which used to crash:
Panic: file smtp-server-connection.c: line 610 (smtp_server_connection_next_reply): assertion failed: (cmd->state == SMTP_SERVER_COMMAND_STATE_READY_TO_REPLY && smtp_server_command_is_replied(cmd))
Stephan Bosch [Mon, 18 Dec 2017 18:28:10 +0000 (19:28 +0100)]
lib-smtp: server: Fix compile error in smtp-server-cmd-helo.c.
Error was:
"smtp-server-cmd-helo.c", line 140: void function cannot return value
Timo Sirainen [Sat, 16 Dec 2017 14:52:19 +0000 (16:52 +0200)]
Released v2.3.0.rc1.
Stephan Bosch [Mon, 18 Dec 2017 14:20:07 +0000 (15:20 +0100)]
lib-smtp: command parser: Fix error recovery.
Input characters were not skipped upon error, meaning that error recovery would encounter these again.
This would make the parser parse the same data over and over again, yielding the same error.
This in turn caused the SMTP server application to hang in an infinite input loop, submitting error replies in the process, thereby filling up the process memory until exhaustion.
Problem seen in submission service, but LMTP is also affected.
Timo Sirainen [Mon, 18 Dec 2017 12:08:16 +0000 (14:08 +0200)]
lib-smtp: server: Fix panic when disconnecting client aborting commands
This happened at least if the relay server simply disconnected without
sending any output.
Fixes: Panic: file submission-commands.c: line 39: unreached
Timo Sirainen [Mon, 18 Dec 2017 12:04:48 +0000 (14:04 +0200)]
lib-smtp: smtp_server_connection_pending_command_data() - don't crash if smtp_parser is NULL
Stephan Bosch [Mon, 18 Dec 2017 12:16:09 +0000 (13:16 +0100)]
doc: example-config: Properly document SSL configuration for submission relay server.
Timo Sirainen [Mon, 18 Dec 2017 10:08:43 +0000 (12:08 +0200)]
submission: Fix memory leaks at deinit when submission_relay_host setting is missing
Timo Sirainen [Mon, 18 Dec 2017 10:06:43 +0000 (12:06 +0200)]
lib-smtp: server: Fix panic when io_remove() is called too late
With submission-login the conn_disconnect() callback ends up in
login-common's client_disconnect(), which closes the file descriptor.
The io_remove() was done afterwards, which caused a crash:
submission-login: Panic: epoll_ctl(del, 18) failed: Bad file descriptor
Timo Sirainen [Mon, 18 Dec 2017 10:05:59 +0000 (12:05 +0200)]
lib-smtp: server: Fix infinite loop when client disconnects in initial state
Timo Sirainen [Mon, 18 Dec 2017 10:48:07 +0000 (12:48 +0200)]
old-stats plugin: Rename stats_* settings to old_stats_*
Timo Sirainen [Mon, 18 Dec 2017 10:47:47 +0000 (12:47 +0200)]
auth: Install stats plugin to old-stats/
Fixes using auth_stats=yes
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