]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
7 years agoconfig: Hide more sensitive information
Aki Tuomi [Mon, 12 Mar 2018 07:11:53 +0000 (09:11 +0200)] 
config: Hide more sensitive information

Hide parts of values where we can see a key that has word
key, secret or pass as prefix and is a key-value pair
separated by =.

7 years agoconfig: Move sensitive value hiding to own function
Aki Tuomi [Mon, 12 Mar 2018 07:11:14 +0000 (09:11 +0200)] 
config: Move sensitive value hiding to own function

Simplifies next change

7 years agolib: Add str_nescape
Aki Tuomi [Sat, 10 Mar 2018 16:20:32 +0000 (18:20 +0200)] 
lib: Add str_nescape

For partial escaping

7 years agolib: Add i_strstr_arr for searching string for multiple needles
Aki Tuomi [Sat, 10 Mar 2018 15:56:33 +0000 (17:56 +0200)] 
lib: Add i_strstr_arr for searching string for multiple needles

7 years agoman: doveconf - Document -P flag
Aki Tuomi [Fri, 9 Mar 2018 15:09:28 +0000 (17:09 +0200)] 
man: doveconf - Document -P flag

7 years agolib-master: Fix dns_wildcard_match usage
Arkadiusz Miśkiewicz [Wed, 21 Mar 2018 09:29:26 +0000 (11:29 +0200)] 
lib-master: Fix dns_wildcard_match usage

Broken by 446c0b02a7802b676e893ccc4934fc7318d950ea

7 years agoNEWS: Add v2.3.1
Aki Tuomi [Tue, 20 Mar 2018 08:59:34 +0000 (10:59 +0200)] 
NEWS: Add v2.3.1

7 years agoNEWS: Update to 2.3.0.1
Aki Tuomi [Mon, 19 Mar 2018 09:34:49 +0000 (11:34 +0200)] 
NEWS: Update to 2.3.0.1

7 years agolib-dcrypt: Reformatted test-stream.c.
Stephan Bosch [Sat, 17 Feb 2018 20:51:00 +0000 (21:51 +0100)] 
lib-dcrypt: Reformatted test-stream.c.

7 years agolib-dcrypt: Reformatted test-crypto.c.
Stephan Bosch [Sat, 17 Feb 2018 20:43:06 +0000 (21:43 +0100)] 
lib-dcrypt: Reformatted test-crypto.c.

7 years agolib-dcrypt: Reformatted ostream-encrypt.h.
Stephan Bosch [Sat, 17 Feb 2018 20:10:17 +0000 (21:10 +0100)] 
lib-dcrypt: Reformatted ostream-encrypt.h.

7 years agolib-dcryp: Reformatted ostream-encrypt.c.
Stephan Bosch [Sat, 17 Feb 2018 20:09:16 +0000 (21:09 +0100)] 
lib-dcryp: Reformatted ostream-encrypt.c.

7 years agolib-dcrypt: Reformatted istream-decrypt.h.
Stephan Bosch [Sat, 17 Feb 2018 19:49:14 +0000 (20:49 +0100)] 
lib-dcrypt: Reformatted istream-decrypt.h.

7 years agolib-dcrypt: Reformatted istream-decrypt.c.
Stephan Bosch [Sat, 17 Feb 2018 19:47:19 +0000 (20:47 +0100)] 
lib-dcrypt: Reformatted istream-decrypt.c.

7 years agolib-dcrypt: Reformatted dcrypt-private.h.
Stephan Bosch [Sat, 17 Feb 2018 19:24:42 +0000 (20:24 +0100)] 
lib-dcrypt: Reformatted dcrypt-private.h.

7 years agolib-dcrypt: Reformatted dcrypt-openssl.c.
Stephan Bosch [Sat, 17 Feb 2018 19:15:24 +0000 (20:15 +0100)] 
lib-dcrypt: Reformatted dcrypt-openssl.c.

7 years agolib-dcrypt: Reformatted dcrypt-iostream.h.
Stephan Bosch [Sat, 17 Feb 2018 18:19:22 +0000 (19:19 +0100)] 
lib-dcrypt: Reformatted dcrypt-iostream.h.

7 years agolib-dcrypt: Reformatted dcrypt-gnutls.c.
Stephan Bosch [Sat, 17 Feb 2018 18:18:28 +0000 (19:18 +0100)] 
lib-dcrypt: Reformatted dcrypt-gnutls.c.

7 years agolib-dcrypt: Reformatted dcrypt.h.
Stephan Bosch [Sat, 17 Feb 2018 18:01:48 +0000 (19:01 +0100)] 
lib-dcrypt: Reformatted dcrypt.h.

7 years agolib-drypt: Reformatted dcrypt.c.
Stephan Bosch [Sat, 17 Feb 2018 17:53:19 +0000 (18:53 +0100)] 
lib-drypt: Reformatted dcrypt.c.

7 years agolib-program-client: Add more detailed debug logging.
Stephan Bosch [Mon, 26 Feb 2018 22:12:03 +0000 (23:12 +0100)] 
lib-program-client: Add more detailed debug logging.

7 years agolib-program-client: Use event logging.
Stephan Bosch [Mon, 26 Feb 2018 21:27:40 +0000 (22:27 +0100)] 
lib-program-client: Use event logging.

This also makes the overall log messages better match similar messages produced
by other parts of Dovecot.

7 years agolib-program-client: Use i_close_fd() rather than close() when error is not supposed...
Stephan Bosch [Thu, 15 Mar 2018 23:08:17 +0000 (00:08 +0100)] 
lib-program-client: Use i_close_fd() rather than close() when error is not supposed to happen.

7 years agolib-program-client: Make debug mode for test suite optional.
Stephan Bosch [Mon, 26 Feb 2018 22:26:50 +0000 (23:26 +0100)] 
lib-program-client: Make debug mode for test suite optional.

It is now disabled by default.

7 years agolib-program-client: local: Cleanup any kill timeout while program client is destroyed.
Stephan Bosch [Mon, 26 Feb 2018 17:58:37 +0000 (18:58 +0100)] 
lib-program-client: local: Cleanup any kill timeout while program client is destroyed.

7 years agolib-program-client: local: Make sure the child is dead once the program client is...
Stephan Bosch [Mon, 26 Feb 2018 17:32:32 +0000 (18:32 +0100)] 
lib-program-client: local: Make sure the child is dead once the program client is destroyed.

7 years agolib-program-client: Simplify disconnect handling.
Stephan Bosch [Mon, 26 Feb 2018 17:01:23 +0000 (18:01 +0100)] 
lib-program-client: Simplify disconnect handling.

Perform all of the cleanups in a separate shared function.
Always close all fds, since there is nothing left to be read or written at
disconnect.

7 years agolib-program-client: remote: Don't try to read remaining input at disconnect.
Stephan Bosch [Mon, 26 Feb 2018 17:21:04 +0000 (18:21 +0100)] 
lib-program-client: remote: Don't try to read remaining input at disconnect.

This code is no longer relevant. At disconnect, there is nothing left to be read
by definition.

7 years agolib-program-client: Use iostream-pump for streaming data from program.
Stephan Bosch [Sun, 25 Feb 2018 23:07:10 +0000 (00:07 +0100)] 
lib-program-client: Use iostream-pump for streaming data from program.

7 years agolib-program-client: Destroy timeout once client is passively disconnected.
Stephan Bosch [Mon, 26 Feb 2018 16:16:41 +0000 (17:16 +0100)] 
lib-program-client: Destroy timeout once client is passively disconnected.

7 years agolib-program-client: remote: Initialize program_client_istream with parent FD.
Stephan Bosch [Mon, 26 Feb 2018 16:15:13 +0000 (17:15 +0100)] 
lib-program-client: remote: Initialize program_client_istream with parent FD.

This way, io_add_istream() works as expected.

7 years agolib-program-client: local: Stop immediately when child program without I/O ends.
Stephan Bosch [Mon, 26 Feb 2018 16:12:29 +0000 (17:12 +0100)] 
lib-program-client: local: Stop immediately when child program without I/O ends.

Particularly, don't perform this by calling the input handler.

7 years agolib-program-client: Change return type of program_client_connected() to void.
Stephan Bosch [Mon, 26 Feb 2018 15:52:18 +0000 (16:52 +0100)] 
lib-program-client: Change return type of program_client_connected() to void.

Returning an int status code is no longer useful.

7 years agolib-program-client: Use iostream-pump for streaming data towards program.
Stephan Bosch [Sun, 25 Feb 2018 16:21:47 +0000 (17:21 +0100)] 
lib-program-client: Use iostream-pump for streaming data towards program.

7 years agolib-program-client: Initialize dot streams right after the connection is established.
Stephan Bosch [Sun, 25 Feb 2018 10:43:04 +0000 (11:43 +0100)] 
lib-program-client: Initialize dot streams right after the connection is established.

This avoids creating the dot streams in the input/output handlers, which makes
the code cleaner and easier to port to using iostream-pump.

7 years agolib-program-client: Use iostream-temp rather than istream-seekable for seekable output.
Stephan Bosch [Sun, 25 Feb 2018 08:55:00 +0000 (09:55 +0100)] 
lib-program-client: Use iostream-temp rather than istream-seekable for seekable output.

This considerably simplifies the code.

7 years agolib-program-client: test-program-client-net: Read the client input stream to EOF...
Stephan Bosch [Sun, 25 Feb 2018 16:31:51 +0000 (17:31 +0100)] 
lib-program-client: test-program-client-net: Read the client input stream to EOF after the dot stream is closed.

The low-level file stream is not necessarily read to EOF when the body dot
stream sees EOF.

7 years agolib-program-client: test-program-client-unix: Properly recognize the noreply script...
Stephan Bosch [Sun, 25 Feb 2018 17:38:23 +0000 (18:38 +0100)] 
lib-program-client: test-program-client-unix: Properly recognize the noreply script protocol option.

Somehow the equivalent test-program-client-net code does not have this problem.
And somehow this test did not fail before.

7 years agolib-program-client: test-program-client-net: Destroy test client upon error.
Stephan Bosch [Sun, 25 Feb 2018 17:31:14 +0000 (18:31 +0100)] 
lib-program-client: test-program-client-net: Destroy test client upon error.

This prevents infinite input event loop when something goes wrong.

7 years agolib-program-client: test-program-client-unix: Destroy test client upon error.
Stephan Bosch [Sun, 25 Feb 2018 17:30:12 +0000 (18:30 +0100)] 
lib-program-client: test-program-client-unix: Destroy test client upon error.

This prevents infinite input event loop when something goes wrong.

7 years agolib-program-client: test-program-client-net: Handle test client connections non-blocking.
Stephan Bosch [Sun, 25 Feb 2018 17:03:04 +0000 (18:03 +0100)] 
lib-program-client: test-program-client-net: Handle test client connections non-blocking.

7 years agolib-program-client: test-program-client-unix: Handle test client connections non...
Stephan Bosch [Sun, 25 Feb 2018 17:03:51 +0000 (18:03 +0100)] 
lib-program-client: test-program-client-unix: Handle test client connections non-blocking.

7 years agolib-program-client: test-program-client-net: Create body streams only once in test_pr...
Stephan Bosch [Sun, 25 Feb 2018 16:57:59 +0000 (17:57 +0100)] 
lib-program-client: test-program-client-net: Create body streams only once in test_program_input_handle().

7 years agolib-program-client: test-program-client-unix: Create body stream only once in test_pr...
Stephan Bosch [Sun, 25 Feb 2018 16:56:15 +0000 (17:56 +0100)] 
lib-program-client: test-program-client-unix: Create body stream only once in test_program_input_handle().

7 years agolib-program-client: test-program-client-net: Match client input handling code with...
Stephan Bosch [Sun, 25 Feb 2018 17:15:59 +0000 (18:15 +0100)] 
lib-program-client: test-program-client-net: Match client input handling code with test-program-client-unix.

7 years agolib-program-client: test-program-client-unix: Further fix error handling in test_prog...
Stephan Bosch [Sun, 18 Mar 2018 02:32:19 +0000 (03:32 +0100)] 
lib-program-client: test-program-client-unix: Further fix error handling in test_program_input().

7 years agolib-program-client: remote: Always shut down the output when all is written.
Stephan Bosch [Sun, 25 Feb 2018 16:46:55 +0000 (17:46 +0100)] 
lib-program-client: remote: Always shut down the output when all is written.

Before, this step was omitted when dot streams were used. However, shutting down
the output is necessary no matter what. Otherwise, the receiving end will not
see that no more input will follow, causing deadlock.

7 years agolib-program-client: Make sure program client callback is called only once.
Stephan Bosch [Sun, 25 Feb 2018 19:21:11 +0000 (20:21 +0100)] 
lib-program-client: Make sure program client callback is called only once.

7 years agolib-program-client: remote: Use struct program_client_remote as parameter where possible.
Stephan Bosch [Mon, 26 Feb 2018 23:13:20 +0000 (00:13 +0100)] 
lib-program-client: remote: Use struct program_client_remote as parameter where possible.

Avoids the need to cast it everywhere.

7 years agolib-program-client: remote: Call program client variable "prclient" consistently.
Stephan Bosch [Mon, 26 Feb 2018 22:57:44 +0000 (23:57 +0100)] 
lib-program-client: remote: Call program client variable "prclient" consistently.

7 years agolib-program-client: local: Call program client variable "plclient" consistently.
Stephan Bosch [Mon, 26 Feb 2018 22:53:22 +0000 (23:53 +0100)] 
lib-program-client: local: Call program client variable "plclient" consistently.

7 years agolib-program-client: Reformat test-program-client-unix.c.
Stephan Bosch [Sun, 25 Feb 2018 09:39:15 +0000 (10:39 +0100)] 
lib-program-client: Reformat test-program-client-unix.c.

7 years agolib-program-client: Reformat test-program-client-net.c.
Stephan Bosch [Sun, 25 Feb 2018 09:34:16 +0000 (10:34 +0100)] 
lib-program-client: Reformat test-program-client-net.c.

7 years agolib-program-client: Reformat program-client-private.h.
Stephan Bosch [Sun, 25 Feb 2018 17:54:46 +0000 (18:54 +0100)] 
lib-program-client: Reformat program-client-private.h.

7 years agolib-program-client: Reformat test-program-client-local.c.
Stephan Bosch [Sun, 25 Feb 2018 09:21:57 +0000 (10:21 +0100)] 
lib-program-client: Reformat test-program-client-local.c.

7 years agolib-program-client: Reformat program-client-remote.c.
Stephan Bosch [Sun, 25 Feb 2018 09:20:20 +0000 (10:20 +0100)] 
lib-program-client: Reformat program-client-remote.c.

7 years agolib-program-client: Reformat program-client-local.c.
Stephan Bosch [Sun, 25 Feb 2018 09:10:17 +0000 (10:10 +0100)] 
lib-program-client: Reformat program-client-local.c.

7 years agolib-program-client: Reformat program-client.h.
Stephan Bosch [Sun, 25 Feb 2018 09:06:36 +0000 (10:06 +0100)] 
lib-program-client: Reformat program-client.h.

7 years agolib-program-client: Reformat program-client.c.
Stephan Bosch [Sun, 25 Feb 2018 09:05:33 +0000 (10:05 +0100)] 
lib-program-client: Reformat program-client.c.

7 years agolib: iostream-pump: Properly implement running a pump with one of the streams blocking.
Stephan Bosch [Sun, 25 Feb 2018 20:45:17 +0000 (21:45 +0100)] 
lib: iostream-pump: Properly implement running a pump with one of the streams blocking.

Having both streams blocking is not useful and that is now explicitly forbidden.

7 years agolib: iostream-pump: Add iostream_pump_destroy().
Stephan Bosch [Sun, 25 Feb 2018 18:24:58 +0000 (19:24 +0100)] 
lib: iostream-pump: Add iostream_pump_destroy().

This functions always stops the pump and dereferences the streams before
dereferencing the pump itself.

7 years agolib: iostream-pump: Make iostream_pump_unref() implementation match other similar...
Stephan Bosch [Sun, 25 Feb 2018 18:13:18 +0000 (19:13 +0100)] 
lib: iostream-pump: Make iostream_pump_unref() implementation match other similar code.

This also means that iostream_pump_unref(NULL) is now a no-op.

7 years agolib: iostream-pump: Use refcount as name and int as type for reference count field.
Stephan Bosch [Sun, 25 Feb 2018 18:18:47 +0000 (19:18 +0100)] 
lib: iostream-pump: Use refcount as name and int as type for reference count field.

This is what the rest of Dovecot uses.

7 years agolib: Reformat test-iostream-pump.c.
Stephan Bosch [Sun, 25 Feb 2018 20:56:55 +0000 (21:56 +0100)] 
lib: Reformat test-iostream-pump.c.

7 years agolib: Reformat iostream-pump.c.
Stephan Bosch [Sun, 25 Feb 2018 18:04:14 +0000 (19:04 +0100)] 
lib: Reformat iostream-pump.c.

7 years agolib: Reformat iostream-pump.h.
Stephan Bosch [Sun, 25 Feb 2018 18:03:49 +0000 (19:03 +0100)] 
lib: Reformat iostream-pump.h.

7 years agolib-smtp: test-smtp-server-errors: Add test for DATA command erroneously used with...
Stephan Bosch [Thu, 15 Mar 2018 21:36:45 +0000 (22:36 +0100)] 
lib-smtp: test-smtp-server-errors: Add test for DATA command erroneously used with BODY=BINARYMIME.

7 years agolib-smtp: test-smtp-server-errors: Add tests for missing MAIL and RCPT commands befor...
Stephan Bosch [Thu, 15 Mar 2018 21:34:34 +0000 (22:34 +0100)] 
lib-smtp: test-smtp-server-errors: Add tests for missing MAIL and RCPT commands before DATA command.

7 years agolib-smtp: server: Check that BINARYMIME is not used without CHUNKING.
Stephan Bosch [Thu, 15 Mar 2018 21:36:16 +0000 (22:36 +0100)] 
lib-smtp: server: Check that BINARYMIME is not used without CHUNKING.

7 years agosubmission: Add 8BITMIME and BINARYMIME back to supported capabilities.
Stephan Bosch [Wed, 14 Mar 2018 00:54:20 +0000 (01:54 +0100)] 
submission: Add 8BITMIME and BINARYMIME back to supported capabilities.

These are supported when the backend provides support. These were erroneously
disabled earlier by 3bf0c0e211ba1e4ee9977a9dfea32e14ebc50aab.

7 years agoistream-seekable: Record stream size in stat
Aki Tuomi [Fri, 16 Mar 2018 11:40:26 +0000 (13:40 +0200)] 
istream-seekable: Record stream size in stat

Otherwise the size is shown 0

7 years agoistream-mail: Move pos back when bailing out on error
Aki Tuomi [Fri, 16 Mar 2018 11:39:40 +0000 (13:39 +0200)] 
istream-mail: Move pos back when bailing out on error

Fixes
Panic: file istream.c: line 276 (i_stream_read): assertion failed: ((_stream->pos - _stream->skip) == (prev_pos - prev_skip))

7 years agolib-mail: html2text: do not parse entity when quote_level > 0.
Sergey Kitov [Tue, 13 Mar 2018 14:36:44 +0000 (16:36 +0200)] 
lib-mail: html2text: do not parse entity when quote_level > 0.

&entities inside blockquotes are added to text, while other text is
not, this leads to strange results.

7 years agoimapc: Update mail size also when RFC822.SIZE is smaller than fetched header size
Timo Sirainen [Thu, 15 Mar 2018 11:19:53 +0000 (13:19 +0200)] 
imapc: Update mail size also when RFC822.SIZE is smaller than fetched header size

If this isn't done, istream-mail will detect that the fetched header is
larger than RFC822.SIZE and fail with "Cached message size smaller than
expected"

7 years agoimapc: Update mail size also when istream_opened() hook is called
Timo Sirainen [Thu, 15 Mar 2018 10:20:14 +0000 (12:20 +0200)] 
imapc: Update mail size also when istream_opened() hook is called

When fetching a message body the cached message size was set. However,
if istream_opened() hook was used this wasn't done. If a client had
fetched both (RFC822.SIZE BODY.PEEK[]) and the server sent a wrong
RFC822.SIZE, that size was used for the message body size, which resulted
in "Cached message size larger than expected" errors.

7 years agolib-ssl-iostream: Correctly build certificate chains
Aki Tuomi [Sat, 10 Mar 2018 15:06:03 +0000 (17:06 +0200)] 
lib-ssl-iostream: Correctly build certificate chains

Prevents sending extraneous certificates when using
alternative certs.

Reported by John Fawcett <john@voipsupport.it> and
Peter Linss <peter@linss.com>.

7 years agolib-master: Correctly match when local_name has multiple names
Aki Tuomi [Tue, 6 Mar 2018 13:15:01 +0000 (15:15 +0200)] 
lib-master: Correctly match when local_name has multiple names

Reported by J. Nick Koston <nick@cpanel.net>

7 years agolib-master: Reply from config process is tabescaped
Aki Tuomi [Tue, 6 Mar 2018 08:33:27 +0000 (10:33 +0200)] 
lib-master: Reply from config process is tabescaped

Found by J. Nick Koston <nick@cpanel.net>

7 years agoconfig: tabescape local name and service
Aki Tuomi [Sat, 10 Mar 2018 17:43:27 +0000 (19:43 +0200)] 
config: tabescape local name and service

7 years agoconfig: Make local_name comparison faster
Aki Tuomi [Tue, 6 Mar 2018 08:31:51 +0000 (10:31 +0200)] 
config: Make local_name comparison faster

Based on patch by J. Nick Koston <nick@cpanel.net>

7 years agolib-lua: Remove script from linked list on destroy
Aki Tuomi [Sun, 4 Mar 2018 18:09:21 +0000 (20:09 +0200)] 
lib-lua: Remove script from linked list on destroy

Otherwise it might cause a crash

7 years agolmtp: proxy: Use proxy_not_trusted field if returned from passdb.
Stephan Bosch [Wed, 28 Feb 2018 18:16:36 +0000 (19:16 +0100)] 
lmtp: proxy: Use proxy_not_trusted field if returned from passdb.

Before, this field was ignored. Now, if this field is set, no XCLIENT command is
ever sent to the remote proxy.

7 years agolmtp: proxy: Use ssl/starttls fields if returned from passdb.
Stephan Bosch [Wed, 28 Feb 2018 09:22:33 +0000 (10:22 +0100)] 
lmtp: proxy: Use ssl/starttls fields if returned from passdb.

Before, these fields were ignored. Now, these are used to determine whether the
proxy connection to the backend should be secured by SSL and how.

7 years agologin-common: Use client SSL certificate and key settings from lib-master.
Stephan Bosch [Wed, 28 Feb 2018 17:58:42 +0000 (18:58 +0100)] 
login-common: Use client SSL certificate and key settings from lib-master.

7 years agolib-master: Initialize key and certificate for client SSL settings.
Stephan Bosch [Wed, 28 Feb 2018 17:14:33 +0000 (18:14 +0100)] 
lib-master: Initialize key and certificate for client SSL settings.

This uses the ssl_client_cert and ssl_client_key settings.

7 years agologin-common: Remove unused ssl_require_crl setting.
Stephan Bosch [Wed, 28 Feb 2018 18:01:17 +0000 (19:01 +0100)] 
login-common: Remove unused ssl_require_crl setting.

7 years agolib-smtp: client: Add smtp_client_connection_create_ip().
Stephan Bosch [Sat, 10 Mar 2018 18:13:24 +0000 (19:13 +0100)] 
lib-smtp: client: Add smtp_client_connection_create_ip().

This allows making SMTP client connections without performing a DNS lookup. The
optional hostname parameter is used to verify the hostname in the SSL
certificate from the server, if any.

7 years agolib-smtp: client: smtp_client_connection_create(): ATTR_NULL() pointed to wrong param...
Stephan Bosch [Sat, 10 Mar 2018 18:07:26 +0000 (19:07 +0100)] 
lib-smtp: client: smtp_client_connection_create(): ATTR_NULL() pointed to wrong parameter.

7 years agolib-smtp: client: connection: Perform IP lookup in a separate function.
Stephan Bosch [Sat, 10 Mar 2018 18:05:40 +0000 (19:05 +0100)] 
lib-smtp: client: connection: Perform IP lookup in a separate function.

7 years agolib: net: Avoid comparing the content of unassigned IPs in net_ip_cmp().
Stephan Bosch [Sat, 10 Mar 2018 18:22:19 +0000 (19:22 +0100)] 
lib: net: Avoid comparing the content of unassigned IPs in net_ip_cmp().

7 years agolib-ssl-iostream: Fix potential crash if istream is destroyed before ostream
Timo Sirainen [Mon, 12 Mar 2018 11:58:02 +0000 (13:58 +0200)] 
lib-ssl-iostream: Fix potential crash if istream is destroyed before ostream

This happened if o_stream_destroy() triggered flush, which attempted to read
from the ssl_io->ssl_input. If the istream-ssl was already destroyed, it was
NULL and that caused a crash.

7 years agoimapc: Fix errors when handling UIDVALIDITY change
Timo Sirainen [Mon, 12 Mar 2018 13:29:48 +0000 (15:29 +0200)] 
imapc: Fix errors when handling UIDVALIDITY change

This mainly happened when imapc was used with index files and the backend
IMAP server recreated the mailbox. This caused errors like:
Expunged message uid=1 reappeared - reconnecting

7 years agoimapc: Don't try to add mails to index if they already exist there
Timo Sirainen [Mon, 12 Mar 2018 13:06:13 +0000 (15:06 +0200)] 
imapc: Don't try to add mails to index if they already exist there

Broken by 259a4ca5943123915a019799623d2e4a4ef7fd15 when imapc was used
with (not in-memory) index files.

This caused errors like "Append with UID 200, but next_uid = 201"

7 years agolib-dcrypt: test-stream - Ensure more is read when buffer becomes empty
Aki Tuomi [Mon, 12 Mar 2018 12:50:32 +0000 (14:50 +0200)] 
lib-dcrypt: test-stream - Ensure more is read when buffer becomes empty

7 years agolib-dcrypt: istream-decrypt - Read more if buffer is empty
Aki Tuomi [Mon, 12 Mar 2018 12:48:41 +0000 (14:48 +0200)] 
lib-dcrypt: istream-decrypt - Read more if buffer is empty

If there is no more buffered data, try to decrypt more.

- Fixes Panic: file istream.c: line 192 (i_stream_read): assertion failed: (!stream->blocking)
- Fixes infinite loop when stream is not blocking

7 years agolib-lda: Do not convert "From:" message address to STMP address, just to make a strin...
Stephan Bosch [Tue, 6 Mar 2018 21:11:34 +0000 (22:11 +0100)] 
lib-lda: Do not convert "From:" message address to STMP address, just to make a string for logging.

This leads to problems when the message address (RFC5322) has UTF-8 code points
in the local part, which is (currently) allowed for message addresses, but not
for SMTP addresses (RFC5321).

7 years agonotify: Fix crash if NO_NOTIFY transaction is rolled back during commit
Timo Sirainen [Wed, 7 Mar 2018 09:24:30 +0000 (11:24 +0200)] 
notify: Fix crash if NO_NOTIFY transaction is rolled back during commit

Fixes: Panic: no notify_mail_txn found
7 years agolmtp: Provide hidden support for ORCPT RCPT parameter.
Stephan Bosch [Fri, 9 Mar 2018 15:09:16 +0000 (16:09 +0100)] 
lmtp: Provide hidden support for ORCPT RCPT parameter.

This is normally only available with the DSN capability, but we use it to
forward the original recipient in proxy setups.

This feature was available in the original Dovecot v2.2 LMTP, but it got lost in
the new lib-smtp implementation.

7 years agolib-smtp: client: Add support for forcibly enabling support for a capability.
Stephan Bosch [Fri, 9 Mar 2018 15:03:23 +0000 (16:03 +0100)] 
lib-smtp: client: Add support for forcibly enabling support for a capability.

Then it is enabled even when the server does not list it in the EHLO response.

7 years agolib-smtp: params: Make ORCPT parameter available separately if hidden capability...
Stephan Bosch [Fri, 9 Mar 2018 15:01:50 +0000 (16:01 +0100)] 
lib-smtp: params: Make ORCPT parameter available separately if hidden capability is enabled.