]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Frank Denis [Sat, 28 Oct 2017 18:58:58 +0000 (20:58 +0200)]
configure: --with-sodium doesn't add support for scrypt (for now, at least)
Timo Sirainen [Mon, 27 Nov 2017 16:34:49 +0000 (18:34 +0200)]
doveadm-server: Fix potential dsync-server panic at deinit
If the ostream is still used (e.g. for logging) after dsync is finished, it
crashed with:
Panic: file ostream.c: line 276 (o_stream_sendv_int): assertion failed: (!_stream->finished)
Stephan Bosch [Sat, 25 Nov 2017 14:57:16 +0000 (15:57 +0100)]
pop3-login: Properly recognize an empty SASL initial response.
Pass only the empty string to the auth service and not "=".
Stephan Bosch [Sat, 25 Nov 2017 14:55:41 +0000 (15:55 +0100)]
imap-login: Properly recognize an empty SASL initial response.
Pass only the empty string to the auth service and not "=".
Stephan Bosch [Sat, 25 Nov 2017 14:28:32 +0000 (15:28 +0100)]
auth: Properly recognize an empty initial SASL response.
It was erroneously handled as an absent initial response.
Restructured the code for clarity and changed the comments: '=' should not be passed to SASL layer at all.
Stephan Bosch [Sat, 25 Nov 2017 17:13:04 +0000 (18:13 +0100)]
lib: strfuncs: Fixed value of uchar_empty_ptr not to be NULL.
Stephan Bosch [Mon, 27 Nov 2017 20:11:30 +0000 (21:11 +0100)]
lmtp: proxy: Fix connection settings comparison in lmtp_proxy_get_connection() when hostip field is set.
The IP in the hostip field overrides the host setting, which broke the comparison.
Timo Sirainen [Mon, 27 Nov 2017 13:17:52 +0000 (15:17 +0200)]
lib: mempool-alloconly - Cleanly fail allocations just below SSIZE_T_MAX
Previously it would have assert-crashed in nearest_power().
Timo Sirainen [Mon, 27 Nov 2017 13:14:36 +0000 (15:14 +0200)]
lib: Use test_expect_fatal_string() for all fatal unit tests
Timo Sirainen [Mon, 27 Nov 2017 13:12:45 +0000 (15:12 +0200)]
lib: Fix mempool-alloconly & mempool-allocfree unit tests
The "physically impossible size" test was supposed to test calloc()==NULL
failure, but in reality it was triggering asserts before that.
Timo Sirainen [Mon, 27 Nov 2017 13:11:40 +0000 (15:11 +0200)]
lib: mempool-allocfree - If calloc() fails, include "Out of memory" in the log line
Timo Sirainen [Mon, 27 Nov 2017 12:48:25 +0000 (14:48 +0200)]
lib: Fix logging panic message if data stack canary corruption is detected
The previous code just recursed into the same canary corruption check and
didn't end up logging anything.
Timo Sirainen [Mon, 27 Nov 2017 12:42:36 +0000 (14:42 +0200)]
lib: Make sure panics/fatals don't recurse into loops
Timo Sirainen [Mon, 27 Nov 2017 12:24:41 +0000 (14:24 +0200)]
lib-test: Add test_expect_fatal_string()
Timo Sirainen [Mon, 27 Nov 2017 12:23:39 +0000 (14:23 +0200)]
lib-test: Cleanup - Move expected_error_str check to its own function
Aki Tuomi [Tue, 21 Nov 2017 20:13:17 +0000 (22:13 +0200)]
lib-dcrypt: test-crypto and test-stream need lib-ssl-iostream.a fully
Otherwise the .so file cannot be loaded due to missing symbols
Aki Tuomi [Tue, 21 Nov 2017 20:12:56 +0000 (22:12 +0200)]
login-common: Do not link lib-ssl-iostream.la twice
It's already in libdovecot.la
Aki Tuomi [Fri, 24 Nov 2017 06:51:14 +0000 (08:51 +0200)]
configure: Detect --whole-archive in linker
Aki Tuomi [Fri, 24 Nov 2017 07:00:24 +0000 (09:00 +0200)]
m4: Use CC, not CXX in ld_relro
Timo Sirainen [Mon, 27 Nov 2017 15:42:14 +0000 (17:42 +0200)]
replicator: Keep user referenced while dsync is running
Fixes a crash when user is removed with "doveadm replicator remove"
while dsync is still running.
Timo Sirainen [Mon, 27 Nov 2017 15:42:06 +0000 (17:42 +0200)]
replicator: Add refcounting to user
Stephan Bosch [Mon, 27 Nov 2017 00:38:09 +0000 (01:38 +0100)]
lmtp: proxy: Fixed use of hostip field after changing the implementation to use lib-smtp/client broke it.
Proxy was erroneously doing DNS queries while hostip field was returned from passdb.
Stephan Bosch [Mon, 27 Nov 2017 10:45:05 +0000 (11:45 +0100)]
lmtp: proxy: Fixed proxying reply from backend server.
It contained an additional CRLF, which caused problems.
Stephan Bosch [Mon, 27 Nov 2017 10:44:23 +0000 (11:44 +0100)]
lib-smtp: Implemented function to write an SMTP reply as a single line.
Needed for proxying in current LMTP code.
Aki Tuomi [Mon, 27 Nov 2017 12:57:09 +0000 (14:57 +0200)]
configure: Fix Lua conditionals
Aki Tuomi [Mon, 27 Nov 2017 12:56:07 +0000 (14:56 +0200)]
configure: Drop LuaJIT support
Does not work with our custom allocator
Aki Tuomi [Mon, 27 Nov 2017 10:32:54 +0000 (12:32 +0200)]
lib: mempool-allocfree - include overhead in size check
Found by valgrind
Timo Sirainen [Mon, 27 Nov 2017 09:58:39 +0000 (11:58 +0200)]
director: Fix logging of uninitialized PONG buffer size
PONG always has 0 or 2 parameters. The easiest fix here is to just not even
try to support 1 parameter.
Stephan Bosch [Sun, 26 Nov 2017 23:54:56 +0000 (00:54 +0100)]
lib-smtp: client: Fixed cleanup of untriggered transaction timeout.
Timo Sirainen [Sun, 26 Nov 2017 21:00:30 +0000 (23:00 +0200)]
director: Fix delayed request count in ps title after request timeouts
The timeouts weren't shrinking the delayed request count. This didn't cause
any other problems.
Timo Sirainen [Fri, 24 Nov 2017 23:59:47 +0000 (01:59 +0200)]
lib-program-client: Ignore ostream error handling
Stephan Bosch [Sun, 29 Oct 2017 17:36:25 +0000 (18:36 +0100)]
lib-smtp: Implemented test suite for client errors.
Stephan Bosch [Sun, 5 Nov 2017 20:51:02 +0000 (21:51 +0100)]
lib-test: Reset expected errors state at each test.
Stephan Bosch [Wed, 8 Nov 2017 00:51:19 +0000 (01:51 +0100)]
lib-lda: Added support for message submission with SSL.
Stephan Bosch [Sun, 7 May 2017 12:58:05 +0000 (14:58 +0200)]
lib-smtp: smtp-submit: Added SSL support.
Stephan Bosch [Sat, 16 Sep 2017 18:10:39 +0000 (20:10 +0200)]
lib-smtp: smtp-submit: Use mail_debug setting to enable debug logging.
When sendmail is used, this logs program_client debug messages.
When SMTP is used (submission_host), this logs smtp_client debug messages.
Stephan Bosch [Sat, 16 Sep 2017 18:09:22 +0000 (20:09 +0200)]
lib-smtp: Dropped old lmtp-client.
It is now unused.
Stephan Bosch [Sun, 22 Jan 2017 14:27:29 +0000 (15:27 +0100)]
lmtp: proxy: Changed implemention to use lib-smtp/smtp-client.
Stephan Bosch [Sun, 22 Jan 2017 14:26:32 +0000 (15:26 +0100)]
lib-smtp: smtp-submit: Changed submission_host implementation to use lib-smtp/smtp-client.
Stephan Bosch [Mon, 20 Nov 2017 22:30:37 +0000 (23:30 +0100)]
lib-smtp: smtp-submit: Small whitespace fix.
Stephan Bosch [Sat, 4 Nov 2017 13:38:39 +0000 (14:38 +0100)]
lib-smtp: smtp-submit: Remove erroneously copy-pasted FIXMEs.
Stephan Bosch [Sun, 6 Nov 2016 21:15:45 +0000 (22:15 +0100)]
lib-smtp: Implemented SMTP client.
Stephan Bosch [Sun, 6 Nov 2016 21:00:08 +0000 (22:00 +0100)]
lib-smtp: Implemented SMTP command reply parser.
Stephan Bosch [Tue, 17 Oct 2017 23:03:03 +0000 (01:03 +0200)]
lmtp: commands: Grouped deliver context field assignments by topic in client_deliver().
Stephan Bosch [Sun, 6 Nov 2016 18:09:30 +0000 (19:09 +0100)]
lib-lda: Added SMTP parameter fields to struct mail_deliver_context.
This moves the original recipient field inside the SMTP parameters.
This also affects both lda and lmtp. Changes are applied there accordingly.
Stephan Bosch [Sun, 6 Nov 2016 20:39:07 +0000 (21:39 +0100)]
lib-smtp: Implemented parsing, manipulation, and encoding for SMTP command parameters.
Stephan Bosch [Sun, 6 Nov 2016 20:29:59 +0000 (21:29 +0100)]
lib-smtp: Implemented parsing and encoding for common SMTP syntax elements.
Stephan Bosch [Sun, 6 Nov 2016 12:45:57 +0000 (13:45 +0100)]
lib-lda: mail-send: Changed recipient argument type of mail_send_rejection() to struct smtp_address.
Stephan Bosch [Sun, 29 Oct 2017 22:39:55 +0000 (23:39 +0100)]
lib-mail: message-address: Dropped message_detail_address_parse(), since it is no longer used.
Stephan Bosch [Sun, 29 Oct 2017 22:41:44 +0000 (23:41 +0100)]
plugins/quota: quota-status service: Changed recipient address parsing to use lib-smtp.
Stephan Bosch [Sat, 5 Nov 2016 13:47:53 +0000 (14:47 +0100)]
lib-lda: Changed struct mail_deliver_context address fields to use the new struct smtp_address type.
Stephan Bosch [Fri, 4 Nov 2016 17:35:59 +0000 (18:35 +0100)]
lda: Renamed variables and parameters for consistency with lib-smtp.
Stephan Bosch [Wed, 2 Nov 2016 23:20:55 +0000 (00:20 +0100)]
lib-lda: Renamed struct mail_deliver_context fields for consistency with lib-smtp.
New fields are added in subsequent commits.
Stephan Bosch [Fri, 4 Nov 2016 17:16:52 +0000 (18:16 +0100)]
lmtp: Removed lmtp_address_translate setting.
It is assumed not to be used.
Stephan Bosch [Sun, 5 Nov 2017 01:00:43 +0000 (02:00 +0100)]
lib-mail: message-address: Added convenience functions that convert (single) addresses to string.
Stephan Bosch [Thu, 19 Oct 2017 13:20:04 +0000 (15:20 +0200)]
lib-mail: message-address: Added functions to initialize a struct message_address.
Stephan Bosch [Sun, 29 Oct 2017 22:37:47 +0000 (23:37 +0100)]
lib-smtp: address: Created SMTP address detail parsing function from message_detail_address_parse().
Stephan Bosch [Sun, 6 Nov 2016 20:15:41 +0000 (21:15 +0100)]
lib-smtp: Implemented parsing, manipulation and encoding of SMTP addresses.
Stephan Bosch [Sun, 6 Nov 2016 20:08:11 +0000 (21:08 +0100)]
lib-smtp: Implemented generic parser for basic SMTP data items.
Stephan Bosch [Fri, 27 Oct 2017 17:43:43 +0000 (19:43 +0200)]
lib: connection: Added means to initialize connection to just be added to the connection list.
Stephan Bosch [Thu, 19 Oct 2017 12:04:20 +0000 (14:04 +0200)]
lib-storage: Make parsed postmaster_address available in mail_storage_settings->parsed_postmaster_address.
Stephan Bosch [Sat, 21 Oct 2017 11:13:00 +0000 (13:13 +0200)]
lib-settings: Added support for running checks after variable expansion.
Stephan Bosch [Wed, 22 Nov 2017 20:02:07 +0000 (21:02 +0100)]
lmtp: Accept XCLIENT ADDR field IPv6 address both with and without "IPV6:" prefix.
This is the format that Postfix actually prescribes.
The new lib-smtp will add the prefix by default.
Stephan Bosch [Mon, 20 Nov 2017 00:26:21 +0000 (01:26 +0100)]
lib: llist: Fixed setting (after)->next->prev in DLLIST2_INSERT_AFTER_FULL.
This function was not yet used, so the problem did not affect existing code.
Josh Soref [Sun, 26 Feb 2017 03:19:51 +0000 (03:19 +0000)]
lib-settings: Fix spelling of 'expanded'
Timo Sirainen [Sun, 26 Nov 2017 00:11:57 +0000 (02:11 +0200)]
imap: Make sure command handlers are called with ostream corked
This wasn't done when client input was continued. If COPY/MOVE was called
there, it crashed with:
Panic: file cmd-copy.c: line 50 (fetch_and_copy): assertion failed: (o_stream_is_corked(client->output))
Timo Sirainen [Sun, 26 Nov 2017 10:33:33 +0000 (12:33 +0200)]
director: DIRECTOR-LIST - Return results sorted by host
Timo Sirainen [Sun, 26 Nov 2017 10:26:27 +0000 (12:26 +0200)]
director: DIRECTOR-LIST - Move connection/host output to their own functions
Timo Sirainen [Sun, 26 Nov 2017 10:36:54 +0000 (12:36 +0200)]
director: Make director_host_cmp_p() public
Timo Sirainen [Fri, 24 Nov 2017 16:46:19 +0000 (18:46 +0200)]
director: Improve PING/PONG timeout errors and add new warnings
Log a warning if PING-PONG takes over 5 secs in total, or also if the
recipient notices that the PING took >= 5 seconds to receive.
Timo Sirainen [Fri, 24 Nov 2017 16:22:04 +0000 (18:22 +0200)]
director: Add director_ping_idle/max_timeout setting.
director_ping_idle_timeout is used when there's otherwise no input coming
from the connection. Changed its default from 10 secs to 30 secs.
director_ping_max_timeout is used when the other director keeps sending
input, but among it is no PONG reply.
Timo Sirainen [Fri, 24 Nov 2017 16:18:45 +0000 (18:18 +0200)]
director: Log exactly how long PING was waited on before it timed out.
Timo Sirainen [Sun, 26 Nov 2017 10:20:26 +0000 (12:20 +0200)]
director: DIRECTOR-LIST - Add "ring " prefix to self's status
This is to make it a bit easier to understand the difference between a
connection's "handshaking" state vs. "ring handshaking" state.
Timo Sirainen [Sun, 26 Nov 2017 10:19:36 +0000 (12:19 +0200)]
director: DIRECTOR-LIST - Show number of USERs sent/received in "handshaking" state
Timo Sirainen [Sun, 26 Nov 2017 10:13:35 +0000 (12:13 +0200)]
director: Include number of users sent in handshake in disconnection log lines
Timo Sirainen [Sun, 26 Nov 2017 01:45:00 +0000 (03:45 +0200)]
director: Show number of incoming USERs/sec in ps title
Timo Sirainen [Sat, 25 Nov 2017 21:28:12 +0000 (23:28 +0200)]
director: Include number of USERs received in disconnection log lines
Separate handshake and refresh USERs.
Timo Sirainen [Sat, 25 Nov 2017 08:01:31 +0000 (10:01 +0200)]
director: Don't send USERs in handshake that were already sent between handshake
If the user was refreshed since the handshake was started, it means that
the same user was already sent to the other side (added to the stream
immediately after it was received/handled). There's no need to send it
again.
This fixes a potentally infinite handshake when users are rapidly changing
and the handshake iterator never sees the end of the list. (Each refreshed
user is moved to the end of the list, so handshaking can keep sending the
same user over and over again.)
Timo Sirainen [Sat, 25 Nov 2017 08:05:27 +0000 (10:05 +0200)]
director: Delay sorting users until there are no more user iterators
This shouldn't have normally happened. Only when an outgoing handshake was
going on at the same time as a) another outgoing handshake was going on, or
b) doveadm was doing HOST-RESET-USERS
Timo Sirainen [Sat, 25 Nov 2017 23:31:08 +0000 (01:31 +0200)]
director: Avoid USER loops with >1s ring latency also with old directors
Do this by ignoring USER refreshes that were already updated recently.
The "recently" is calculated by director_user_expire/4 seconds ago, but
with an upper limit of 15 secs. This means that the USER loops can now
only exist if the director ring latency is above 15 seconds. (Once all
directors in the ring are running the new version, there's no looping
at any latency.)
Timo Sirainen [Sat, 25 Nov 2017 23:19:35 +0000 (01:19 +0200)]
director: Avoid USER loops when ring latency is over 1 second
Do this by adding a timestamp parameter to USER events. This way if it
takes over 1 second for the USER event to traverse the ring, it won't get
into an infinite loop getting the user updated over and over again.
Timo Sirainen [Sat, 25 Nov 2017 23:14:01 +0000 (01:14 +0200)]
director: Replace USER command during handshake with "U"
This clearly differentiates the two commands and allows extending the USER
command with new parameters without mixing it up with the handshake-USER.
Timo Sirainen [Sat, 25 Nov 2017 23:06:43 +0000 (01:06 +0200)]
director: Ignore refresh requests for already expired user timestamps
Timo Sirainen [Fri, 17 Nov 2017 11:24:59 +0000 (13:24 +0200)]
director: Keep users unsorted during handshake and sort them at the end
This is simpler and sometimes more efficient than the current way of
immediately inserting the users to the correct place in the linked list.
This is especially useful if handshaking is mixed with regular USER updates,
because each switch between them required walking the linked list backwards
to find the proper insert position.
It's not a big problem if the users list is temporarily unordered. It mainly
means that some of the users won't be expired as early as they should have.
Timo Sirainen [Fri, 17 Nov 2017 16:53:18 +0000 (18:53 +0200)]
director: Make sure users are sorted after unfinished handshake
The users were sorted after the handshake was finished, but if the
connection was closed before that hapepned, the users were left
unsorted. This could have caused the users to not expire early
enough.
Timo Sirainen [Fri, 17 Nov 2017 12:56:20 +0000 (14:56 +0200)]
director: Make sure user's timestamp isn't set to future
The sending director could have the system clock slightly in the future.
Aki Tuomi [Tue, 21 Nov 2017 21:07:56 +0000 (23:07 +0200)]
global: Use t_buffer_create
sed -i -e 's/buffer_create_dynamic(pool_datastack_create(), */t_buffer_create(/g'
Aki Tuomi [Tue, 21 Nov 2017 20:57:30 +0000 (22:57 +0200)]
lib: buffer - Add t_buffer_create
Helper for making a datastack buffer
Timo Sirainen [Fri, 24 Nov 2017 10:31:22 +0000 (12:31 +0200)]
lib-storage: Fix sorting mails with the same primary sort key
The sorting order may have been wrong when there was a combination of:
* Messages were sorted by a string (e.g. Subject)
* Some messages had the same sort key (e.g. same base subject)
* Within the messages with the same sort key, some of the messages already
had the "sort-*" index number in Dovecot indexes, but some of them
didn't.
The result was that Dovecot found that the two messages had exactly the same
sort key. It should have continued with the secondary sort key (e.g.
message sequence number), but it didn't.
Aki Tuomi [Wed, 8 Nov 2017 13:42:32 +0000 (15:42 +0200)]
auth: Add lua passdb/userdb support
Aki Tuomi [Sat, 11 Nov 2017 09:55:21 +0000 (11:55 +0200)]
lib-lua: Add lua helper library
Provides a base lua library for lua extensibility
Aki Tuomi [Wed, 8 Nov 2017 12:09:26 +0000 (14:09 +0200)]
configure: Detect lua
Aki Tuomi [Wed, 15 Nov 2017 17:13:39 +0000 (19:13 +0200)]
auth: Add accessor for userdb-template fields
It's needed in lua
Aki Tuomi [Wed, 8 Nov 2017 11:30:24 +0000 (13:30 +0200)]
mempool-allocfree: Add linked-list malloc allocation
This is useful when you want to actually free memory from pool too
Aki Tuomi [Fri, 24 Nov 2017 07:52:24 +0000 (09:52 +0200)]
stats: Do not log errors if /proc/self/io is not accessible
Some security options, used notably in docker, can prevent
access to this file even from root, so do not log errors
if the error is EACCES.
Josef 'Jeff' Sipek [Mon, 20 Nov 2017 14:46:48 +0000 (09:46 -0500)]
lib: test-path-util - whitespace & coding style cleanup in create_links()
Aki Tuomi [Wed, 22 Nov 2017 08:49:49 +0000 (10:49 +0200)]
auth: Check that key is not empty in passdb or userdb template
Prevents nasty crash later on if template has 'key = value'
dovecot: auth: Panic: file auth-request.c: line 1746 (auth_request_set_field): assertion failed: (*name != '\0')
Timo Sirainen [Wed, 22 Nov 2017 10:16:46 +0000 (12:16 +0200)]
lib-storage: Add mailbox_set_critical() and mail_set_critical()
These add the mailbox vname and mail UID to the log prefix and then call
mail_storage_set_critical().
Timo Sirainen [Wed, 22 Nov 2017 10:02:11 +0000 (12:02 +0200)]
login-proxy: Fix hang in outgoing SSL connections
The handshaking needs to be started explicitly.
Timo Sirainen [Tue, 21 Nov 2017 14:52:24 +0000 (16:52 +0200)]
login-proxy: Log connection errors using IP, not hostname
The hostname can point to multiple IPs or there can be some other mismatch.
Logging the IP instead shows exactly what is happening.