]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
6 years agodoveadm-cmd: Add NOREPLICATE error code
Aki Tuomi [Tue, 28 May 2019 07:39:36 +0000 (10:39 +0300)] 
doveadm-cmd: Add NOREPLICATE error code

6 years agodoveadm-dsync: Set NOREPLICATE error code instead of returning it
Aki Tuomi [Tue, 28 May 2019 07:35:55 +0000 (10:35 +0300)] 
doveadm-dsync: Set NOREPLICATE error code instead of returning it

This is how the error handling is supposed to be done.

Broken in 7f0dcac9942910c2934ceab1230e539043167601

6 years agolib: istream-file - Ensure fd is in valid range
Aki Tuomi [Mon, 27 May 2019 09:56:29 +0000 (12:56 +0300)] 
lib: istream-file - Ensure fd is in valid range

6 years agolib: fd-util - Ensure fd is in valid range
Aki Tuomi [Mon, 27 May 2019 09:55:54 +0000 (12:55 +0300)] 
lib: fd-util - Ensure fd is in valid range

6 years agolib-http: Add http_client_request_add_missing_header()
Timo Sirainen [Mon, 27 May 2019 15:25:38 +0000 (18:25 +0300)] 
lib-http: Add http_client_request_add_missing_header()

6 years agolib-http: Add http_client_request_lookup_header()
Timo Sirainen [Mon, 27 May 2019 14:55:56 +0000 (17:55 +0300)] 
lib-http: Add http_client_request_lookup_header()

6 years agolib-http: http_client_request_remove_header() - Don't crash if no headers are added
Timo Sirainen [Mon, 27 May 2019 14:53:16 +0000 (17:53 +0300)] 
lib-http: http_client_request_remove_header() - Don't crash if no headers are added

Fixes a crash if http_client_request_add_header() hasn't been called
before http_client_request_remove_header()

6 years agolib-http: http_client_request_add_header() - Replace existing header
Timo Sirainen [Mon, 27 May 2019 14:47:16 +0000 (17:47 +0300)] 
lib-http: http_client_request_add_header() - Replace existing header

If header with the same key already exists, just replace the value.
HTTP supports having multiple headers with the same key only when they
can be rewritten into a single comma-separated header. So practically
there's no reason for lib-http to need to support adding multiple
headers. Replacing an existing value is more useful generally.

6 years agolib-http: http_client_request_remove_header() - split off header finding
Timo Sirainen [Mon, 27 May 2019 14:46:37 +0000 (17:46 +0300)] 
lib-http: http_client_request_remove_header() - split off header finding

6 years agolib-http: Add Unit test for http_client_request_add/remove_header()
Timo Sirainen [Mon, 27 May 2019 13:13:28 +0000 (16:13 +0300)] 
lib-http: Add Unit test for http_client_request_add/remove_header()

6 years agodoveadm service status: Handle VERSION handshake line properly
Timo Sirainen [Fri, 24 May 2019 11:49:59 +0000 (14:49 +0300)] 
doveadm service status: Handle VERSION handshake line properly

It was thought to be part of the command response, which caused somewhat
broken replies. Broken by 5c1267b97367b666bd24e6aadfd85ad3902a5b05

6 years agolib-dict: dict-sql - Add username as parameter
Aki Tuomi [Fri, 19 Apr 2019 17:39:32 +0000 (20:39 +0300)] 
lib-dict: dict-sql - Add username as parameter

SQL statement caching works better when the username is provided
as parameter instead of part of the query, since the caching
can now cache same statements despite username changes.

6 years agolib-dns: Remove unused Valgrind disable
Martti Rannanjärvi [Thu, 27 Dec 2018 09:55:31 +0000 (11:55 +0200)] 
lib-dns: Remove unused Valgrind disable

6 years agolib: Add test-fd-util.c to test i_close() panic message
Martti Rannanjärvi [Thu, 23 May 2019 15:49:18 +0000 (18:49 +0300)] 
lib: Add test-fd-util.c to test i_close() panic message

6 years agocassandra: Handle cass_future_set_callback() calling callback immediately
Timo Sirainen [Mon, 20 May 2019 11:16:52 +0000 (14:16 +0300)] 
cassandra: Handle cass_future_set_callback() calling callback immediately

The previous code always assumed it would be called from another thread, but
due to race conditions this wasn't true always. The lookup could have
already finished by the time cass_future_set_callback() was called, in which
case it called the callback immediately.

If the callback was called from the main thread, it still wrote to the
fd_pipe. Because this was a blocking write, it was possible that the pipe
ended becoming full, which caused the whole dict process to hang.

6 years agocassandra: Move cassandra_callback_run() earlier
Timo Sirainen [Mon, 20 May 2019 11:16:08 +0000 (14:16 +0300)] 
cassandra: Move cassandra_callback_run() earlier

Simplifies the next commit.

6 years agolib: test-event-flatten - Fix initializators for value
Aki Tuomi [Wed, 22 May 2019 06:12:08 +0000 (09:12 +0300)] 
lib: test-event-flatten - Fix initializators for value

Older gcc complains about using anonymous members directly,
so instead use nested braces. This fixes the issue.

Continues fix in ae3c9db544c40367cded872a5f46dbd6abc8cd78

6 years agolib: Add initializers to test-event-flatten
Martti Rannanjärvi [Tue, 21 May 2019 10:16:52 +0000 (13:16 +0300)] 
lib: Add initializers to test-event-flatten

This is to fix a compiler warning.

6 years agolib: ostream-file - Use TCP_NODELAY when uncorking, not corking
Timo Sirainen [Mon, 20 May 2019 13:33:30 +0000 (16:33 +0300)] 
lib: ostream-file - Use TCP_NODELAY when uncorking, not corking

6 years agolib: ostream-file - Don't try to set TCP options after stream is closed
Timo Sirainen [Mon, 20 May 2019 20:46:43 +0000 (23:46 +0300)] 
lib: ostream-file - Don't try to set TCP options after stream is closed

Flushing the buffer could close the stream and the fd.

6 years agostats: event export - Add tabescaped plain text format support
Josef 'Jeff' Sipek [Thu, 4 Apr 2019 11:25:45 +0000 (14:25 +0300)] 
stats: event export - Add tabescaped plain text format support

This commit adds support for format=tab-text.

Since we don't care to select a native timestamp data type, one must specify
exactly one time-* format_args token.

6 years agostats: event export - Add http-post transport support
Josef 'Jeff' Sipek [Thu, 4 Apr 2019 11:24:50 +0000 (14:24 +0300)] 
stats: event export - Add http-post transport support

This commit adds support for transport=http-post.

The value of transport_args is used as the HTTP POST URL.

6 years agostats: event export - Add log transport support
Josef 'Jeff' Sipek [Thu, 4 Apr 2019 11:24:24 +0000 (14:24 +0300)] 
stats: event export - Add log transport support

This commit adds support for transport=log.

The log transport ignores transport_args.

6 years agostats: event export - Add json format support
Josef 'Jeff' Sipek [Thu, 4 Apr 2019 11:23:41 +0000 (14:23 +0300)] 
stats: event export - Add json format support

This commit adds support for format=json.

Since JSON doesn't have a native timestamp data type, one must specify
exactly one time-* format_args token.

6 years agostats: event export - Implement core functionality
Josef 'Jeff' Sipek [Fri, 19 Apr 2019 13:48:26 +0000 (09:48 -0400)] 
stats: event export - Implement core functionality

The core event exporter feature.  It extends the metric { } config blocks
and adds new event_exporter { } blocks.

event_exporter EXNAME {
        format = FMT                    # required, see below
        format_args = FMTARGS           # optional, see below
        transport = TRANSPORT           # required, see below
        transport_args = TRANSPORTARGS  # optional, see below
}
metric METNAME {
        ... normal metric fields ...
        exporter = EXNAME        # required to make export happen
        exporter_include = INCS  # optional, see below
}

FMT is a string identifying which format to serialize the event into. As of
this commit, the only valid value is "none" (always the empty string).

FMTARGS is a set of tokens that tweak how certain data types are encoded. If
not specified, the format's default is used ("none" always emits empty strings
so it doesn't care what this is set to, future formats will make use of this
setting).  Currently the only possible tokens are: "time-rfc3339" and
"time-unix" - as their names imply, they format all timestamps as either
RFC3339 or Unix-style seconds since 1970-01-01 00:00:00 UTC.

TRANSPORT is a string identifying how to transport the serialized event. As
of this commit, the only valid value is "drop" which simply drops the event.

TRANSPORTARGS is a string used by the transport to tweak its behavior. The
drop transport ignores the args.

INCS is a string made up of tokens ("name", "hostname", "timestamps",
"categories", and "fields") which control what parts of an event are
exported. It can be set to any set of those (including empty set) and the
order doesn't matter.  It defaults to all 5 tokens.

6 years agolib-master: Use event_minimize() to simplify the event before sending to stats
Josef 'Jeff' Sipek [Mon, 1 Apr 2019 12:52:04 +0000 (15:52 +0300)] 
lib-master: Use event_minimize() to simplify the event before sending to stats

6 years agolib: Add event_minimize()
Josef 'Jeff' Sipek [Mon, 1 Apr 2019 10:23:41 +0000 (13:23 +0300)] 
lib: Add event_minimize()

At times, we want to simplify the structure of events before sending them to
the stats process thereby minimizing the amount of data transfered and the
amount of work the stats process has to do.  This simplification before
sending allows us to incur the CPU penalty in the (many) sending processes
instead of in the (sole & single-threaded) stats process.

Unlike the code in lib-master, this implementation flattens part of the
parent chain backwards so that parents' fields are properly overridden by
their children.  It exists in lib because it shares code with the recently
added event_flatten().

6 years agolib-master: Fix event stats test compare function arg order
Josef 'Jeff' Sipek [Thu, 11 Apr 2019 21:31:34 +0000 (17:31 -0400)] 
lib-master: Fix event stats test compare function arg order

The arguments were backwards.

6 years agolib: Move event filter test's event categories from stack to .data
Josef 'Jeff' Sipek [Tue, 16 Apr 2019 22:45:21 +0000 (18:45 -0400)] 
lib: Move event filter test's event categories from stack to .data

Event categories must not be allocated on the stack.  Categories must be
accessible for the duration of the program runtime.

6 years agostats: Rename stats filter to indicate what it is for
Josef 'Jeff' Sipek [Thu, 7 Mar 2019 17:58:35 +0000 (12:58 -0500)] 
stats: Rename stats filter to indicate what it is for

This makes the next commit a little cleaner.

6 years agolib-master: Add a comment clarifying when events must be sent to stats
Josef 'Jeff' Sipek [Fri, 19 Apr 2019 13:50:53 +0000 (09:50 -0400)] 
lib-master: Add a comment clarifying when events must be sent to stats

6 years agolib-master: minor refactor of stats_client_send_event()
Josef 'Jeff' Sipek [Fri, 15 Mar 2019 01:19:59 +0000 (21:19 -0400)] 
lib-master: minor refactor of stats_client_send_event()

This makes later event exporting commits cleaner.

6 years agolib: Add event_flatten() to return a flattened event
Josef 'Jeff' Sipek [Fri, 15 Mar 2019 00:30:29 +0000 (20:30 -0400)] 
lib: Add event_flatten() to return a flattened event

6 years agolib: replace event_copy_categories_fields() into two
Josef 'Jeff' Sipek [Fri, 15 Mar 2019 00:21:15 +0000 (20:21 -0400)] 
lib: replace event_copy_categories_fields() into two

It is more flexible to allow to copy only categories or only fields.

6 years agolib: fixup str_append_tabescaped()'s { placement
Josef 'Jeff' Sipek [Fri, 3 May 2019 14:30:39 +0000 (10:30 -0400)] 
lib: fixup str_append_tabescaped()'s { placement

This makes it consistent with the rest of the file.

6 years agolib: ostream-file - Ignore ENOPROTOOPT error also when setting TCP_NODELAY
Timo Sirainen [Fri, 17 May 2019 13:13:17 +0000 (16:13 +0300)] 
lib: ostream-file - Ignore ENOPROTOOPT error also when setting TCP_NODELAY

This happens in some OSes.

6 years agolib: ostream-file - Don't use TCP_CORK or TCP_NODELAY for UNIX sockets
Timo Sirainen [Fri, 17 May 2019 13:12:24 +0000 (16:12 +0300)] 
lib: ostream-file - Don't use TCP_CORK or TCP_NODELAY for UNIX sockets

Either they fail or just don't do anything.

6 years agovirtual: Fix calling mail_add_temp_wanted_fields() before mail is set
Timo Sirainen [Fri, 27 Apr 2018 11:26:46 +0000 (14:26 +0300)] 
virtual: Fix calling mail_add_temp_wanted_fields() before mail is set

Fixes:
Panic: file virtual-mail.c: line 123 (backend_mail_get): assertion failed: (bbox != NULL)

6 years agovirtual: Fix mail.add_temp_wanted_fields() to handle headers correctly
Timo Sirainen [Fri, 27 Apr 2018 10:56:13 +0000 (13:56 +0300)] 
virtual: Fix mail.add_temp_wanted_fields() to handle headers correctly

The header that was passed to backend contained wrong index numbers, causing
wrong headers to be used.

6 years agolib-storage: Update mail_add_temp_wanted_fields() comment
Timo Sirainen [Fri, 27 Apr 2018 10:52:28 +0000 (13:52 +0300)] 
lib-storage: Update mail_add_temp_wanted_fields() comment

6 years agolib-storage: Move code to a new mailbox_header_lookup_merge()
Timo Sirainen [Fri, 27 Apr 2018 10:49:53 +0000 (13:49 +0300)] 
lib-storage: Move code to a new mailbox_header_lookup_merge()

6 years agolib: ostream-file - Don't try to set TCP_NODELAY for non-socket fds
Timo Sirainen [Wed, 15 May 2019 07:25:47 +0000 (10:25 +0300)] 
lib: ostream-file - Don't try to set TCP_NODELAY for non-socket fds

Also log if there are any unexpected errors.

6 years agolib-storage: Don't try to set attachment keywords if bodystructure wasn't parsed
Aki Tuomi [Wed, 15 May 2019 07:49:09 +0000 (10:49 +0300)] 
lib-storage: Don't try to set attachment keywords if bodystructure wasn't parsed

This was broken in 057028e3f5567e21c964005ffccda1055fa86508 as there are
code paths leading here that omit bodystructure processing.

Fixes Panic: file index-mail.c: line 1150 (index_mail_parse_body_finish): assertion failed: (mail->data.parsed_bodystructure)

6 years agolib: Make sure uncorking ostream-file flushes network output immediately
Timo Sirainen [Fri, 10 May 2019 15:06:46 +0000 (18:06 +0300)] 
lib: Make sure uncorking ostream-file flushes network output immediately

TCP_CORK and TCP_NODELAY are separate things, but we'll treat them similarly
for our ostream corking API. It was always intended that all data written
inside corking would be delayed until uncork, and immediately sent
afterwards.

This change removes unnecessary extra 40ms delays, which may happen when
proxying.

6 years agodoveadm: Add error_r to server_connection_create()
Martti Rannanjärvi [Mon, 13 May 2019 13:16:43 +0000 (16:16 +0300)] 
doveadm: Add error_r to server_connection_create()

6 years agolib: i_zero*() - Update comment, especially about arrays
Timo Sirainen [Mon, 13 May 2019 13:03:27 +0000 (16:03 +0300)] 
lib: i_zero*() - Update comment, especially about arrays

6 years agolib: i_zero*() - Remove extra "+"
Timo Sirainen [Mon, 13 May 2019 12:57:26 +0000 (15:57 +0300)] 
lib: i_zero*() - Remove extra "+"

It was ignored by compilers though.

6 years agodoveadm-dsync: Always cleanup after connection
Aki Tuomi [Fri, 10 May 2019 12:55:22 +0000 (15:55 +0300)] 
doveadm-dsync: Always cleanup after connection

Go through the same error handling path every time. Fixes
Panic: file ioloop.c: line 826 (io_loop_destroy): assertion failed: (ioloop == current_ioloop)

This happened because the ioloop wasn't destroyed
on error.

6 years agodoveadm-dsync: Move actual command execution to dsync_server_run_command
Aki Tuomi [Fri, 10 May 2019 12:54:37 +0000 (15:54 +0300)] 
doveadm-dsync: Move actual command execution to dsync_server_run_command

Simplifies next commit

6 years agolib-storage: Attachment flag detection shouldn't cause mail body to be opened
Timo Sirainen [Fri, 10 May 2019 16:16:07 +0000 (19:16 +0300)] 
lib-storage: Attachment flag detection shouldn't cause mail body to be opened

Fetching cached mail headers with
mail_attachment_detection_options=add-flags-on-save caued IMAP BODYSTRUCTURE
to be fetched as well. If it wasn't already cached, this caused opening the
mail body to generate it. Also the result wasn't added to cache, so the
inefficient behavior continued.

6 years agoglobal: Add asserts to make static analyzers happy
Timo Sirainen [Thu, 9 May 2019 16:52:51 +0000 (19:52 +0300)] 
global: Add asserts to make static analyzers happy

6 years agodoveadm dict: Make it clear that *iter_flags can't dereference NULL pointer
Timo Sirainen [Thu, 9 May 2019 16:48:43 +0000 (19:48 +0300)] 
doveadm dict: Make it clear that *iter_flags can't dereference NULL pointer

It's not possible to dereference it anyway, because only "doveadm dict iter"
has these iter parameters. This change fixes warnings from static analyzers.

6 years agolib-storage: Fix mail_user_home_mkdir() crash when user has no home directory
Timo Sirainen [Thu, 9 May 2019 16:27:18 +0000 (19:27 +0300)] 
lib-storage: Fix mail_user_home_mkdir() crash when user has no home directory

This is used only by dsync when creating lock file. It wouldn't work
without a home directory anyway.

6 years agolib: net_*() - Make sure sockaddr_union is always cleared
Timo Sirainen [Thu, 9 May 2019 16:22:28 +0000 (19:22 +0300)] 
lib: net_*() - Make sure sockaddr_union is always cleared

Fixes scan-build warnings

6 years agolib: data-stack - Make STACK_BLOCK_DATA() behavior clearer
Timo Sirainen [Thu, 9 May 2019 16:19:42 +0000 (19:19 +0300)] 
lib: data-stack - Make STACK_BLOCK_DATA() behavior clearer

Otherwise scan-build thinks that it's pointing outside valid memory in the
struct and gives an error:

"Memory set function accesses out-of-bound array element"

6 years agoglobal: Change CALLBACK_TYPECHECK() to used with subtraction
Timo Sirainen [Thu, 9 May 2019 12:29:34 +0000 (15:29 +0300)] 
global: Change CALLBACK_TYPECHECK() to used with subtraction

This is because clang's -Wstring-plus-int gave warnings when using
"string" + CALLBACK_TYPECHECK(), but there are no warnings when using
"string" - CALLBACK_TYPECHECK(). It would have been enough to change
only the string parameters to use "-", but for consistency this commit
changes all of them.

6 years agodict: Make sure connection IO is stopped when client is disconnected
Timo Sirainen [Fri, 10 May 2019 14:45:14 +0000 (17:45 +0300)] 
dict: Make sure connection IO is stopped when client is disconnected

I'm not sure if this fixes anything, but it makes the behavior closer to
what it was before 2ff2da52146609f4459bd0f7fd603e13400cb85e.

6 years agodict: Fix client connection reference counting
Timo Sirainen [Fri, 10 May 2019 14:44:04 +0000 (17:44 +0300)] 
dict: Fix client connection reference counting

If the client disconnected while commands were still running, the destroy
callback could have been called multiple times.

Broken by 2ff2da52146609f4459bd0f7fd603e13400cb85e

Fixes:
Panic: file dict-connection.c: line 149 (dict_connection_unref): assertion failed: (array_count(&conn->cmds) == 0)

6 years agoquota: Enable program-client debug when mail_debug is enabled
Aki Tuomi [Wed, 8 May 2019 09:46:48 +0000 (12:46 +0300)] 
quota: Enable program-client debug when mail_debug is enabled

Makes it easier to see that program-client actually
executed a warning script.

6 years agoquota: Do not skip noenforcing and auto_update quota roots when intializing
Aki Tuomi [Fri, 7 Dec 2018 07:19:08 +0000 (09:19 +0200)] 
quota: Do not skip noenforcing and auto_update quota roots when intializing

Doing so will break quota warnings.

6 years agoquota: Do not set limits to infinity when not enforcing
Aki Tuomi [Fri, 7 Dec 2018 07:14:25 +0000 (09:14 +0200)] 
quota: Do not set limits to infinity when not enforcing

Fixes quota enforcement to work even if secondary quota
is noenforcing.

6 years agolib: connection - Make sure the connection name is always available.
Stephan Bosch [Thu, 28 Mar 2019 20:41:53 +0000 (21:41 +0100)] 
lib: connection - Make sure the connection name is always available.

6 years agolib-storage: maildir: maildir-copy - Fix omission of keywords while copying message...
Stephan Bosch [Fri, 11 Jan 2019 13:33:59 +0000 (14:33 +0100)] 
lib-storage: maildir: maildir-copy - Fix omission of keywords while copying message with hardlinking.

6 years agolib-storage: maildir: maildir-save - Move final copying of keywords to a separate...
Stephan Bosch [Fri, 11 Jan 2019 13:16:39 +0000 (14:16 +0100)] 
lib-storage: maildir: maildir-save - Move final copying of keywords to a separate function.

6 years agosubmission: Remove unnecessary client.session_id
Timo Sirainen [Wed, 8 May 2019 09:42:09 +0000 (12:42 +0300)] 
submission: Remove unnecessary client.session_id

It's also available in client.user.session_id

6 years agosubmission: Remove duplicate %{session} from submission_logout_format handling
Timo Sirainen [Wed, 8 May 2019 09:41:13 +0000 (12:41 +0300)] 
submission: Remove duplicate %{session} from submission_logout_format handling

It already comes from mail_user_var_expand_table()

6 years agopop3: Remove unnecessary client.session_id
Timo Sirainen [Wed, 8 May 2019 09:37:41 +0000 (12:37 +0300)] 
pop3: Remove unnecessary client.session_id

It's also available in client.user.session_id

6 years agopop3: Remove duplicate %{session} from pop3_logout_format handling
Timo Sirainen [Wed, 8 May 2019 09:35:51 +0000 (12:35 +0300)] 
pop3: Remove duplicate %{session} from pop3_logout_format handling

It already comes from mail_user_var_expand_table()

6 years agologin-common: Add a comment to remember to keep login %variables synced
Timo Sirainen [Wed, 8 May 2019 09:30:25 +0000 (12:30 +0300)] 
login-common: Add a comment to remember to keep login %variables synced

6 years agopop3: Remove duplicate %d from pop3_logout_format handling
Timo Sirainen [Wed, 8 May 2019 09:25:39 +0000 (12:25 +0300)] 
pop3: Remove duplicate %d from pop3_logout_format handling

The first %d was always used as intended, so this didn't actually cause any
bugs. It was confusing though.

6 years agolib: event-log - Add support for logging with log_type as a parameter.
Stephan Bosch [Sun, 10 Mar 2019 22:09:46 +0000 (23:09 +0100)] 
lib: event-log - Add support for logging with log_type as a parameter.

6 years agoNEWS: Add news for 2.3.6
Aki Tuomi [Mon, 29 Apr 2019 06:01:44 +0000 (09:01 +0300)] 
NEWS: Add news for 2.3.6

6 years agofts-solr: Add soft_commit setting
John Fawcett [Wed, 24 Apr 2019 07:37:55 +0000 (10:37 +0300)] 
fts-solr: Add soft_commit setting

soft_commit=yes|no: send softCommit to the solr server, default yes is backwards compatible behaviour
If setting to no autoSoftCommit on solr should be set to something reasonable (e.g. 60 seconds)
in file solrconfig.xml

6 years agofts-solr: Add batch_size configuration option
John Fawcett [Wed, 24 Apr 2019 07:34:49 +0000 (10:34 +0300)] 
fts-solr: Add batch_size configuration option

batch_size: configure the number of emails sent in single requests to solr, default 1000

6 years agofts-solr: Only increment ctx->mails_since_flush after flush
Aki Tuomi [Mon, 29 Apr 2019 11:07:19 +0000 (14:07 +0300)] 
fts-solr: Only increment ctx->mails_since_flush after flush

Otherwise it gets wrongly increment before flush.

6 years agolib-http: client: Fix segfault occurring when an idle host times out.
Stephan Bosch [Tue, 29 Jan 2019 21:16:26 +0000 (22:16 +0100)] 
lib-http: client: Fix segfault occurring when an idle host times out.

This is most visible when the host is associated with an invalid host name: in
that case the idle timeout is only 100ms. For valid hosts, this problem can only
appear after 30 minutes idle time (default).

Problem is caused by the session host object starting a new idle timeout in the
shared host, while the shared and session host objects are both being destroyed.

6 years agofts: Enable turkish support
Aki Tuomi [Mon, 29 Apr 2019 10:09:02 +0000 (13:09 +0300)] 
fts: Enable turkish support

6 years agofts: Include turkish stopwords
Aki Tuomi [Mon, 29 Apr 2019 10:08:34 +0000 (13:08 +0300)] 
fts: Include turkish stopwords

Source https://github.com/stopwords-iso/stopwords-tr/

6 years agolib: json - Escape invalid UTF-8 as unicode bytes
Aki Tuomi [Tue, 2 Apr 2019 10:09:48 +0000 (13:09 +0300)] 
lib: json - Escape invalid UTF-8 as unicode bytes

This prevents dovecot from crashing if invalid UTF-8 input
is given.

6 years agomail-lua: Handle transaction commit error writing metadata
Aki Tuomi [Thu, 25 Apr 2019 07:23:12 +0000 (10:23 +0300)] 
mail-lua: Handle transaction commit error writing metadata

6 years agolib-smtp: smtp-server-cmd-auth - Fix AUTH response error handling so that it stops...
Stephan Bosch [Thu, 25 Apr 2019 07:51:32 +0000 (09:51 +0200)] 
lib-smtp: smtp-server-cmd-auth - Fix AUTH response error handling so that it stops reading more input.

Otherwise, it may try to read more data from the stream as the next AUTH
response, which causes an assert crash in the command parser later on. Even when
the parser finds no input from the stream, it will advance its state
towards AUTH response parsing, which is a problem when the next command is
subsequently being parsed.

Panic was:

Panic: file smtp-command-parser.c: line 438 (smtp_command_parse_next): assertion failed: (!parser->auth_response || parser->state.state == SMTP_COMMAND_PARSE_STATE_INIT || parser->state.state == SMTP_COMMAND_PARSE_STATE_ERROR)

6 years agosubmission-login: client-authenticate - Fix crash occurring when client disconnects...
Stephan Bosch [Tue, 12 Mar 2019 02:18:33 +0000 (03:18 +0100)] 
submission-login: client-authenticate - Fix crash occurring when client disconnects during authentication.

6 years agosubmission-login: Remove unused client->pending_starttls.
Stephan Bosch [Mon, 22 Apr 2019 22:13:46 +0000 (00:13 +0200)] 
submission-login: Remove unused client->pending_starttls.

6 years agolib-lua: Fix bracing in table helper macros
Aki Tuomi [Wed, 24 Apr 2019 13:33:45 +0000 (16:33 +0300)] 
lib-lua: Fix bracing in table helper macros

Was left broken in c304bc76

6 years agomail-lua: Implement mailbox metadata API
Aki Tuomi [Tue, 16 Apr 2019 08:42:56 +0000 (11:42 +0300)] 
mail-lua: Implement mailbox metadata API

Adds methods for accessing and manipulating mailbox metadata

 * user:metadata_get("key", "key", ..) - returns value for keys
 * user:metadata_set("key", "value") - sets value for key
 * user:metadata_unset("key", "value") - unsets key
 * user:metadata_list("prefix", "prefix", ...) - lists keys in dict for prefixes

 * mailbox:metadata_get("key", "key", ..) - returns value for keys
 * mailbox:metadata_set("key", "value") - sets value for key
 * mailbox:metadata_unset("key", "value") - unsets key
 * mailbox:metadata_list("prefix", "prefix", ...) - lists keys in dict for prefixes

User metadata is stored under /(private|shared)/vendor/vendor.dovecot/pvt/server to
mailbox INBOX, and is accessible with mailbox metadata methods with INBOX.

Also mail lua exports constants to simplify usage

dovecot.storage.MAILBOX_ATTRIBUTE_PREFIX_DOVECOT
"vendor/vendor.dovecot/"
dovecot.storage.MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT
"vendor/vendor.dovecot/pvt/"
dovecot.storage.MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER
"vendor/vendor.dovecot/pvt/server/"

6 years agomail-lua: Properly refcount user object
Aki Tuomi [Wed, 17 Apr 2019 10:20:58 +0000 (13:20 +0300)] 
mail-lua: Properly refcount user object

Prevents user object from going away unexpectedly, and makes
sure it gets released correctly.

6 years agomail-lua: Use userdata for mailbox pointer
Aki Tuomi [Wed, 17 Apr 2019 10:12:05 +0000 (13:12 +0300)] 
mail-lua: Use userdata for mailbox pointer

Makes it possible to unref mailbox on exit

6 years agolib-lua: Fix assigment helper macros
Aki Tuomi [Mon, 15 Apr 2019 10:02:11 +0000 (13:02 +0300)] 
lib-lua: Fix assigment helper macros

The macro names were conflicting with the table values.

6 years agoNEWS: Update news with missing entries from other branches
Aki Tuomi [Fri, 12 Apr 2019 14:57:32 +0000 (17:57 +0300)] 
NEWS: Update news with missing entries from other branches

6 years agolib-lda: mail-deliver - Emit events at start and finish of delivery.
Stephan Bosch [Tue, 12 Mar 2019 22:23:35 +0000 (23:23 +0100)] 
lib-lda: mail-deliver - Emit events at start and finish of delivery.

6 years agolib-lda: Replace i_warning() with e_warning().
Stephan Bosch [Sun, 10 Mar 2019 12:08:34 +0000 (13:08 +0100)] 
lib-lda: Replace i_warning() with e_warning().

6 years agolib-lda: Replace i_info() with e_info().
Stephan Bosch [Sun, 10 Mar 2019 12:01:08 +0000 (13:01 +0100)] 
lib-lda: Replace i_info() with e_info().

6 years agolib-lda: Replace i_error() with e_error().
Stephan Bosch [Sun, 10 Mar 2019 11:58:03 +0000 (12:58 +0100)] 
lib-lda: Replace i_error() with e_error().

6 years agolib-lda: mail-deliver - Add message fields to the deliver event.
Stephan Bosch [Sun, 10 Mar 2019 09:53:51 +0000 (10:53 +0100)] 
lib-lda: mail-deliver - Add message fields to the deliver event.

6 years agolib-lda: mail-deliver - Rename mail_deliver_cache to mail_deliver_fields.
Stephan Bosch [Sun, 10 Mar 2019 11:13:10 +0000 (12:13 +0100)] 
lib-lda: mail-deliver - Rename mail_deliver_cache to mail_deliver_fields.

Also make the fields public.

6 years agolda: Use LDA event as mail_*user's parent event.
Stephan Bosch [Mon, 4 Mar 2019 00:15:47 +0000 (01:15 +0100)] 
lda: Use LDA event as mail_*user's parent event.

6 years agolda: Add support for event API.
Stephan Bosch [Mon, 4 Mar 2019 00:12:55 +0000 (01:12 +0100)] 
lda: Add support for event API.

6 years agolda: Assign envelope fields in mail deliver context right away.
Stephan Bosch [Mon, 4 Mar 2019 00:08:21 +0000 (01:08 +0100)] 
lda: Assign envelope fields in mail deliver context right away.

6 years agolmtp: lmtp-local - Use recipient event for mail delivery.
Stephan Bosch [Sun, 3 Mar 2019 23:30:27 +0000 (00:30 +0100)] 
lmtp: lmtp-local - Use recipient event for mail delivery.

6 years agolib-lda: mail-deliver - Add support for event API.
Stephan Bosch [Sun, 3 Mar 2019 23:28:42 +0000 (00:28 +0100)] 
lib-lda: mail-deliver - Add support for event API.