]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Stephan Bosch [Mon, 26 Feb 2018 22:53:22 +0000 (23:53 +0100)]
lib-program-client: local: Call program client variable "plclient" consistently.
Stephan Bosch [Sun, 25 Feb 2018 09:39:15 +0000 (10:39 +0100)]
lib-program-client: Reformat test-program-client-unix.c.
Stephan Bosch [Sun, 25 Feb 2018 09:34:16 +0000 (10:34 +0100)]
lib-program-client: Reformat test-program-client-net.c.
Stephan Bosch [Sun, 25 Feb 2018 17:54:46 +0000 (18:54 +0100)]
lib-program-client: Reformat program-client-private.h.
Stephan Bosch [Sun, 25 Feb 2018 09:21:57 +0000 (10:21 +0100)]
lib-program-client: Reformat test-program-client-local.c.
Stephan Bosch [Sun, 25 Feb 2018 09:20:20 +0000 (10:20 +0100)]
lib-program-client: Reformat program-client-remote.c.
Stephan Bosch [Sun, 25 Feb 2018 09:10:17 +0000 (10:10 +0100)]
lib-program-client: Reformat program-client-local.c.
Stephan Bosch [Sun, 25 Feb 2018 09:06:36 +0000 (10:06 +0100)]
lib-program-client: Reformat program-client.h.
Stephan Bosch [Sun, 25 Feb 2018 09:05:33 +0000 (10:05 +0100)]
lib-program-client: Reformat program-client.c.
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.
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.
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.
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.
Stephan Bosch [Sun, 25 Feb 2018 20:56:55 +0000 (21:56 +0100)]
lib: Reformat test-iostream-pump.c.
Stephan Bosch [Sun, 25 Feb 2018 18:04:14 +0000 (19:04 +0100)]
lib: Reformat iostream-pump.c.
Stephan Bosch [Sun, 25 Feb 2018 18:03:49 +0000 (19:03 +0100)]
lib: Reformat iostream-pump.h.
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.
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.
Stephan Bosch [Thu, 15 Mar 2018 21:36:16 +0000 (22:36 +0100)]
lib-smtp: server: Check that BINARYMIME is not used without CHUNKING.
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 .
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
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))
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.
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"
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.
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>.
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>
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>
Aki Tuomi [Sat, 10 Mar 2018 17:43:27 +0000 (19:43 +0200)]
config: tabescape local name and service
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>
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
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.
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.
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.
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.
Stephan Bosch [Wed, 28 Feb 2018 18:01:17 +0000 (19:01 +0100)]
login-common: Remove unused ssl_require_crl setting.
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.
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.
Stephan Bosch [Sat, 10 Mar 2018 18:05:40 +0000 (19:05 +0100)]
lib-smtp: client: connection: Perform IP lookup in a separate function.
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().
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.
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
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"
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
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
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).
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
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.
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.
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.
Stephan Bosch [Fri, 9 Mar 2018 14:47:06 +0000 (15:47 +0100)]
lib-smtp: common: Use the BIT() macro for defining the capability flags.
Timo Sirainen [Thu, 8 Mar 2018 12:10:42 +0000 (14:10 +0200)]
lib: Remove ostream.get_used_size()
Removes backwards compatibility.
Timo Sirainen [Thu, 8 Mar 2018 12:08:50 +0000 (14:08 +0200)]
lib-test: test-ostream - Implement the new ostream.get_buffer_used_size() API
It's implemented the same way as the old get_used_size(). The default
implementation for get_buffer_avail_size() also works with this.
Timo Sirainen [Thu, 8 Mar 2018 12:08:43 +0000 (14:08 +0200)]
lib: ostream-buffer - Implement the new ostream.get_buffer_used_size() API
It's implemented the same way as the old get_used_size(). The default
implementation for get_buffer_avail_size() also works with this.
Timo Sirainen [Thu, 8 Mar 2018 12:07:34 +0000 (14:07 +0200)]
lib: ostream-file - Implement the new ostream.get_buffer_used_size() API
It's implemented the same way as the old get_used_size(). The default
implementation for get_buffer_avail_size() also works with this.
Timo Sirainen [Sat, 24 Feb 2018 20:04:49 +0000 (22:04 +0200)]
lib-compression: Implement the new ostream.get_buffer_used/avail_size() APIs
The avail_size() implementation isn't fully correct for bzlib/zlib/lzma.
Fixing it requires larger changes though.
Timo Sirainen [Sat, 24 Feb 2018 20:04:27 +0000 (22:04 +0200)]
lib-ssl-iostream: Implement the new ostream.get_buffer_used/avail_size() APIs
Timo Sirainen [Sat, 24 Feb 2018 20:04:11 +0000 (22:04 +0200)]
lib: ostream-multiplex - Implement the new get_buffer_used/avail_size() APIs
Timo Sirainen [Mon, 26 Feb 2018 13:17:36 +0000 (15:17 +0200)]
lib: Remove ostream-escaped
It can't implement o_stream_get_buffer_avail_size() correctly with its
current API. Nothing uses it currently, so easier to just remove it
entirely.
Timo Sirainen [Sat, 24 Feb 2018 20:03:10 +0000 (22:03 +0200)]
lib: Change/clarify o_stream_get_buffer_used/avail_size() APIs
ostream.get_used_size() is deprecated and replaced by get_buffer_used_size()
and get_buffer_avail_size().
Timo Sirainen [Tue, 6 Mar 2018 10:14:25 +0000 (12:14 +0200)]
lib-mail: message_address_write() - don't crash with NULL address
message_address_parse() can return NULL on empty address, so writing it
should produce empty address as well. Broken by
15581297511b658a29c707c6031a258bab7bf1a5
Stephan Bosch [Wed, 7 Mar 2018 14:14:52 +0000 (15:14 +0100)]
submission-login: Only send HELO domain to post-login service when it is valid.
Stephan Bosch [Wed, 7 Mar 2018 14:03:42 +0000 (15:03 +0100)]
lib-smtp: server: Fix application of pre-login HELO domain when no post-login HELO is issued.
The substituted domain was not marked as valid, which caused the HELO field of
the produced received line to be set to 'unknown'.
Stephan Bosch [Wed, 7 Mar 2018 17:56:00 +0000 (18:56 +0100)]
lda: Fix error message for invalid -r parameter to mention `-r' rather than `-a'.
Stephan Bosch [Wed, 7 Mar 2018 17:54:38 +0000 (18:54 +0100)]
lda: Add -r parameter to usage help message.
Martti Rannanjärvi [Tue, 6 Mar 2018 11:27:17 +0000 (13:27 +0200)]
master: Strip '\n' from suid_dumpable read buffer before str_to_uint()
Timo Sirainen [Fri, 22 Dec 2017 16:58:11 +0000 (18:58 +0200)]
global: Call rfc822_parser_deinit() wherever possible
Timo Sirainen [Tue, 9 Jan 2018 16:33:59 +0000 (11:33 -0500)]
lib-mail: Refactor code to make the next commit smaller
Timo Sirainen [Fri, 22 Dec 2017 16:56:53 +0000 (18:56 +0200)]
lib-mail: Add rfc822_parser_deinit()
It's not a strict requirement to call this, but it assert-crashes if the
state isn't valid.
Timo Sirainen [Fri, 22 Dec 2017 16:42:53 +0000 (18:42 +0200)]
lib-mail: Make sure parsers don't accidentally go much beyond end pointer
Timo Sirainen [Fri, 22 Dec 2017 16:36:55 +0000 (18:36 +0200)]
lib-mail: Fix out-of-bounds read when parsing an invalid email address
The included unit test doesn't fail, but running it with valgrind shows
"Invalid read of size 1" error.
Broken in
d6737a17a27402e7a262f7ba8a2ed588d576f23c
Discovered by Aleksandar Nikolic of Cisco Talos
Timo Sirainen [Fri, 22 Dec 2017 16:36:09 +0000 (18:36 +0200)]
lib-mail: test-message-address - Add TEST_MESSAGE_ADDRESS_FLAG_SKIP_LIST flag
This commit just adds the flag and sets it to 0 for all existing tests.
Timo Sirainen [Fri, 22 Dec 2017 16:31:52 +0000 (18:31 +0200)]
lib-mail: rfc822-parser - Add asserts to make sure parser state is correct
Aki Tuomi [Mon, 19 Feb 2018 12:19:08 +0000 (14:19 +0200)]
lib-dns: Move before lib-master
Aki Tuomi [Mon, 26 Feb 2018 10:53:19 +0000 (12:53 +0200)]
lib-master: Fix dns_match_wildcard result value check
It returns 0, not TRUE.
Aki Tuomi [Fri, 23 Feb 2018 13:31:11 +0000 (15:31 +0200)]
lib-master: Check local_name only if both filter and input have it
Broken in
cedc777a1acf830af4cf0b6e9b0f343c81e20adc
Aki Tuomi [Thu, 30 Nov 2017 18:52:11 +0000 (20:52 +0200)]
login-common: Enable config filtering by local name
Prevents servername misuse.
Aki Tuomi [Thu, 30 Nov 2017 13:47:25 +0000 (15:47 +0200)]
lib-master: Support validating config filters against requests
Validation will sanitize the input request and drop any fields
that have no filter in config. E.g. if you have a local block
with name, and nothing else, then lip/rip will be dropped
from the request.
Aki Tuomi [Thu, 30 Nov 2017 13:46:52 +0000 (15:46 +0200)]
config: Add command to request all filters
Aki Tuomi [Thu, 30 Nov 2017 13:46:40 +0000 (15:46 +0200)]
config: Add config_filter_get_all
Returns all filters
Timo Sirainen [Thu, 1 Mar 2018 10:17:16 +0000 (12:17 +0200)]
sdbox: Delete .temp* files on when save/copy transaction is rolled back
For example when copying was aborted due to user being over quota, temp
files were left behind.
Timo Sirainen [Thu, 1 Mar 2018 16:38:43 +0000 (18:38 +0200)]
master: Improve "core not dumped" error messages with Linux
Recommend setting /proc/fs/suid_dumpable to 2 and
/proc/sys/kernel/core_pattern to absolute path, if they already aren't.
Timo Sirainen [Thu, 1 Mar 2018 16:37:43 +0000 (18:37 +0200)]
master: Add explanation URL to "core dumps disabled" and "core not dumped" errors
Stephan Bosch [Mon, 5 Mar 2018 20:02:49 +0000 (21:02 +0100)]
submission: Limit the set of capabilities to those that are actually supported.
Particularly, the XCLIENT capability was inappropriately enabled when the
backend MTA announced support. XCLIENT is not supported by Dovecot post-login.
Martti Rannanjärvi [Mon, 5 Mar 2018 12:55:04 +0000 (14:55 +0200)]
charset-alias: Don't return value from void functions
Stephan Bosch [Sun, 4 Mar 2018 22:43:55 +0000 (23:43 +0100)]
lib-smtp: server: RCPT command: Make sure conn->state.pending_rcpt_cmds cannot decrement through zero.
Added assertion.
Stephan Bosch [Sun, 4 Mar 2018 22:42:45 +0000 (23:42 +0100)]
lib-smtp: server: MAIL command: Make sure conn->state.pending_mail_cmds cannot decrement through zero.
Added assertion.
Stephan Bosch [Sun, 4 Mar 2018 22:35:53 +0000 (23:35 +0100)]
lib-smtp: server: Fix double decrement of RCPT pending counter upon error.
The pending counter was sometimes decremented twice in specific error
conditions, leading to an assert panic in the DATA command. This was caused by
some dead code. If the MAIL command failed in a pipeline before the RCPT command,
the assert was triggered.
Panic was:
Panic: file smtp-server-cmd-data.c: line 354 (cmd_data_start): assertion failed: (conn->state.pending_mail_cmds == 0 && conn->state.pending_rcpt_cmds == 0)
Timo Sirainen [Thu, 1 Mar 2018 15:59:34 +0000 (17:59 +0200)]
lib-storage: Fix memory leak when search accessed headers but found no mails
For example fetching headers with UID FETCH for a nonexistent UID.
Timo Sirainen [Thu, 1 Mar 2018 15:55:50 +0000 (17:55 +0200)]
lib-storage: Code cleanup - remove unnecessary temporary variable
Timo Sirainen [Thu, 1 Mar 2018 18:12:35 +0000 (20:12 +0200)]
lib-storage: test-mail-storage - add check for mailbox_create() return value
Stephan Bosch [Thu, 1 Mar 2018 13:53:11 +0000 (14:53 +0100)]
lib-smtp: server: Only accept XCLIENT command when the XCLIENT capability is active.
Report "502 Unsupported command" otherwise. Before, it would complain about the
client not being trusted, which is confusing.
Stephan Bosch [Thu, 1 Mar 2018 13:52:06 +0000 (14:52 +0100)]
lib-smtp: client: Make clear that XCLIENT is not sent if the server has no support.
Timo Sirainen [Thu, 21 Jul 2016 14:32:52 +0000 (08:32 -0600)]
lib-storage: Deduplicate headers in struct mailbox_header_lookup_ctx
This might slightly improve performance.
Aki Tuomi [Wed, 29 Nov 2017 09:51:57 +0000 (11:51 +0200)]
lib-storage: Add tests for mailbox_verify_name
Aki Tuomi [Wed, 29 Nov 2017 09:42:39 +0000 (11:42 +0200)]
lib-storage: test-mail-storage - Add framework for doing storage tests
Timo Sirainen [Sat, 17 Feb 2018 21:33:45 +0000 (23:33 +0200)]
cydir: Fix crash when using mailbox_get_metadata()
Timo Sirainen [Sat, 17 Feb 2018 21:26:55 +0000 (23:26 +0200)]
mbox: Fix creating mailbox when mailbox_update struct is given without uidvalidity
This especially fixes a crash when creating mboxes with LAYOUT=index:
Panic: file mbox-sync.c: line 1241 (mbox_write_pseudo): assertion failed: (uid_validity != 0)
Timo Sirainen [Sat, 17 Feb 2018 21:19:29 +0000 (23:19 +0200)]
mbox: Default INBOX=<root path>/inbox only with LAYOUT=fs
It's likely not a valid path with other layouts.
Timo Sirainen [Sat, 17 Feb 2018 21:16:38 +0000 (23:16 +0200)]
LAYOUT=index: Don't mkdir index root directory at init
It's not really needed, since anything that needs it will automatically
mkdir it later as well. This also breaks using LAYOUT=index with mbox,
because the mbox code hasn't yet had a chance to override the index root
path so it was mkdired without the .imap/ suffix.