]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
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.

6 years agolib-lda: Initialize/deinitialize mail_deliver_context in separate functions.
Stephan Bosch [Wed, 27 Mar 2019 00:25:57 +0000 (01:25 +0100)] 
lib-lda: Initialize/deinitialize mail_deliver_context in separate functions.

This changes the allocation of parsed SMTP addresses to initially use a
datastack pool rather than the mail_deliver context pool. This is necessary
because the context is created a bit later. Upon mail_deliver_init(), the
addresses are moved to the context pool.

6 years agolda: Move mail_deliver() invocation to a separate function.
Stephan Bosch [Sun, 31 Mar 2019 14:14:06 +0000 (16:14 +0200)] 
lda: Move mail_deliver() invocation to a separate function.

6 years agolib-lda: mail-deliver - Split the mail_deliver() function to perform post-delivery...
Stephan Bosch [Mon, 4 Mar 2019 00:19:05 +0000 (01:19 +0100)] 
lib-lda: mail-deliver - Split the mail_deliver() function to perform post-delivery cleanup in one place.

6 years agolib-storage: Fix NO-FS-VALIDATION in mail_location
Timo Sirainen [Mon, 18 Mar 2019 22:02:06 +0000 (00:02 +0200)] 
lib-storage: Fix NO-FS-VALIDATION in mail_location

The setting wasn't being preserved properly, so it was just ignored.

6 years agolib: event_filter_unref(NULL) is already a no-op
Josef 'Jeff' Sipek [Thu, 14 Mar 2019 19:24:37 +0000 (15:24 -0400)] 
lib: event_filter_unref(NULL) is already a no-op

6 years agolib-http: Fix comment typo
Josef 'Jeff' Sipek [Wed, 27 Mar 2019 14:09:33 +0000 (16:09 +0200)] 
lib-http: Fix comment typo

6 years agodoveadm: Add body.preview as a fetch field
Michael Slusarz [Mon, 25 Mar 2019 17:58:00 +0000 (11:58 -0600)] 
doveadm: Add body.preview as a fetch field

Keep body.snippet as a fetch field for backward compatitibility reasons

6 years agoRFC has changed SHOULD length of preview from 100 to 200
Michael M Slusarz [Wed, 31 Oct 2018 00:28:49 +0000 (18:28 -0600)] 
RFC has changed SHOULD length of preview from 100 to 200

6 years agoRFC draft has changed from SNIPPET to PREVIEW
Michael M Slusarz [Wed, 31 Oct 2018 00:28:04 +0000 (18:28 -0600)] 
RFC draft has changed from SNIPPET to PREVIEW

The older SNIPPET command will remain for now - it is mostly the same
as the new PREVIEW code, so it's essentially an alias (the only
difference between the two versions is the SNIPPET/PREVIEW identifier
text).

6 years agodict: Remove unnecessary o_stream_flush()
Timo Sirainen [Tue, 2 Apr 2019 10:55:14 +0000 (13:55 +0300)] 
dict: Remove unnecessary o_stream_flush()

Added recently by 89e4b2e7fbd17548f3c99fa66368c9b0bc8eb775

6 years agodoveadm-dict: Add missing dict_deinit
Aki Tuomi [Sun, 31 Mar 2019 18:24:40 +0000 (21:24 +0300)] 
doveadm-dict: Add missing dict_deinit

Fixes event leak when set is missing parameter.

6 years agodict: Parse handshake using handshake_args
Aki Tuomi [Sun, 31 Mar 2019 14:01:36 +0000 (17:01 +0300)] 
dict: Parse handshake using handshake_args

This ensures the input is properly tab unescaped, also
simplifies the handshake function.

6 years agodict: Remove obsolete check as getenv() is no longer used for getting dicts
Aki Tuomi [Mon, 8 Oct 2018 08:51:41 +0000 (11:51 +0300)] 
dict: Remove obsolete check as getenv() is no longer used for getting dicts

6 years agodict: Use connection API
Aki Tuomi [Sun, 31 Mar 2019 13:54:28 +0000 (16:54 +0300)] 
dict: Use connection API

6 years agodict: Use connection struct
Aki Tuomi [Mon, 1 Apr 2019 09:10:10 +0000 (12:10 +0300)] 
dict: Use connection struct

Prepares for moving into connection API

6 years agodict: Create connection with struct master_connection instead of fd
Aki Tuomi [Mon, 1 Apr 2019 09:09:33 +0000 (12:09 +0300)] 
dict: Create connection with struct master_connection instead of fd

Prepares for moving into connection.c struct

6 years agofts: Fix buffer overflow when reading oversized fts header
Timo Sirainen [Tue, 5 Feb 2019 03:25:13 +0000 (19:25 -0800)] 
fts: Fix buffer overflow when reading oversized fts header

6 years agolib-storage: Fix buffer overflow when reading oversized hdr-pop3-uidl header
Timo Sirainen [Tue, 5 Feb 2019 03:23:02 +0000 (19:23 -0800)] 
lib-storage: Fix buffer overflow when reading oversized hdr-pop3-uidl header

6 years agofts: Add fts_enforced=body
Timo Sirainen [Sun, 20 May 2018 09:27:22 +0000 (12:27 +0300)] 
fts: Add fts_enforced=body

Similar to "no", this doesn't enforce FTS indexing for header searches.
Similar to "yes", on FTS lookup failure it won't fallback to reading all
mails.

6 years agosdbox: Add "sdbox" event category
Timo Sirainen [Wed, 27 Mar 2019 14:44:21 +0000 (16:44 +0200)] 
sdbox: Add "sdbox" event category

2cd16e24fb442a066c6c3051c1042c1091b927bb only added it to the "dbox" alias.

6 years agolmtp: Add mail_user_settings to struct client
Timo Sirainen [Thu, 14 Mar 2019 16:57:54 +0000 (18:57 +0200)] 
lmtp: Add mail_user_settings to struct client

6 years agolib-storage: Add mailbox_keywords_merge()
Timo Sirainen [Thu, 14 Mar 2019 16:58:14 +0000 (18:58 +0200)] 
lib-storage: Add mailbox_keywords_merge()

6 years agolib-storage: Add mailbox_search_mail_detach()
Timo Sirainen [Thu, 28 Feb 2019 13:10:59 +0000 (15:10 +0200)] 
lib-storage: Add mailbox_search_mail_detach()

This allows keeping the struct mail open even after the mail_search_context
that created it is freed.

6 years agolib-storage: Move tracking mails to mail_search_context from index-specific code
Timo Sirainen [Thu, 28 Feb 2019 13:03:22 +0000 (15:03 +0200)] 
lib-storage: Move tracking mails to mail_search_context from index-specific code

This makes the next commit much easier to implement.

6 years agolib-storage: Move index_mail.search_mail to mail_private struct
Timo Sirainen [Thu, 28 Feb 2019 13:08:38 +0000 (15:08 +0200)] 
lib-storage: Move index_mail.search_mail to mail_private struct

6 years agolib-mail: istream-header-filter: Fix HEADER_FILTER_ADD_MISSING_EOH with callback
Timo Sirainen [Mon, 18 Mar 2019 13:34:10 +0000 (15:34 +0200)] 
lib-mail: istream-header-filter: Fix HEADER_FILTER_ADD_MISSING_EOH with callback

If mail already had EOH and callback returned matched=TRUE in the EOH
callback (e.g. adding more headers), the callback was called a second
time for the EOH.

Currently there doesn't seem to be any existing code that was affected by
this bug.

6 years agolib: Add test for backtrace-string
Aki Tuomi [Thu, 14 Mar 2019 08:10:45 +0000 (10:10 +0200)] 
lib: Add test for backtrace-string

6 years agolib: Add libunwind support for getting backtrace
Aki Tuomi [Fri, 8 Mar 2019 11:38:56 +0000 (13:38 +0200)] 
lib: Add libunwind support for getting backtrace

This actually resolves symbols to readable names
making the backtrace useful.

6 years agoauth-request: Call auth_request_passdb_lookup_end() for all return paths of auth_requ...
Sergey Kitov [Fri, 22 Mar 2019 13:59:53 +0000 (15:59 +0200)] 
auth-request: Call auth_request_passdb_lookup_end() for all return paths of auth_request_handle_passdb_callback()

Fixes: Panic: file auth-request.c: line 367 (auth_request_unref):
assertion failed: (array_count(&request->authdb_event) == 0)
The panic happens when auth request results in PASSDB_RESULT_USER_DISABLED.

6 years agococcinelle: Add all semantic patches used in the past to a new dir
Josef 'Jeff' Sipek [Wed, 16 Jan 2019 13:58:15 +0000 (08:58 -0500)] 
coccinelle: Add all semantic patches used in the past to a new dir

This commit merely imports the semantic patches without providing any
additional tooling to apply them.  It also includes macros.h header used by
coccinelle to properly handle some of the more complex macros we have.

6 years agoauth: Make db_oauth2_callback debug print human readable
Martti Rannanjärvi [Fri, 22 Mar 2019 07:20:11 +0000 (09:20 +0200)] 
auth: Make db_oauth2_callback debug print human readable

6 years agolib-oauth2: Don't crash when http response has no payload
Martti Rannanjärvi [Fri, 22 Mar 2019 06:11:21 +0000 (08:11 +0200)] 
lib-oauth2: Don't crash when http response has no payload

6 years agoipc-server: Reconnect on socket input error.
Sergey Kitov [Thu, 21 Mar 2019 06:39:28 +0000 (08:39 +0200)] 
ipc-server: Reconnect on socket input error.

6 years agoipc-server: Change reconnect timeout to 10 seconds.
Sergey Kitov [Thu, 21 Mar 2019 13:29:20 +0000 (15:29 +0200)] 
ipc-server: Change reconnect timeout to 10 seconds.

6 years agoipc: Terminate IPC process with master.
Sergey Kitov [Thu, 21 Mar 2019 06:38:52 +0000 (08:38 +0200)] 
ipc: Terminate IPC process with master.

6 years agoipc: Introduce ipc_groups_disconnect_all()
Sergey Kitov [Thu, 21 Mar 2019 13:23:51 +0000 (15:23 +0200)] 
ipc: Introduce ipc_groups_disconnect_all()

6 years agolib-ssl-iostream: Minor assert cleanup.
Timo Sirainen [Tue, 4 Oct 2016 13:00:18 +0000 (16:00 +0300)] 
lib-ssl-iostream: Minor assert cleanup.

If stream->closed is TRUE then stream->stream_errno != 0 as well. And here
we really want to be sure that stream_errno isn't 0, so make the assert
reflect that.