]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
6 years agolib: mempool-alloconly - Use container_of instead of casts
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 15:18:13 +0000 (11:18 -0400)] 
lib: mempool-alloconly - Use container_of instead of casts

6 years agolib: Rename a alloconly mempool helper function to make its scope obvious
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 14:35:15 +0000 (10:35 -0400)] 
lib: Rename a alloconly mempool helper function to make its scope obvious

pool_try_grow() makes it look like it is part of the mempool API, even
though it is an internal helper specific to the alloconly pool.

6 years agolib: Document the unsafe datastack mempool
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 14:55:53 +0000 (10:55 -0400)] 
lib: Document the unsafe datastack mempool

6 years agolib: Document the system mempool
Josef 'Jeff' Sipek [Tue, 19 Jun 2018 20:08:40 +0000 (16:08 -0400)] 
lib: Document the system mempool

6 years agolib: Document datastack mempools
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 11:50:38 +0000 (07:50 -0400)] 
lib: Document datastack mempools

6 years agolib: Document allocfree mempools
Josef 'Jeff' Sipek [Tue, 19 Jun 2018 19:36:43 +0000 (15:36 -0400)] 
lib: Document allocfree mempools

6 years agolib: Document alloconly mempools
Josef 'Jeff' Sipek [Tue, 19 Jun 2018 18:04:43 +0000 (14:04 -0400)] 
lib: Document alloconly mempools

6 years agolib: mempool - Further reduce test code duplication
Josef 'Jeff' Sipek [Fri, 29 Jun 2018 20:17:40 +0000 (16:17 -0400)] 
lib: mempool - Further reduce test code duplication

We have to use a macro because we need to pass a type as an argument.

6 years agolib: mempool - Reduce test code duplication
Josef 'Jeff' Sipek [Thu, 28 Jun 2018 17:07:48 +0000 (13:07 -0400)] 
lib: mempool - Reduce test code duplication

The 32 and 64 bit versions of the tests were identical.

6 years agolib: mempool - Generalize the test
Josef 'Jeff' Sipek [Thu, 28 Jun 2018 15:13:43 +0000 (11:13 -0400)] 
lib: mempool - Generalize the test

Instead of hardcoding what appear to be arbitrary constants, use expressions
based on UINT{16,32,64}_MAX.

6 years agolib: str-sanitize: Use uni_utf8_data_truncate().
Stephan Bosch [Thu, 31 May 2018 21:59:50 +0000 (23:59 +0200)] 
lib: str-sanitize: Use uni_utf8_data_truncate().

6 years agolib: Add str_truncate_utf8().
Stephan Bosch [Thu, 31 May 2018 22:02:53 +0000 (00:02 +0200)] 
lib: Add str_truncate_utf8().

It works similar to str_truncate(), but it makes sure the truncated string
remains valid UTF-8.

6 years agolib: unichar: Add uni_utf8_data_truncate().
Stephan Bosch [Thu, 31 May 2018 22:02:16 +0000 (00:02 +0200)] 
lib: unichar: Add uni_utf8_data_truncate().

Returns the size of the data when truncated to be less than or equal to
a specified size, making sure UTF-8 character boundaries are respected.

6 years agolib-smtp: server: Make sure conn->state.data_failed is only set when no previous...
Stephan Bosch [Wed, 20 Jun 2018 12:01:18 +0000 (14:01 +0200)] 
lib-smtp: server: Make sure conn->state.data_failed is only set when no previous BDAT/BURL is pending.

Otherwise, the server would sometimes send 503 error for the first BDAT/BURL
command, while a subsequent command was actually failing earlier than the
initial one completed. Additionally, this caused a panic crash.

Panic was:

submission(stephan)<8353><C+7QBfysKluhIAAAmoV78g>: Panic: Input stream /home/stephan/Maildir/cur/1517515808.M176007P2993.johanna,S=1903,W=1956:2,DFS unexpectedly has references

6 years agolib-smtp: Allocate ORCPT addr_type from given memory pool, not data stack
Timo Sirainen [Tue, 12 Jun 2018 17:49:59 +0000 (20:49 +0300)] 
lib-smtp: Allocate ORCPT addr_type from given memory pool, not data stack

This could have caused crashes when parsing ORCPT.

6 years agolib-smtp: client: Avoid sending an XCLIENT command longer than 512 bytes.
Stephan Bosch [Sat, 26 May 2018 12:49:01 +0000 (14:49 +0200)] 
lib-smtp: client: Avoid sending an XCLIENT command longer than 512 bytes.

Send several separate XCLIENT commands instead. This way, it complies with the
base SMTP line length limit and with Postfix' original specification for the
XCLIENT command.

With the XCLIENT fields that Dovecot currently uses, this is very unlikely to
happen. Still, this needs to be fixed to make things reliable.

6 years agolib-smtp: client: Do not start authentication before initial XCLIENT gets reply.
Stephan Bosch [Sun, 27 May 2018 09:30:06 +0000 (11:30 +0200)] 
lib-smtp: client: Do not start authentication before initial XCLIENT gets reply.

6 years agolib-smtp: server: Provide full proxy data to the conn_proxy_data_updated() callback.
Stephan Bosch [Sat, 26 May 2018 13:44:43 +0000 (15:44 +0200)] 
lib-smtp: server: Provide full proxy data to the conn_proxy_data_updated() callback.

Before, it would only provide the fields that were updated, meaning that some
fields would remain unset, which caused problems for LMTP when more than one
XCLIENT command was sent or the ADDR field was not specified.

6 years agolib-smtp: Add test-smtp-payload, test-smtp-submit, test-smtp-client-errors, and test...
Stephan Bosch [Sat, 17 Mar 2018 23:57:36 +0000 (00:57 +0100)] 
lib-smtp: Add test-smtp-payload, test-smtp-submit, test-smtp-client-errors, and test-smtp-server-errors to `make check`.

6 years agolib-http: Add test-http-payload, test-http-client-errors, and test-http-server-errors...
Stephan Bosch [Sat, 17 Mar 2018 23:53:14 +0000 (00:53 +0100)] 
lib-http: Add test-http-payload, test-http-client-errors, and test-http-server-errors to `make check`.

6 years agolib-http: test-http-client-errors: Make the reconnect failure test less time-sensitive.
Stephan Bosch [Sun, 18 Mar 2018 00:25:42 +0000 (01:25 +0100)] 
lib-http: test-http-client-errors: Make the reconnect failure test less time-sensitive.

Easily breaks in Valgrind.

6 years agolib-smtp: test-smtp-payload: Terminate the test if it is hanging for some reason.
Stephan Bosch [Sat, 17 Mar 2018 23:46:32 +0000 (00:46 +0100)] 
lib-smtp: test-smtp-payload: Terminate the test if it is hanging for some reason.

6 years agolib-smtp: test-smtp-client-errors: Terminate the test if it is hanging for some reason.
Stephan Bosch [Sat, 17 Mar 2018 23:34:22 +0000 (00:34 +0100)] 
lib-smtp: test-smtp-client-errors: Terminate the test if it is hanging for some reason.

6 years agolib-http: test-http-client-errors: Terminate the test if it is hanging for some reason.
Stephan Bosch [Thu, 28 Dec 2017 15:33:49 +0000 (16:33 +0100)] 
lib-http: test-http-client-errors: Terminate the test if it is hanging for some reason.

6 years agolib-http: test-http-payload: Add SSL tests.
Stephan Bosch [Fri, 9 Feb 2018 22:58:51 +0000 (23:58 +0100)] 
lib-http: test-http-payload: Add SSL tests.

6 years agolib-smtp: test-smtp-payload: Add SSL tests.
Stephan Bosch [Fri, 9 Feb 2018 21:09:27 +0000 (22:09 +0100)] 
lib-smtp: test-smtp-payload: Add SSL tests.

6 years agolib-http: test-http-payload: Ignore SIGPIPE.
Stephan Bosch [Fri, 9 Feb 2018 23:00:17 +0000 (00:00 +0100)] 
lib-http: test-http-payload: Ignore SIGPIPE.

6 years agolib-smtp: test-smtp-payload: Ignore SIGPIPE.
Stephan Bosch [Fri, 9 Feb 2018 21:09:47 +0000 (22:09 +0100)] 
lib-smtp: test-smtp-payload: Ignore SIGPIPE.

6 years agolib-http: server: Allow creating server with custom SSL settings.
Stephan Bosch [Fri, 9 Feb 2018 21:27:00 +0000 (22:27 +0100)] 
lib-http: server: Allow creating server with custom SSL settings.

Normally, the settings are obtained through lib-master, but that is not
really suitable for the test suite.

6 years agolib-smtp: server: Allow creating server with custom SSL settings.
Stephan Bosch [Fri, 9 Feb 2018 21:06:49 +0000 (22:06 +0100)] 
lib-smtp: server: Allow creating server with custom SSL settings.

Normally, the settings are obtained through lib-master, but that is not
really suitable for the test suite.

6 years agolib-smtp: client: Amend connection debug message with source ip:port.
Stephan Bosch [Sat, 17 Mar 2018 20:08:09 +0000 (21:08 +0100)] 
lib-smtp: client: Amend connection debug message with source ip:port.

Helps matching debug logs between client and server.

6 years agolib-smtp: test-smtp-payload: Keep the number of pending transactions constant.
Stephan Bosch [Sat, 17 Mar 2018 17:10:04 +0000 (18:10 +0100)] 
lib-smtp: test-smtp-payload: Keep the number of pending transactions constant.

Before, a window was used.

6 years agolib-smtp: test-smtp-payload: Make proper definition for the maximum number of paralle...
Stephan Bosch [Sat, 17 Mar 2018 17:05:01 +0000 (18:05 +0100)] 
lib-smtp: test-smtp-payload: Make proper definition for the maximum number of parallel transactions.

6 years agolib-http: test-http-payload: Add test for exchanging payload with unknown size.
Stephan Bosch [Sat, 10 Feb 2018 01:20:31 +0000 (02:20 +0100)] 
lib-http: test-http-payload: Add test for exchanging payload with unknown size.

This will force using the chunked transfer encoding.

6 years agolib-http: test-http-payload: server: Fix asynchronous listening.
Stephan Bosch [Sat, 17 Mar 2018 20:34:11 +0000 (21:34 +0100)] 
lib-http: test-http-payload: server: Fix asynchronous listening.

The listening socket was blocking and the io handler only accepted one connection per run.

6 years agolib-smtp: test-smtp-payload: server: Fix asynchronous listening.
Stephan Bosch [Sat, 17 Mar 2018 13:14:03 +0000 (14:14 +0100)] 
lib-smtp: test-smtp-payload: server: Fix asynchronous listening.

The listening socket was blocking and the io handler only accepted one connection per run.

6 years agolib-ssl-iostream: Add support for creating server and client test SSL settings.
Stephan Bosch [Fri, 9 Feb 2018 21:04:23 +0000 (22:04 +0100)] 
lib-ssl-iostream: Add support for creating server and client test SSL settings.

This is useful for building test cases with SSL support.

6 years agolib: Fix compiler warning when arc4random_buf() is used for random_fill()
Timo Sirainen [Fri, 16 Feb 2018 12:33:33 +0000 (14:33 +0200)] 
lib: Fix compiler warning when arc4random_buf() is used for random_fill()

6 years agolib-mail: message-parser: Fixed Clang 6.0 compiler warning.
Stephan Bosch [Thu, 15 Feb 2018 22:41:25 +0000 (23:41 +0100)] 
lib-mail: message-parser: Fixed Clang 6.0 compiler warning.

Warning was:

index-mail.c:1182:3: warning: arithmetic on a null pointer treated as a cast
from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
                message_parser_parse_body(data->parser_ctx,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../src/lib-mail/message-parser.h:95:28: note: expanded from macro
'message_parser_parse_body'
                (void *)((char *)context + CALLBACK_TYPECHECK(callback, \
                         ~~~~~~~~~~~~~~~ ^

6 years agoauth: Do not import empty certificate username
Aki Tuomi [Wed, 16 Jan 2019 16:28:57 +0000 (18:28 +0200)] 
auth: Do not import empty certificate username

6 years agoauth: Fail authentication if certificate username was unexpectedly missing
Aki Tuomi [Wed, 16 Jan 2019 16:24:20 +0000 (18:24 +0200)] 
auth: Fail authentication if certificate username was unexpectedly missing

6 years agologin-common: Ensure we get username from certificate
Aki Tuomi [Tue, 15 Jan 2019 15:36:37 +0000 (17:36 +0200)] 
login-common: Ensure we get username from certificate

6 years agolib-storage: Fix event leak when failing to create storage
Timo Sirainen [Thu, 26 Apr 2018 20:05:21 +0000 (23:05 +0300)] 
lib-storage: Fix event leak when failing to create storage

6 years agodriver-sqlite: Fix event usage in driver_sqlite_exec
Aki Tuomi [Thu, 6 Sep 2018 06:36:07 +0000 (09:36 +0300)] 
driver-sqlite: Fix event usage in driver_sqlite_exec

Broken in 850f874971a7afa4f1f7b47df37fca082dc415a1

6 years agoUpdate NEWS to v2.3.4
Timo Sirainen [Fri, 23 Nov 2018 08:12:27 +0000 (10:12 +0200)] 
Update NEWS to v2.3.4

6 years agodoveadm force-resync: Add -f parameter to fsck index while opening it
Timo Sirainen [Mon, 14 May 2018 18:33:53 +0000 (21:33 +0300)] 
doveadm force-resync: Add -f parameter to fsck index while opening it

This probably should be done by default, but for now keep it optional
just in case there are any bugs in the fsck implementation.

6 years agolib-storage: Add MAILBOX_FLAG_FSCK to fsck index immediately after opening it
Timo Sirainen [Mon, 14 May 2018 18:31:59 +0000 (21:31 +0300)] 
lib-storage: Add MAILBOX_FLAG_FSCK to fsck index immediately after opening it

This can be used to fix a broken index that is causing mailbox_open() to
fail.

6 years agodbox: cache pop3 order and uidl when saving mails
Josef 'Jeff' Sipek [Wed, 19 Sep 2018 12:50:26 +0000 (15:50 +0300)] 
dbox: cache pop3 order and uidl when saving mails

6 years agolib-storage/index: Add a helper to cache pop3 order and uidl
Josef 'Jeff' Sipek [Wed, 19 Sep 2018 12:49:56 +0000 (15:49 +0300)] 
lib-storage/index: Add a helper to cache pop3 order and uidl

6 years agoglobal: Use uint32_t for pop3 order
Josef 'Jeff' Sipek [Thu, 20 Sep 2018 10:32:46 +0000 (06:32 -0400)] 
global: Use uint32_t for pop3 order

6 years agolib: uri-util: Add tests for URI character escape functions.
Stephan Bosch [Thu, 25 Oct 2018 11:35:52 +0000 (13:35 +0200)] 
lib: uri-util: Add tests for URI character escape functions.

6 years agolib: uri-util: Add functions for escaping (almost) all reserved URI characters.
Stephan Bosch [Thu, 25 Oct 2018 11:34:52 +0000 (13:34 +0200)] 
lib: uri-util: Add functions for escaping (almost) all reserved URI characters.

6 years agolib-storage: Change default postmaster_address setting to "postmaster@<user domain...
Stephan Bosch [Wed, 5 Sep 2018 19:56:42 +0000 (21:56 +0200)] 
lib-storage: Change default postmaster_address setting to "postmaster@<user domain or server hostname>".

The former "postmaster@<user domain>" default would only yield a valid
postmaster address when there is a domain part in the username. The new default
uses a conditional variable expansion choose "%d" when it is not empty and the
new "%{hostname}" otherwise.

6 years agolib-storage: mail-user: Add "%{hostname}" variable expansion.
Stephan Bosch [Wed, 5 Sep 2018 19:24:15 +0000 (21:24 +0200)] 
lib-storage: mail-user: Add "%{hostname}" variable expansion.

6 years agolib-storage: mail-user: Add convenience functions for obtaining postmaster address.
Stephan Bosch [Wed, 5 Sep 2018 19:23:05 +0000 (21:23 +0200)] 
lib-storage: mail-user: Add convenience functions for obtaining postmaster address.

6 years agolib-storage: Move postmaster_address setting from mail_storage_settings to mail_user_...
Stephan Bosch [Wed, 5 Sep 2018 19:11:15 +0000 (21:11 +0200)] 
lib-storage: Move postmaster_address setting from mail_storage_settings to mail_user_settings.

6 years agoauth: test-lua - Add test to ensure that values are not converted to number by mistake
Aki Tuomi [Mon, 29 Oct 2018 08:43:10 +0000 (10:43 +0200)] 
auth: test-lua - Add test to ensure that values are not converted to number by mistake

6 years agoauth: test-lua - Fix unit test to handle errors
Aki Tuomi [Mon, 29 Oct 2018 08:42:36 +0000 (10:42 +0200)] 
auth: test-lua - Fix unit test to handle errors

6 years agoauth: test-lua - Fix inconsistent whitespace
Aki Tuomi [Mon, 29 Oct 2018 12:43:11 +0000 (14:43 +0200)] 
auth: test-lua - Fix inconsistent whitespace

6 years agoauth: db-lua - Use lua_type to detect type
Aki Tuomi [Mon, 29 Oct 2018 07:52:37 +0000 (09:52 +0200)] 
auth: db-lua - Use lua_type to detect type

Using lua_isnumber to detect numbers also considers
convertible strings as numbers.

6 years agoauth: Store password with auth_set_field in Lua passdb
Aki Tuomi [Mon, 29 Oct 2018 07:50:33 +0000 (09:50 +0200)] 
auth: Store password with auth_set_field in Lua passdb

Makes caching work for passwords

6 years agoauth: Use default scheme in Lua passdb lookup
Aki Tuomi [Mon, 29 Oct 2018 07:49:48 +0000 (09:49 +0200)] 
auth: Use default scheme in Lua passdb lookup

Fixes a null pointer crash.

6 years agolib-lua: Use source instead of short_src
Aki Tuomi [Thu, 25 Oct 2018 10:50:36 +0000 (13:50 +0300)] 
lib-lua: Use source instead of short_src

short_src is a limited value, and also an byte array
instead of a pointer so it should not be returned.

Found by coverity.

6 years agolib: Add unit test for event duration
Aki Tuomi [Wed, 7 Nov 2018 07:51:50 +0000 (09:51 +0200)] 
lib: Add unit test for event duration

Make sure event duration is non-zero when used without
ioloop.

6 years agolib-lua: Fix sizeof usage for struct event* storage
Aki Tuomi [Tue, 6 Nov 2018 19:00:47 +0000 (21:00 +0200)] 
lib-lua: Fix sizeof usage for struct event* storage

Found by coverity

6 years agolib-lua: Make sure events get right file:line information
Aki Tuomi [Fri, 19 Oct 2018 10:54:50 +0000 (13:54 +0300)] 
lib-lua: Make sure events get right file:line information

6 years agomail-lua: Fix argument number checking for mailbox#sync
Aki Tuomi [Fri, 19 Oct 2018 10:54:34 +0000 (13:54 +0300)] 
mail-lua: Fix argument number checking for mailbox#sync

6 years agopush-notification-driver-lua: Perform garbage collection after transaction
Aki Tuomi [Fri, 19 Oct 2018 06:39:39 +0000 (09:39 +0300)] 
push-notification-driver-lua: Perform garbage collection after transaction

Ensure Lua releases resources here.

6 years agopush-notification-driver-ox: Convert to event based logging
Aki Tuomi [Mon, 15 Oct 2018 11:46:30 +0000 (14:46 +0300)] 
push-notification-driver-ox: Convert to event based logging

Also fixes the logging to be standard

6 years agopush-notification-driver-lua: Add events
Aki Tuomi [Mon, 15 Oct 2018 09:20:20 +0000 (12:20 +0300)] 
push-notification-driver-lua: Add events

6 years agopush-notification: Emit event on transaction end
Aki Tuomi [Mon, 15 Oct 2018 09:04:19 +0000 (12:04 +0300)] 
push-notification: Emit event on transaction end

6 years agopush-notification: Add event to push notification transaction
Aki Tuomi [Mon, 15 Oct 2018 09:03:58 +0000 (12:03 +0300)] 
push-notification: Add event to push notification transaction

6 years agopush-notification: Add event category
Aki Tuomi [Mon, 15 Oct 2018 08:55:41 +0000 (11:55 +0300)] 
push-notification: Add event category

6 years agolib-lua: Move __gc metamethod for event to userdata
Aki Tuomi [Fri, 19 Oct 2018 08:36:09 +0000 (11:36 +0300)] 
lib-lua: Move __gc metamethod for event to userdata

Compability for lua 5.1

6 years agomail-lua: Check number of arguments
Aki Tuomi [Thu, 18 Oct 2018 08:37:00 +0000 (11:37 +0300)] 
mail-lua: Check number of arguments

6 years agolib-lua: Add DLUA_REQUIRE_ARGS(s,x) and DLUA_REQUIRE_ARGS_IN(s,x,y)
Aki Tuomi [Thu, 18 Oct 2018 09:04:41 +0000 (12:04 +0300)] 
lib-lua: Add DLUA_REQUIRE_ARGS(s,x) and DLUA_REQUIRE_ARGS_IN(s,x,y)

First form requires that x arguments are provided for dlua script s.

Second form requires that at least x and at most y arguments are provided
for dlua script s

Automatically returns luaL_error.

6 years agomail-lua: Make flags optional for mailbox#sync
Aki Tuomi [Tue, 16 Oct 2018 08:35:45 +0000 (11:35 +0300)] 
mail-lua: Make flags optional for mailbox#sync

6 years agomail-lua: Make flags optional for user#mailbox
Aki Tuomi [Tue, 16 Oct 2018 08:34:23 +0000 (11:34 +0300)] 
mail-lua: Make flags optional for user#mailbox

6 years agomail-lua: Change mailbox#status API to varargs
Aki Tuomi [Tue, 16 Oct 2018 07:13:27 +0000 (10:13 +0300)] 
mail-lua: Change mailbox#status API to varargs

It's much easier to use this way

6 years agolib-lua: Check number of arguments
Aki Tuomi [Thu, 18 Oct 2018 09:31:27 +0000 (12:31 +0300)] 
lib-lua: Check number of arguments

6 years agolib-lua: Add flag manipulation functions
Aki Tuomi [Mon, 30 Jul 2018 10:12:47 +0000 (13:12 +0300)] 
lib-lua: Add flag manipulation functions

6 years agolib-lua: Add test for event framework
Aki Tuomi [Thu, 11 Oct 2018 16:50:06 +0000 (19:50 +0300)] 
lib-lua: Add test for event framework

6 years agolib-lua: Add event interface
Aki Tuomi [Thu, 11 Oct 2018 16:10:17 +0000 (19:10 +0300)] 
lib-lua: Add event interface

6 years agolib-lua: Add events to scripts
Aki Tuomi [Thu, 11 Oct 2018 14:06:00 +0000 (17:06 +0300)] 
lib-lua: Add events to scripts

6 years agolib-master: Fix test-event-stats
Aki Tuomi [Wed, 17 Oct 2018 16:44:31 +0000 (19:44 +0300)] 
lib-master: Fix test-event-stats

New stats uses gettimeofday that generated unpredictable values
for this test.

6 years agolib: event - Stop exporting ioloop time
Aki Tuomi [Wed, 17 Oct 2018 09:47:37 +0000 (12:47 +0300)] 
lib: event - Stop exporting ioloop time

It is not needed by stats process.

6 years agostats: Use duration field from events
Aki Tuomi [Tue, 16 Oct 2018 06:03:05 +0000 (09:03 +0300)] 
stats: Use duration field from events

6 years agolib: event - Record real duration
Aki Tuomi [Tue, 16 Oct 2018 05:52:49 +0000 (08:52 +0300)] 
lib: event - Record real duration

The old code only measured difference between successive
ioloop_time updates. The new code uses gettimeofday to
get current real time, making measurements accurate.

6 years agolib: event - Duplicate source_filename
Aki Tuomi [Tue, 16 Oct 2018 05:17:27 +0000 (08:17 +0300)] 
lib: event - Duplicate source_filename

Prevents crash on event leak when plugin that caused the leak
is unloaded.

6 years agolib: event - Rename tv_created as tv_created_ioloop
Aki Tuomi [Tue, 16 Oct 2018 13:11:23 +0000 (16:11 +0300)] 
lib: event - Rename tv_created as tv_created_ioloop

6 years agopush-notification: Resolve confusion about msg->seq
Aki Tuomi [Wed, 3 Oct 2018 09:00:55 +0000 (12:00 +0300)] 
push-notification: Resolve confusion about msg->seq

It's not the same seq what the mail has, but a sequence that
is used to find out UID for saved mails. So rename it to
save_idx and treat it accordingly. Note that save_idx is 0
based, and mail sequence is 1 based.

6 years agopush-notification-driver-lua: Include date from MessageAppend
Aki Tuomi [Fri, 28 Sep 2018 10:30:51 +0000 (13:30 +0300)] 
push-notification-driver-lua: Include date from MessageAppend

6 years agopush-notification-event-messageappend: Include date information parsed from headers
Aki Tuomi [Fri, 28 Sep 2018 10:30:01 +0000 (13:30 +0300)] 
push-notification-event-messageappend: Include date information parsed from headers

Consistency with MessageNew

6 years agopush-notification: Make sure txn messages are unique
Aki Tuomi [Fri, 28 Sep 2018 10:01:58 +0000 (13:01 +0300)] 
push-notification: Make sure txn messages are unique

save_count is not reliable as it's not incremented for events like
flag changes.

6 years agopush-notification-driver-lua: Always use DLUA_LOG_LABEL
Aki Tuomi [Thu, 27 Sep 2018 06:54:10 +0000 (09:54 +0300)] 
push-notification-driver-lua: Always use DLUA_LOG_LABEL

6 years agopush-notification-driver-lua: Properly register all events
Aki Tuomi [Thu, 27 Sep 2018 06:52:59 +0000 (09:52 +0300)] 
push-notification-driver-lua: Properly register all events

6 years agomail-lua: Fix gc code to push key first then value
Aki Tuomi [Tue, 25 Sep 2018 12:49:21 +0000 (15:49 +0300)] 
mail-lua: Fix gc code to push key first then value

Otherwise it uses nil as key, which makes no sense and leads to eventual crash.

6 years agopush-notification-driver-lua: tx begin pushed mail user not username
Aki Tuomi [Tue, 25 Sep 2018 11:09:55 +0000 (14:09 +0300)] 
push-notification-driver-lua: tx begin pushed mail user not username

6 years agopush-notification-driver-lua: Do not push user again
Aki Tuomi [Tue, 25 Sep 2018 11:09:28 +0000 (14:09 +0300)] 
push-notification-driver-lua: Do not push user again

User is already pushed in tx begin, and can be stored there into the context.

6 years agopush-notification-driver-lua: Move event push earlier
Aki Tuomi [Tue, 25 Sep 2018 11:08:59 +0000 (14:08 +0300)] 
push-notification-driver-lua: Move event push earlier

Simplifies code