]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
4 years agoauth: db-lua - Make auth_lua_export_table() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 22:31:59 +0000 (17:31 -0500)] 
auth: db-lua - Make auth_lua_export_table() take lua_State * directly

4 years agoauth: db-lua - Make auth_lua_push_auth_request() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 22:30:38 +0000 (17:30 -0500)] 
auth: db-lua - Make auth_lua_push_auth_request() take lua_State * directly

4 years agoauth: db-lua - Make lua methods and functions use the passed in lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 21:53:08 +0000 (16:53 -0500)] 
auth: db-lua - Make lua methods and functions use the passed in lua_State * directly

4 years agoauth: db-lua - Make auth_lua_check_auth_request() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 21:50:50 +0000 (16:50 -0500)] 
auth: db-lua - Make auth_lua_check_auth_request() take lua_State * directly

4 years agolib-lua: Use dlua_register()
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 21:43:19 +0000 (16:43 -0500)] 
lib-lua: Use dlua_register()

4 years agolib-lua: Add dlua_register()
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 21:41:21 +0000 (16:41 -0500)] 
lib-lua: Add dlua_register()

4 years agolib-storage: Make lua methods and functions use the passed in lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 00:54:10 +0000 (19:54 -0500)] 
lib-storage: Make lua methods and functions use the passed in lua_State * directly

4 years agolib-storage: Make lua_storage_mail_user_set_metadata_unset() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 01:01:30 +0000 (20:01 -0500)] 
lib-storage: Make lua_storage_mail_user_set_metadata_unset() take lua_State * directly

4 years agolib-storage: Make lua_check_storage_mail_user() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 00:59:13 +0000 (19:59 -0500)] 
lib-storage: Make lua_check_storage_mail_user() take lua_State * directly

4 years agolib-storage: Make lua_check_storage_mail() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 00:51:57 +0000 (19:51 -0500)] 
lib-storage: Make lua_check_storage_mail() take lua_State * directly

4 years agolib-lua: Make dlua_dump_stack() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 18:07:52 +0000 (13:07 -0500)] 
lib-lua: Make dlua_dump_stack() take lua_State * directly

4 years agolib-lua: Move dlua_dump_stack() prototype to private header
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 18:06:57 +0000 (13:06 -0500)] 
lib-lua: Move dlua_dump_stack() prototype to private header

4 years agolib-lua: Make dlua_check_event() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 18:00:10 +0000 (13:00 -0500)] 
lib-lua: Make dlua_check_event() take lua_State * directly

4 years agolib-lua: Make dlua_push_event() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 18:00:00 +0000 (13:00 -0500)] 
lib-lua: Make dlua_push_event() take lua_State * directly

4 years agolib-lua: Move dlua_{check,push}_event() prototypes to private header
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 17:57:26 +0000 (12:57 -0500)] 
lib-lua: Move dlua_{check,push}_event() prototypes to private header

4 years agolib-lua: Make dlua_getdovecot() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 17:55:25 +0000 (12:55 -0500)] 
lib-lua: Make dlua_getdovecot() take lua_State * directly

4 years agolib-lua: Make dlua_setmembers() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 17:53:44 +0000 (12:53 -0500)] 
lib-lua: Make dlua_setmembers() take lua_State * directly

4 years agolib-lua: Make lua methods and functions use the passed in lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 00:23:13 +0000 (19:23 -0500)] 
lib-lua: Make lua methods and functions use the passed in lua_State * directly

4 years agolib-lua: Make dlua_push_event_passthrough() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 00:33:55 +0000 (19:33 -0500)] 
lib-lua: Make dlua_push_event_passthrough() take lua_State * directly

4 years agolib-lua: Make dlua_check_event_passthrough() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 00:32:19 +0000 (19:32 -0500)] 
lib-lua: Make dlua_check_event_passthrough() take lua_State * directly

4 years agolib-lua: Make dlua_event_log() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 00:18:33 +0000 (19:18 -0500)] 
lib-lua: Make dlua_event_log() take lua_State * directly

4 years agolib-lua: Make dlua_get_file_line() take lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 00:16:44 +0000 (19:16 -0500)] 
lib-lua: Make dlua_get_file_line() take lua_State * directly

4 years agolib-lua: Make DLUA_REQUIRE_ARGS*() take the lua_State * directly
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 00:05:04 +0000 (19:05 -0500)] 
lib-lua: Make DLUA_REQUIRE_ARGS*() take the lua_State * directly

This is the first in a series of commits that convert a number of functions
to pass around the lua_State pointer directly and to use it instead of using
the lua_State pointed to by the struct dlua_script.

This change is needed to eventually support the 'yield' functionality and
"sequential looking, but async behind the scenes" lua scripts.  To support
this, the C code needs to instantiate multiple lua_States and then operate
on the correct one - whichever one is passed back by the lua runtime.  This
lays the ground work for that.

4 years agoimap: test-imap-client-hibernate - Remove dead assignment
Timo Sirainen [Wed, 13 Jan 2021 10:54:09 +0000 (12:54 +0200)] 
imap: test-imap-client-hibernate - Remove dead assignment

4 years agoutil: dovecot-sysreport: Use "uname -n" instead of "hostname" for portability
Geert Hendrickx [Fri, 9 Oct 2020 19:07:40 +0000 (21:07 +0200)] 
util: dovecot-sysreport: Use "uname -n" instead of "hostname" for portability

hostname is not defined by POSIX, so not guaranteed to work.

4 years agolib-mail: mail-html2text: HTML entity lookup must be case-sensitive
Siavash Tavakoli [Wed, 23 Dec 2020 12:50:33 +0000 (12:50 +0000)] 
lib-mail: mail-html2text: HTML entity lookup must be case-sensitive

HTML entities are case-sensitive.

4 years agolib-storage: Add unit test for mailbox-list error handling
Timo Sirainen [Thu, 30 Jan 2020 11:50:30 +0000 (13:50 +0200)] 
lib-storage: Add unit test for mailbox-list error handling

This is exactly the same test as what mail-storage has for its error
handling.

4 years agolib-storage: test-mail-storage - Split overlong lines
Timo Sirainen [Sat, 22 Feb 2020 10:01:45 +0000 (12:01 +0200)] 
lib-storage: test-mail-storage - Split overlong lines

4 years agolib-storage: Change mailbox_list_set_error/critical() to work the same as storage's
Timo Sirainen [Thu, 30 Jan 2020 11:48:26 +0000 (13:48 +0200)] 
lib-storage: Change mailbox_list_set_error/critical() to work the same as storage's

The storage ones had various fixes to different situations. Just make the
mailbox list ones exactly the same to get the same fixes.

4 years agolib-storage: mailbox_list_get_last_error() - Handle unexpected situations better
Timo Sirainen [Fri, 24 Jan 2020 11:50:50 +0000 (13:50 +0200)] 
lib-storage: mailbox_list_get_last_error() - Handle unexpected situations better

Change the logic to be similar as in mail_storage_get_last_error() if the
mail_error or error_string unexpectedly isn't set.

4 years agolib-storage: Detect corrupted mail size when calculating body size
Timo Sirainen [Thu, 22 Oct 2020 19:49:56 +0000 (22:49 +0300)] 
lib-storage: Detect corrupted mail size when calculating body size

When body size is calculated from message size - header size, make sure that
the message size is at least as large as the header size. Otherwise treat
the message size as corrupted.

4 years agostats: openmetrics: Do not duplicate counter and duration metrics for histograms
Siavash Tavakoli [Sun, 22 Nov 2020 19:16:03 +0000 (19:16 +0000)] 
stats: openmetrics: Do not duplicate counter and duration metrics for histograms

Histograms generate "_count" and "_sum" metrics either for each quantile or
for the whole distribution. This patch prevents creating a duplicate metric
with type counter which results in metric name collision.

4 years agostats: Make exported metrics compliant with OpenMetrics standards
Manuel Rüger [Mon, 23 Nov 2020 18:22:22 +0000 (18:22 +0000)] 
stats: Make exported metrics compliant with OpenMetrics standards

Commit based on github PR: https://github.com/dovecot/core/pull/136

Fix issues raised by promtool and prometheus client library parser.
Cleanup and code fixes by Siavash Tavakoli.

4 years agoindexer, auth: Set indexer-worker and auth-worker services' type=worker
Timo Sirainen [Tue, 22 Dec 2020 11:23:45 +0000 (13:23 +0200)] 
indexer, auth: Set indexer-worker and auth-worker services' type=worker

4 years agolib-master, master: Add "worker" service type
Timo Sirainen [Mon, 21 Dec 2020 19:24:50 +0000 (21:24 +0200)] 
lib-master, master: Add "worker" service type

The worker services are expected to reach their process_limit regularly.
There shouldn't be a warning logged about temporarily reaching the limit,
since it can happen due to race conditions.

4 years agomaster: Split off service_log_drop_warning()
Timo Sirainen [Mon, 21 Dec 2020 19:23:32 +0000 (21:23 +0200)] 
master: Split off service_log_drop_warning()

4 years agomaster: Update comment to service_process.total_count
Timo Sirainen [Thu, 16 Jan 2020 13:03:28 +0000 (15:03 +0200)] 
master: Update comment to service_process.total_count

It's not an exact value. Making it exact would require changing the IPC
protocol to master, which isn't worth it just for this.

4 years agolib-master: Notify master immediately when process can accept more clients
Timo Sirainen [Thu, 16 Jan 2020 12:58:21 +0000 (14:58 +0200)] 
lib-master: Notify master immediately when process can accept more clients

Instead of delaying it for 1 second. Otherwise the master might be
complaining about process/client limit being reached or creating more
processes unnecessarily.

4 years agolib-mail: message-snippet: Fix expected number of leading non-whitespace chars
Siavash Tavakoli [Mon, 28 Dec 2020 10:26:07 +0000 (10:26 +0000)] 
lib-mail: message-snippet: Fix expected number of leading non-whitespace chars

If message body starts with a single char + space (e.g. "I am"), the
space is wrongly removed (i.e. snippet would be "Iam") because at least two
non-whitespace characters are expected. Fix the minimum to 1 to fix this.

4 years agoauth: Log failure before freeing up request
Aki Tuomi [Thu, 7 Jan 2021 12:57:23 +0000 (14:57 +0200)] 
auth: Log failure before freeing up request

The request got free'd before logging, causing use-after-free access.

Broken in cec5a9c92d094d639c49bb83eeb9383ebb231c6f

4 years agoimap: cmd-setmetadata: Do not open mailbox
Siavash Tavakoli [Wed, 9 Dec 2020 01:31:30 +0000 (01:31 +0000)] 
imap: cmd-setmetadata: Do not open mailbox

Set metadata without actually opening the mailbox.

As a side-effect this changes SETMETADATA command response when ACL
rules are present and user only has lookup right. For non-existing
mailboxes, command fails with "Mailbox doesn't exist" message instead of
"Permission denied" error.

4 years agoimap: cmd-getmetadata: Retrieve metadata values without opening the mailbox
Siavash Tavakoli [Tue, 1 Dec 2020 17:21:03 +0000 (17:21 +0000)] 
imap: cmd-getmetadata: Retrieve metadata values without opening the mailbox

No need to actually opening the mailbox, only check for its existence.
This also makes GETMETADATA command behave more in line with RFC 5464 when
acls are preset. Changes to command results for different cases:

- User with only "l" right:
  - for non-existing mailbox command failure error changed from "Permission denied"
    to "Mailbox doesn't exist"
- User with "l" right and one of "s", "w", "i", and "p" rights:
  - for INBOX, command result changed from "Permission denied" failure to "OK"
  - for existing mailboxes, command result changed from "Permission denied"
    failure to "OK"
  - for non-existing mailboxes, command failure error changed from "Permission denied"
    to "Mailbox doesn't exist"
  - for autocreated mailboxes, command result changed from "Permission denied"
    failure to "OK"
- User with "l" right and one of "x", "c", "d", and "a" rights:
  - for non-existing mailboxes, command failure error changed from "Permission denied"
    to "Mailbox doesn't exist"
- User with only "r" right:
  - for INBOX, command result changed from "OK" to "Mailbox doesn't exist"
  - for existing mailboxes, command result changed from "OK" to "Mailbox doesn't exist"
  - for autocreated mailboxes, command result changed from "OK" to "Mailbox doesn't exist"

4 years agoimap: cmd-getmetadata: Do not ignore NOTFOUND and PERM when handling errors
Siavash Tavakoli [Wed, 9 Dec 2020 01:08:30 +0000 (01:08 +0000)] 
imap: cmd-getmetadata: Do not ignore NOTFOUND and PERM when handling errors

Don't ignore MAIL_ERROR_NOTFOUND MAIL_ERROR_PERM in cmd_getmetadata_handle_error
and fail GETMETADATA command properly. This code was added in the initial
GETMETADATA implementation commit.  It doesn't seem like it has ever done
anything useful.

4 years agodoveadm mailbox metadata: Don't open mailbox for get and list commands
Siavash Tavakoli [Tue, 1 Dec 2020 17:23:31 +0000 (17:23 +0000)] 
doveadm mailbox metadata: Don't open mailbox for get and list commands

4 years agolib-storage: Move checking autocreated boxes to storage backends
Siavash Tavakoli [Wed, 16 Dec 2020 10:08:11 +0000 (10:08 +0000)] 
lib-storage: Move checking autocreated boxes to storage backends

This allows acl plugin to check ACLs for autocreated mailboxes as well.

4 years agolib-storage: index-attribute: Fix typo
Siavash Tavakoli [Wed, 9 Dec 2020 00:58:17 +0000 (00:58 +0000)] 
lib-storage: index-attribute: Fix typo

4 years agodoveadm: doveadm-mail-mailbox-metadata: Add flag for prefixes in metadata list
Siavash Tavakoli [Tue, 1 Dec 2020 10:11:40 +0000 (10:11 +0000)] 
doveadm: doveadm-mail-mailbox-metadata: Add flag for prefixes in metadata list

Add an optional "-p" flag for metadata list command. Keys should have been
listed with "/private" or "/shared" prefixes from the get-go but for the
sake of not breaking users' workflow put this behind a flag.

4 years agolib-mail: test-message-search - Avoid static analyzer warnings about NULL pointers
Timo Sirainen [Wed, 16 Dec 2020 14:50:43 +0000 (16:50 +0200)] 
lib-mail: test-message-search - Avoid static analyzer warnings about NULL pointers

4 years agodsync: Add assert to help static analyzers
Timo Sirainen [Wed, 16 Dec 2020 14:47:38 +0000 (16:47 +0200)] 
dsync: Add assert to help static analyzers

4 years agocassandra: Fix error handling on SSL initialization failure
Timo Sirainen [Wed, 16 Dec 2020 14:21:40 +0000 (16:21 +0200)] 
cassandra: Fix error handling on SSL initialization failure

4 years agolib: istream-file,ostream-file - Mark close failure as unlikely
Aki Tuomi [Mon, 11 Jan 2021 09:04:57 +0000 (11:04 +0200)] 
lib: istream-file,ostream-file - Mark close failure as unlikely

File descriptor close failure is unlikely to happen.

4 years agolib: istream-file,ostream-file - Ignore ECONNRESET
Aki Tuomi [Mon, 21 Dec 2020 09:51:36 +0000 (11:51 +0200)] 
lib: istream-file,ostream-file - Ignore ECONNRESET

This happens e.g. on FreeBSD when closing a socket that has not been
fully flushed to client. Since we can't do anything about that,
we might as well just ignore it.

4 years agolib: fd-util - Ignore ECONNRESET when closing fd
Aki Tuomi [Mon, 21 Dec 2020 09:50:51 +0000 (11:50 +0200)] 
lib: fd-util - Ignore ECONNRESET when closing fd

This happens e.g. on FreeBSD when closing a socket that has not been
fully flushed to client. Since we can't do anything about that,
we might as well just ignore it.

4 years agolib-lua: Log an error when lua deinit function failed
Josef 'Jeff' Sipek [Thu, 17 Dec 2020 14:21:38 +0000 (09:21 -0500)] 
lib-lua: Log an error when lua deinit function failed

4 years agolib-lua: Move init/deinit function invocation into helper functions
Josef 'Jeff' Sipek [Fri, 11 Dec 2020 19:43:17 +0000 (14:43 -0500)] 
lib-lua: Move init/deinit function invocation into helper functions

This moves them out of the way and keeps them close to each other.

4 years agolib-lua: Warn if threading was detected
Josef 'Jeff' Sipek [Thu, 10 Dec 2020 21:22:20 +0000 (16:22 -0500)] 
lib-lua: Warn if threading was detected

4 years agolib-lua: Store script pointer in LUA_REGISTRY
Aki Tuomi [Thu, 24 Sep 2020 06:22:38 +0000 (09:22 +0300)] 
lib-lua: Store script pointer in LUA_REGISTRY

This will allow us to translate any lua thread to a script pointer.  This is
not meant to allow multi-threaded lua scripts, but it is necessary to allow
yields to work.

4 years agoimap-hibernate: Add variable aliases
Siavash Tavakoli [Wed, 30 Dec 2020 10:05:17 +0000 (10:05 +0000)] 
imap-hibernate: Add variable aliases

Accept new aliases "local_ip" (="lip") and "remote_ip" (="rip") when expanding
variables.

4 years agologin-storage: Add variable aliases
Siavash Tavakoli [Wed, 30 Dec 2020 10:02:56 +0000 (10:02 +0000)] 
login-storage: Add variable aliases

Accept new aliases "local_ip" (="lip") and "remote_ip" (="rip") when expanding
variables.

4 years agologin-common: Add variable aliases
Siavash Tavakoli [Wed, 30 Dec 2020 10:00:43 +0000 (10:00 +0000)] 
login-common: Add variable aliases

Accept new aliases such as "local_ip" (="lip") and "original_user"
(="orig_user"), etc.

4 years ago.gitignore: Ignore fuzzers
Aki Tuomi [Tue, 29 Dec 2020 09:18:32 +0000 (11:18 +0200)] 
.gitignore: Ignore fuzzers

4 years agolib-imap: Add fuzz-imap-bodystructure
Aki Tuomi [Tue, 29 Dec 2020 09:19:38 +0000 (11:19 +0200)] 
lib-imap: Add fuzz-imap-bodystructure

4 years agolib-mail: Add fuzz-message-parser
Aki Tuomi [Fri, 11 Sep 2020 12:02:57 +0000 (15:02 +0300)] 
lib-mail: Add fuzz-message-parser

Fuzzer for message parser

4 years agoAUTHORS: Add catena cyber
Aki Tuomi [Fri, 11 Sep 2020 12:02:17 +0000 (15:02 +0300)] 
AUTHORS: Add catena cyber

4 years agolib-smtp: Add fuzz target for smtp server
Philippe Antoine [Fri, 20 Mar 2020 15:00:21 +0000 (16:00 +0100)] 
lib-smtp: Add fuzz target for smtp server

4 years agolib-imap: Add fuzz-imap-utf7
Timo Sirainen [Mon, 23 Mar 2020 16:33:18 +0000 (18:33 +0200)] 
lib-imap: Add fuzz-imap-utf7

4 years agolib-test: Add fuzzing framework
Timo Sirainen [Mon, 23 Mar 2020 16:29:16 +0000 (18:29 +0200)] 
lib-test: Add fuzzing framework

4 years agoconfigure: Add --with-fuzzer=clang to use clang fuzzer
Timo Sirainen [Mon, 23 Mar 2020 16:28:34 +0000 (18:28 +0200)] 
configure: Add --with-fuzzer=clang to use clang fuzzer

4 years agolib-imap: Fix writing BODYSTRUCTURE for truncated multipart/digest part
Timo Sirainen [Wed, 18 Nov 2020 19:22:45 +0000 (21:22 +0200)] 
lib-imap: Fix writing BODYSTRUCTURE for truncated multipart/digest part

Fixes error while parsing BODYSTRUCTURE:
message_part message/rfc822 flag doesn't match lines in BODYSTRUCTURE

4 years agolib-imap: Fix writing BODYSTRUCTURE for truncated multipart/ part
Timo Sirainen [Wed, 18 Nov 2020 18:48:11 +0000 (20:48 +0200)] 
lib-imap: Fix writing BODYSTRUCTURE for truncated multipart/ part

If the max nesting limit is reached, write the last part out as
application/octet-stream. The original content-type could be confusing
IMAP clients when they don't see any child parts.

4 years agolib-imap: Fix writing BODYSTRUCTURE for truncated message/rfc822 part
Timo Sirainen [Wed, 18 Nov 2020 16:55:34 +0000 (18:55 +0200)] 
lib-imap: Fix writing BODYSTRUCTURE for truncated message/rfc822 part

If the max nesting limit is reached, write the last part out as
application/octet-stream instead of dummy message/rfc822.

Fixes error while parsing BODYSTRUCTURE:
message_part message/rfc822 flag doesn't match BODYSTRUCTURE

4 years agoNEWS: Add news for 2.3.13
Aki Tuomi [Sat, 12 Dec 2020 15:39:54 +0000 (17:39 +0200)] 
NEWS: Add news for 2.3.13

4 years agolib-imap: Don't generate invalid BODYSTRUCTURE when reaching MIME part limit
Timo Sirainen [Fri, 11 Sep 2020 07:57:51 +0000 (10:57 +0300)] 
lib-imap: Don't generate invalid BODYSTRUCTURE when reaching MIME part limit

If the last MIME part was message/rfc822 and its child was truncated away,
BODYSTRUCTURE was missing the ENVELOPE and BODY[STRUCTURE] parts. Fixed by
writing empty dummy ones.

4 years agolib-mail: message-parser - Fix assert-crash when enforcing MIME part limit
Timo Sirainen [Fri, 11 Sep 2020 06:53:03 +0000 (09:53 +0300)] 
lib-mail: message-parser - Fix assert-crash when enforcing MIME part limit

The limit could have been exceeded with message/rfc822 parts.

4 years agoimap: Add unit test for imap-client-hibernate
Timo Sirainen [Mon, 24 Aug 2020 16:12:21 +0000 (19:12 +0300)] 
imap: Add unit test for imap-client-hibernate

4 years agoimap: imap_client_hibernate() - Return reason string on failure
Timo Sirainen [Mon, 24 Aug 2020 16:10:43 +0000 (19:10 +0300)] 
imap: imap_client_hibernate() - Return reason string on failure

This helps writing a unit test for it.

4 years agoimap: Delay initializing client IO until client_create_finish()
Timo Sirainen [Mon, 24 Aug 2020 16:10:10 +0000 (19:10 +0300)] 
imap: Delay initializing client IO until client_create_finish()

This helps writing unit tests.

4 years agoimap: Fix crash if imap-hibernate socket can't be connected to
Timo Sirainen [Mon, 24 Aug 2020 13:58:16 +0000 (16:58 +0300)] 
imap: Fix crash if imap-hibernate socket can't be connected to

The error was supposed to be returned to caller, not logged directly.

4 years agoimap: Escape tag when sending it to imap-hibernate process
Timo Sirainen [Mon, 17 Aug 2020 15:33:20 +0000 (18:33 +0300)] 
imap: Escape tag when sending it to imap-hibernate process

4 years agolib-imap: Add imap_parser_client_read_tag()
Timo Sirainen [Mon, 17 Aug 2020 15:26:01 +0000 (18:26 +0300)] 
lib-imap: Add imap_parser_client_read_tag()

4 years agoimap-login: Use imap_parser_read_tag() and _read_command_name()
Timo Sirainen [Mon, 17 Aug 2020 15:22:42 +0000 (18:22 +0300)] 
imap-login: Use imap_parser_read_tag() and _read_command_name()

4 years agoimap-login: Split off client_invalid_command()
Timo Sirainen [Mon, 17 Aug 2020 15:15:35 +0000 (18:15 +0300)] 
imap-login: Split off client_invalid_command()

4 years agoimap: Use imap_parser_read_tag() and _read_command_name()
Timo Sirainen [Mon, 17 Aug 2020 15:11:36 +0000 (18:11 +0300)] 
imap: Use imap_parser_read_tag() and _read_command_name()

4 years agoimap: Split off client_command_failed_early()
Timo Sirainen [Mon, 17 Aug 2020 14:59:19 +0000 (17:59 +0300)] 
imap: Split off client_command_failed_early()

4 years agolib-imap: Add imap_parser_read_tag() and _read_command_name()
Timo Sirainen [Mon, 17 Aug 2020 14:32:11 +0000 (17:32 +0300)] 
lib-imap: Add imap_parser_read_tag() and _read_command_name()

4 years agolib-master: Add 5 second timeout when waiting for stats-writer handshake
Timo Sirainen [Wed, 11 Mar 2020 12:36:10 +0000 (14:36 +0200)] 
lib-master: Add 5 second timeout when waiting for stats-writer handshake

Previously the wait was infinite and nothing was logged, making it difficult
to know that the problem is with a hanging stats process.

4 years agolib-master, stats: Fix sending and parsing UPDATE commands
Timo Sirainen [Tue, 22 Dec 2020 08:22:38 +0000 (10:22 +0200)] 
lib-master, stats: Fix sending and parsing UPDATE commands

These commands were parsed completely wrong, resulting in errors like:

Client sent invalid input for UPDATE: Invalid tv_created: Invalid timeval microseconds parameter

4 years agolib-lua: Install libdovecot-lua binaries
Josef 'Jeff' Sipek [Thu, 3 Dec 2020 15:21:47 +0000 (10:21 -0500)] 
lib-lua: Install libdovecot-lua binaries

This turns this into a full-fledged library.  This addresses the issue where
libdovecot-lua is completely included in anything that uses it, which caused
unnecessarily bloat and could have caused linker problems with multiple
definitions of the same symbol.

4 years agolib-storage: Split off the mail user lua code
Josef 'Jeff' Sipek [Tue, 1 Dec 2020 17:16:04 +0000 (12:16 -0500)] 
lib-storage: Split off the mail user lua code

Move the code into a separate file to mirror the native C code layout.

4 years agolib-storage: Split off the mailbox attribute lua code
Josef 'Jeff' Sipek [Tue, 1 Dec 2020 17:13:31 +0000 (12:13 -0500)] 
lib-storage: Split off the mailbox attribute lua code

Move the code into a separate file to mirror the native C code layout.

4 years agolib-storage: Split off the struct mailbox lua code
Josef 'Jeff' Sipek [Tue, 1 Dec 2020 17:05:59 +0000 (12:05 -0500)] 
lib-storage: Split off the struct mailbox lua code

Move the code into a separate file to mirror the native C code layout.

4 years agolib-storage: Split off the struct mail lua code
Josef 'Jeff' Sipek [Tue, 1 Dec 2020 16:47:26 +0000 (11:47 -0500)] 
lib-storage: Split off the struct mail lua code

Move the code into a separate file to mirror the native C code layout.

4 years agolib-storage: Move storage related lua code into libdovecot-storage-lua.la
Josef 'Jeff' Sipek [Tue, 1 Dec 2020 16:14:02 +0000 (11:14 -0500)] 
lib-storage: Move storage related lua code into libdovecot-storage-lua.la

This keeps all the storage code in one place.

4 years agoauth: db-lua - Fix invalid stack empty check
Marvin W [Mon, 16 Nov 2020 19:55:14 +0000 (20:55 +0100)] 
auth: db-lua - Fix invalid stack empty check

3e11b97 introduced assertions to ensure the lua stack is empty after
execution.  In auth_lua_call_password_verify() this check was inserted
*before* popping the error message from the stack, ultimately causing the
assertion to fail every time the lua script has a runtime error, leading to
process crashing.

4 years agolib-storage: Remove cydir storage format support
Josef 'Jeff' Sipek [Fri, 6 Mar 2020 13:45:47 +0000 (15:45 +0200)] 
lib-storage: Remove cydir storage format support

4 years agolib-storage: Fix potential assert-crash fetching BODY[STRUCTURE] when mail's size...
Timo Sirainen [Fri, 11 Oct 2019 11:53:26 +0000 (14:53 +0300)] 
lib-storage: Fix potential assert-crash fetching BODY[STRUCTURE] when mail's size is cached wrong

This happened only after mail's size was detected to be different than the
mail's cached size.

Fixes:
Panic: file index-mail.c: line 1140 (index_mail_parse_body_finish): assertion failed: (mail->data.parts != NULL)

4 years agoplugins: Remove expire plugin
Josef 'Jeff' Sipek [Wed, 9 Dec 2020 14:42:19 +0000 (09:42 -0500)] 
plugins: Remove expire plugin

The autoexpunge functionality should be used instead.

4 years agoplugins: Remove mail-filter plugin
Josef 'Jeff' Sipek [Wed, 9 Dec 2020 14:20:54 +0000 (09:20 -0500)] 
plugins: Remove mail-filter plugin

4 years agoplugins: Remove snarf plugin
Josef 'Jeff' Sipek [Wed, 9 Dec 2020 14:32:29 +0000 (09:32 -0500)] 
plugins: Remove snarf plugin

4 years agoplugins: Remove autocreate plugin
Josef 'Jeff' Sipek [Wed, 9 Dec 2020 14:50:10 +0000 (09:50 -0500)] 
plugins: Remove autocreate plugin

Automatic mailbox creation should be done via the autocreate namespace
option.