]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
7 years agolib-smtp: server: Add APIs for halting and resuming connection command handling.
Stephan Bosch [Wed, 27 Dec 2017 16:02:12 +0000 (17:02 +0100)] 
lib-smtp: server: Add APIs for halting and resuming connection command handling.

Also adds function to start the connection in a pending (halted) state. This way the greeting can already be sent (over SSL if needed), while deferring command handling until some external activity is completed.

7 years agolib-smtp: server: Prevent calling smtp_server_connection_login() after smtp_server_co...
Stephan Bosch [Wed, 27 Dec 2017 15:31:12 +0000 (16:31 +0100)] 
lib-smtp: server: Prevent calling smtp_server_connection_login() after smtp_server_connection_start().

Added assertion.

7 years agolib-smtp: server: Protect smpt_server_connection_start() from being called multiple...
Stephan Bosch [Wed, 27 Dec 2017 15:22:22 +0000 (16:22 +0100)] 
lib-smtp: server: Protect smpt_server_connection_start() from being called multiple times.

7 years agolib-smtp: server: Delay handling initial input (from login service) until after smtp_...
Stephan Bosch [Wed, 27 Dec 2017 15:18:16 +0000 (16:18 +0100)] 
lib-smtp: server: Delay handling initial input (from login service) until after smtp_server_connection_start().

Instead, it is now handled in normal io callback.

7 years agolib-smtp: server: Remove implicit smtp_server_connection_start() from smtp_server_con...
Stephan Bosch [Wed, 27 Dec 2017 14:56:03 +0000 (15:56 +0100)] 
lib-smtp: server: Remove implicit smtp_server_connection_start() from smtp_server_connection_login().

7 years agolib-smtp: server: Moved smtp_server_connection_start() after smtp_server_connection_l...
Stephan Bosch [Wed, 27 Dec 2017 14:59:23 +0000 (15:59 +0100)] 
lib-smtp: server: Moved smtp_server_connection_start() after smtp_server_connection_login().

Also fixes an indent problem in the header comment implicitly.

7 years agolib-smtp: server: Moved ssl_start argument from smtp_server_connection_start() to...
Stephan Bosch [Wed, 27 Dec 2017 14:52:13 +0000 (15:52 +0100)] 
lib-smtp: server: Moved ssl_start argument from smtp_server_connection_start() to smtp_server_connection_create().

This frees smtp_server_connection_start() for general use.

7 years agodsync: Add per-mailbox sync lock that is always used.
Timo Sirainen [Thu, 28 Dec 2017 12:10:23 +0000 (14:10 +0200)] 
dsync: Add per-mailbox sync lock that is always used.

Both importing and exporting gets the lock before they even sync the
mailbox. The lock is kept until the import/export finishes. This guarantees
that no matter how dsync is run, two dsyncs can't be working on the same
mailbox at the same time.

This lock is in addition to the optional per-user lock enabled by the -l
parameter. If the -l parameter is used, the same lock timeout is used for
the per-mailbox lock. Otherwise 30s timeout is used.

This should help to avoid email duplication when replication is enabled for
public namespaces, and maybe in some other rare situations as well.

7 years agolib: Make file_lock_free(NULL) no-op
Timo Sirainen [Thu, 28 Dec 2017 17:40:29 +0000 (19:40 +0200)] 
lib: Make file_lock_free(NULL) no-op

7 years agodoveconf: add hostname to output
Jarkko Mourujärvi [Thu, 28 Dec 2017 11:53:14 +0000 (13:53 +0200)] 
doveconf: add hostname to output

7 years agoauth: Use rip instead of real_rip in policy server attributes
Aki Tuomi [Fri, 1 Dec 2017 11:49:31 +0000 (13:49 +0200)] 
auth: Use rip instead of real_rip in policy server attributes

real_rip contains proxy IP, not client IP

7 years agoauth: Include tls=true/false in policy server request
Aki Tuomi [Fri, 1 Dec 2017 11:46:10 +0000 (13:46 +0200)] 
auth: Include tls=true/false in policy server request

7 years agoauth: Support secured=tls
Aki Tuomi [Fri, 1 Dec 2017 11:30:43 +0000 (13:30 +0200)] 
auth: Support secured=tls

7 years agologin-common: Pass SSL protocol details to auth
Aki Tuomi [Mon, 11 Dec 2017 09:16:02 +0000 (11:16 +0200)] 
login-common: Pass SSL protocol details to auth

7 years agologin-common: Indicate TLS encryption if haproxy says it was
Aki Tuomi [Fri, 1 Dec 2017 11:16:34 +0000 (13:16 +0200)] 
login-common: Indicate TLS encryption if haproxy says it was

7 years agolib-auth: Include ssl protocol details in request when present
Aki Tuomi [Mon, 11 Dec 2017 09:08:08 +0000 (11:08 +0200)] 
lib-auth: Include ssl protocol details in request when present

7 years agolib-auth: Add AUTH_REQUEST_FLAG_TLS
Aki Tuomi [Fri, 1 Dec 2017 11:16:07 +0000 (13:16 +0200)] 
lib-auth: Add AUTH_REQUEST_FLAG_TLS

Indicates whether connection is over TLS encryption.

7 years agolib-ssl-iostream: Add accessors for additional SSL protocol details
Aki Tuomi [Mon, 11 Dec 2017 09:00:41 +0000 (11:00 +0200)] 
lib-ssl-iostream: Add accessors for additional SSL protocol details

This is needed in order to send these details as fields to auth process

7 years agom4: Check for SSL_CIPHER_get_kx_nid
Aki Tuomi [Wed, 13 Dec 2017 07:52:16 +0000 (09:52 +0200)] 
m4: Check for SSL_CIPHER_get_kx_nid

7 years agolib-http: test-http-client - Make DNS client optional
Aki Tuomi [Thu, 28 Dec 2017 09:30:00 +0000 (11:30 +0200)] 
lib-http: test-http-client - Make DNS client optional

Only use DNS client if present. Allows running the
test-http-client standalone.

7 years agolib-http: Only depend on iostream openssl lib if building with openssl
Aki Tuomi [Thu, 28 Dec 2017 08:47:28 +0000 (10:47 +0200)] 
lib-http: Only depend on iostream openssl lib if building with openssl

Fixes build without openssl

7 years agodsync: Add debug logging for .dovecot-sync.lock locking/unlocking
Timo Sirainen [Thu, 28 Dec 2017 08:27:27 +0000 (10:27 +0200)] 
dsync: Add debug logging for .dovecot-sync.lock locking/unlocking

7 years agosubmission-login: Fail CLIENT_AUTH_RESULT_MECH_SSL_REQUIRED authentication result...
Stephan Bosch [Sat, 23 Dec 2017 22:49:02 +0000 (23:49 +0100)] 
submission-login: Fail CLIENT_AUTH_RESULT_MECH_SSL_REQUIRED authentication result with 523 5.7.10 error.

Defined in RFC5248, Section 2.4.

7 years agosubmission: BURL command: Return more appropriate 554 5.7.14 error when BURL/URLAUTH...
Stephan Bosch [Wed, 27 Dec 2017 14:18:14 +0000 (15:18 +0100)] 
submission: BURL command: Return more appropriate 554 5.7.14 error when BURL/URLAUTH is not configured.

Defined in RFC5248, Section 2.4.

7 years agodovecot-config: Update lib-stats directory to lib-old-stats
Timo Sirainen [Wed, 27 Dec 2017 10:05:50 +0000 (12:05 +0200)] 
dovecot-config: Update lib-stats directory to lib-old-stats

7 years agolib-smtp: server: Fix assertion failure occurring for a second failed BDAT/BURL command.
Stephan Bosch [Mon, 25 Dec 2017 23:38:58 +0000 (00:38 +0100)] 
lib-smtp: server: Fix assertion failure occurring for a second failed BDAT/BURL command.

Assertion was:

Panic: file smtp-server-cmd-data.c: line 420 (smtp_server_connection_data_chunk_init): assertion failed: (data_cmd->chunk_first)

7 years agolib/timing - helper for arbitrary percentiles
Phil Carmody [Tue, 12 Dec 2017 13:21:17 +0000 (15:21 +0200)] 
lib/timing - helper for arbitrary percentiles

Replace fixed 95th %-ile helper with request for arbitrary
percentiles, or even arbitrary fractions of the range.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
7 years agolib/data-stack - in panic scenarios, use the panic memory buffer
Phil Carmody [Thu, 14 Dec 2017 22:44:51 +0000 (00:44 +0200)] 
lib/data-stack  - in panic scenarios, use the panic memory buffer

Signed-off-by: Phil Carmody <phil@dovecot.fi>
7 years agolib/datastack - remove useless thing
Phil Carmody [Thu, 14 Dec 2017 22:35:39 +0000 (00:35 +0200)] 
lib/datastack - remove useless thing

It was useless.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
7 years agoimapc: Add imapc_features=no-msn-updates
Timo Sirainen [Mon, 25 Dec 2017 09:10:19 +0000 (11:10 +0200)] 
imapc: Add imapc_features=no-msn-updates

This is a stricter version of fetch-msn-workarounds. The MSNs aren't trusted
at all. This means any new untagged EXISTS and EXPUNGE replies are ignored,
as well as untagged FETCH replies that don't include UID.

A potential downside with this feature is that UID FETCH/STORE commands
sent to expunged messages will likely fail without the IMAP client being
notified of the EXPUNGEs. New mails are also not noticed, so this should
be used only when it's known that the clients don't keep the connection
open for long.

7 years agolib-storage: mail_storage_set_index_error() - handle NULL index error
Timo Sirainen [Mon, 25 Dec 2017 16:24:35 +0000 (18:24 +0200)] 
lib-storage: mail_storage_set_index_error() - handle NULL index error

This avoids assert-crashing later on in mail*_get_last_internal_error().

This could potentially be an assert instead of setting it as "BUG", but
it looks like there are various code paths in lib-index that return -1
without setting an error. (That's to avoid duplicate error logging,
although it could now be fixed with mail_index_set_error_nolog().)

7 years agolib-storage: Set index error on transaction commit() callback
Timo Sirainen [Mon, 25 Dec 2017 16:18:14 +0000 (18:18 +0200)] 
lib-storage: Set index error on transaction commit() callback

The commit callback is setting errors to storage. However, it's being
called from mail_index_transaction_commit() whose callers are expecting
the error to be in index. If that index error was attempted to be used,
it could have been wrong or NULL. Fix this by setting the same storage
error also to the index.

7 years agolib-index: Add mail_index_set_error_nolog()
Timo Sirainen [Mon, 25 Dec 2017 16:17:57 +0000 (18:17 +0200)] 
lib-index: Add mail_index_set_error_nolog()

7 years agosubmission: Restructure handling of QUIT command.
Stephan Bosch [Sun, 24 Dec 2017 14:12:36 +0000 (15:12 +0100)] 
submission: Restructure handling of QUIT command.

- Avoid explicitly proxying QUIT command when the proxy connection is not ready: in that case the SMTP client connection will just send QUIT if appropriate, without waiting for reply.
- Add timeout for proxied QUIT command, so that there are no problems when the relay server hangs after QUIT (addresses FIXME).

7 years agosubmission: Dropped unused field from struct client.
Stephan Bosch [Sun, 24 Dec 2017 13:52:07 +0000 (14:52 +0100)] 
submission: Dropped unused field from struct client.

7 years agosubmission-login: Fix pipelining of commands beyond AUTH.
Stephan Bosch [Sun, 24 Dec 2017 11:17:48 +0000 (12:17 +0100)] 
submission-login: Fix pipelining of commands beyond AUTH.

The master_data_prefix was initialized wrong; it omitted the expected '\0' byte after the helo field.

7 years agosubmission: Initialize proxy connection before starting the SMTP server connection.
Stephan Bosch [Sun, 24 Dec 2017 11:15:29 +0000 (12:15 +0100)] 
submission: Initialize proxy connection before starting the SMTP server connection.

The smtp_server_connection_login() function gets pre-login connection data from login service, which can contain commands.
The execution of commands expects the proxy connection object to be initialized.

7 years agolib-smtp: client: Fix rawlog input stream inconsistency by updating streams right...
Stephan Bosch [Sun, 24 Dec 2017 13:35:15 +0000 (14:35 +0100)] 
lib-smtp: client: Fix rawlog input stream inconsistency by updating streams right after initializing TLS.

Restructured the code to call a new function called smtp_client_connection_streams_changed() which performs all the necessary updates.
Before, enabling rawlog could break the TLS handshake.

7 years agolib-smtp: client: Add assertion to smtp_client_command_write().
Stephan Bosch [Sat, 23 Dec 2017 21:51:37 +0000 (22:51 +0100)] 
lib-smtp: client: Add assertion to smtp_client_command_write().

Makes sure it is not used after the command is submitted.

7 years agolib-smtp: client: Fix smtp_client_command_name_equals() to work properly after the...
Stephan Bosch [Sat, 23 Dec 2017 21:49:57 +0000 (22:49 +0100)] 
lib-smtp: client: Fix smtp_client_command_name_equals() to work properly after the command is submitted.

At command submission, CRLF is appended to command data. This messed up the name comparison.
This in turn caused a spurious QUIT command to be sent to the server at connection close.

7 years agolib-smtp: client: Make smtp_client_connection_commands_abort() more reliable by copyi...
Stephan Bosch [Sat, 23 Dec 2017 21:14:16 +0000 (22:14 +0100)] 
lib-smtp: client: Make smtp_client_connection_commands_abort() more reliable by copying the command lists.

Copy the current lists of queued and waiting commands and reference each command before calling smtp_client_command_abort().
Aborting one command can cause other dependent commands to be aborted (in a transaction or from submission service), which could have caused trouble in this function.

7 years agolib-smtp: client: Make smtp_client_connection_commands_fail_reply() more reliable...
Stephan Bosch [Sat, 23 Dec 2017 21:04:13 +0000 (22:04 +0100)] 
lib-smtp: client: Make smtp_client_connection_commands_fail_reply() more reliable by copying the command lists.

Copy the current lists of queued and waiting commands and reference each command before calling smtp_client_command_fail_reply().
Failing one command can cause other dependent commands to be aborted (in a transaction or from submission service), which could have caused trouble in this function.
Problems would likely occur at connection disconnect.

7 years agosubmission-login: Fixed handling of ssl=required for trusted connections.
Stephan Bosch [Sat, 23 Dec 2017 18:40:09 +0000 (19:40 +0100)] 
submission-login: Fixed handling of ssl=required for trusted connections.

Normally, SSL is not required for trusted connections (e.g. localhost), but submission-login did not follow this standard.

7 years agodoveadm dump: Add "multiplex" dump type
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.

7 years agodoveadm dump: Allow doveadm_cmd_dump.test() to be NULL
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.

7 years agolib: istream-multiplex - Return error if the last packet wasn't fully read
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

7 years agodoveadm: Fix potential crash or reading garbage from doveadm-server
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.

7 years agodoveadm: Don't connect to stats-writer for the "quick init" commands
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

7 years agolib-master: Add master_service_init_stats_client()
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.

7 years agolib-master: Hide connect(stats-writer) errors when running via CLI
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.

7 years agoauth: Fix password and scheme handling in Lua db
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

7 years agoimap-old-stats plugin: Finish renaming the plugin
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.

7 years agom4: Fix detecting libsodium to use LIBS instead of LDFLAGS
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

7 years agom4: Avoid _FORTIFY_SOURCE redefinition warnings
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

7 years agoexample-config: Fix postmaster_address comment
Timo Sirainen [Fri, 22 Dec 2017 07:59:27 +0000 (09:59 +0200)] 
example-config: Fix postmaster_address comment

The default value was wrong.

7 years agodoveadm-server: Fix potential hangs with SSL connections
Timo Sirainen [Fri, 22 Dec 2017 09:25:06 +0000 (11:25 +0200)] 
doveadm-server: Fix potential hangs with SSL connections

7 years agoauth: Don't include LIBSODIUM_LIBS in dependencies
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.

7 years agolib-auth: Require being connected before adding requests
Aki Tuomi [Thu, 8 Jun 2017 09:18:30 +0000 (12:18 +0300)] 
lib-auth: Require being connected before adding requests

7 years agolib-auth: Prevent double-disconnect
Aki Tuomi [Mon, 5 Jun 2017 09:44:06 +0000 (12:44 +0300)] 
lib-auth: Prevent double-disconnect

When disconnecting, it's possible that
disconnect gets called twice by some callback,
so protect it with a boolean.

Fixes Panic: file hash.c: line 152 (hash_table_clear): assertion failed: (table->frozen == 0)

7 years agolib-smtp: server: STARTTLS command: Call smtp_server_connection_set_ssl_streams(...
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.

7 years agolib-smtp: server: Add smtp_server_connection_set_ssl_streams().
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.

7 years agolib-smtp: server: Change conn_start_tls() connection callback to return a success...
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.

7 years agoman: Update version number to v2.3
Timo Sirainen [Mon, 18 Dec 2017 22:29:03 +0000 (00:29 +0200)] 
man: Update version number to v2.3

7 years agolib-smtp: server: Fixed assertion in smtp_server_connection_next_reply() checking...
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))

7 years agolib-smtp: server: Fix compile error in smtp-server-cmd-helo.c.
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

7 years agolib-smtp: command parser: Fix error recovery.
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.

7 years agolib-smtp: server: Fix panic when disconnecting client aborting commands
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
7 years agolib-smtp: smtp_server_connection_pending_command_data() - don't crash if smtp_parser...
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

7 years agodoc: example-config: Properly document SSL configuration for submission relay server.
Stephan Bosch [Mon, 18 Dec 2017 12:16:09 +0000 (13:16 +0100)] 
doc: example-config: Properly document SSL configuration for submission relay server.

7 years agosubmission: Fix memory leaks at deinit when submission_relay_host setting is missing
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

7 years agolib-smtp: server: Fix panic when io_remove() is called too late
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

7 years agolib-smtp: server: Fix infinite loop when client disconnects in initial state
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

7 years agoold-stats plugin: Rename stats_* settings to old_stats_*
Timo Sirainen [Mon, 18 Dec 2017 10:48:07 +0000 (12:48 +0200)] 
old-stats plugin: Rename stats_* settings to old_stats_*

7 years agoauth: Install stats plugin 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

7 years agolib: Fix using appended log prefixes for events when full prefix isn't replaced
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

7 years agolib: Fix using failure_context.log_prefix with internal log process communication
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

7 years agolog: Add "disable log prefix" flag to log lines
Timo Sirainen [Sun, 17 Dec 2017 18:38:38 +0000 (20:38 +0200)] 
log: Add "disable log prefix" flag to log lines

7 years agolib: Add event_send()
Timo Sirainen [Sun, 17 Dec 2017 18:35:58 +0000 (20:35 +0200)] 
lib: Add event_send()

7 years agolib: Rename event_send() to event_vsend()
Timo Sirainen [Sun, 17 Dec 2017 18:35:42 +0000 (20:35 +0200)] 
lib: Rename event_send() to event_vsend()

7 years agolmtp: local: Properly handle a user being over quota.
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.

7 years agolmtp: local: Make sure pending recipient is always destroyed.
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.

7 years agoconfigure: Switched version number to 2.4.devel
Timo Sirainen [Fri, 15 Dec 2017 17:05:58 +0000 (19:05 +0200)] 
configure: Switched version number to 2.4.devel

7 years agologin-proxy: Add back support for ssl_client_cert/key
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.

7 years agolib-ssl-iostream: If allow_invalid_cert=TRUE, skip verifying hostname
Timo Sirainen [Thu, 14 Dec 2017 20:59:30 +0000 (22:59 +0200)] 
lib-ssl-iostream: If allow_invalid_cert=TRUE, skip verifying hostname

7 years agolib-master: Fix master_service_ssl_settings_to_iostream_set() for client settings
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.

7 years agolib-http: Add http_client_init_private()
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.

7 years agolib-http: Change http_client_init() to use the global shared client context
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.

7 years agolib-http: Add http_client_get_global_context()
Timo Sirainen [Fri, 15 Dec 2017 12:08:20 +0000 (14:08 +0200)] 
lib-http: Add http_client_get_global_context()

7 years agolib: array_idx_modifiable changed not to allocate space.
Sergey Kitov [Thu, 7 Dec 2017 09:34:57 +0000 (11:34 +0200)] 
lib: array_idx_modifiable changed not to allocate space.

7 years agoglobal: Change calls to array_idx_modifiable to array_idx_get_space.
Sergey Kitov [Thu, 7 Dec 2017 09:00:50 +0000 (11:00 +0200)] 
global: Change calls to array_idx_modifiable to array_idx_get_space.

Only calls that require space allocation are to be changed.

7 years agolib: array_idx_get_space is defined as alias to array_idx_modifiable
Sergey Kitov [Thu, 7 Dec 2017 08:51:27 +0000 (10:51 +0200)] 
lib: array_idx_get_space is defined as alias to array_idx_modifiable

7 years agofts: Code cleanup
Timo Sirainen [Thu, 14 Dec 2017 19:49:08 +0000 (21:49 +0200)] 
fts: Code cleanup

7 years agofts: Don't try to retry parsing if indexing already fails
Timo Sirainen [Thu, 14 Dec 2017 19:42:45 +0000 (21:42 +0200)] 
fts: Don't try to retry parsing if indexing already fails

7 years agofts: Use consistent naming for retriable_err_msg
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

7 years agofts: Make sure may_need_retry is reset between attempts.
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.

7 years agofts: Add assert to make sure fts_parser.deinit() returns retriable_error_msg when...
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

7 years agofts: fts-parser-tika - Add assert to make sure retriable_error_msg is set
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

7 years agofts: fts-parser-script - Fix deinit return value
Timo Sirainen [Thu, 14 Dec 2017 19:25:14 +0000 (21:25 +0200)] 
fts: fts-parser-script - Fix deinit return value

7 years agofts: fts-parser-html - 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

7 years agofts: fts_parser_deinit() - Fix default return value
Timo Sirainen [Thu, 14 Dec 2017 19:53:14 +0000 (21:53 +0200)] 
fts: fts_parser_deinit() - Fix default return value