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

7 years agolib-smtp: common: Use the BIT() macro for defining the capability flags.
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.

7 years agolib: Remove ostream.get_used_size()
Timo Sirainen [Thu, 8 Mar 2018 12:10:42 +0000 (14:10 +0200)] 
lib: Remove ostream.get_used_size()

Removes backwards compatibility.

7 years agolib-test: test-ostream - Implement the new ostream.get_buffer_used_size() API
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.

7 years agolib: ostream-buffer - Implement the new ostream.get_buffer_used_size() API
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.

7 years agolib: ostream-file - Implement the new ostream.get_buffer_used_size() API
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.

7 years agolib-compression: Implement the new ostream.get_buffer_used/avail_size() APIs
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.

7 years agolib-ssl-iostream: Implement the new ostream.get_buffer_used/avail_size() APIs
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

7 years agolib: ostream-multiplex - Implement the new 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

7 years agolib: Remove ostream-escaped
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.

7 years agolib: Change/clarify o_stream_get_buffer_used/avail_size() APIs
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().

7 years agolib-mail: message_address_write() - don't crash with NULL address
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

7 years agosubmission-login: Only send HELO domain to post-login service when it is valid.
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.

7 years agolib-smtp: server: Fix application of pre-login HELO domain when no post-login HELO...
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'.

7 years agolda: Fix error message for invalid -r parameter to mention `-r' rather than `-a'.
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'.

7 years agolda: Add -r parameter to usage help message.
Stephan Bosch [Wed, 7 Mar 2018 17:54:38 +0000 (18:54 +0100)] 
lda: Add -r parameter to usage help message.

7 years agomaster: Strip '\n' from suid_dumpable read buffer before str_to_uint()
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()

7 years agoglobal: Call rfc822_parser_deinit() wherever possible
Timo Sirainen [Fri, 22 Dec 2017 16:58:11 +0000 (18:58 +0200)] 
global: Call rfc822_parser_deinit() wherever possible

7 years agolib-mail: Refactor code to make the next commit smaller
Timo Sirainen [Tue, 9 Jan 2018 16:33:59 +0000 (11:33 -0500)] 
lib-mail: Refactor code to make the next commit smaller

7 years agolib-mail: Add rfc822_parser_deinit()
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.

7 years agolib-mail: Make sure parsers don't accidentally go much beyond end pointer
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

7 years agolib-mail: Fix out-of-bounds read when parsing an invalid email address
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

7 years agolib-mail: test-message-address - Add TEST_MESSAGE_ADDRESS_FLAG_SKIP_LIST flag
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.

7 years agolib-mail: rfc822-parser - Add asserts to make sure parser state is correct
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

7 years agolib-dns: Move before lib-master
Aki Tuomi [Mon, 19 Feb 2018 12:19:08 +0000 (14:19 +0200)] 
lib-dns: Move before lib-master

7 years agolib-master: Fix dns_match_wildcard result value check
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.

7 years agolib-master: Check local_name only if both filter and input have it
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

7 years agologin-common: Enable config filtering by local name
Aki Tuomi [Thu, 30 Nov 2017 18:52:11 +0000 (20:52 +0200)] 
login-common: Enable config filtering by local name

Prevents servername misuse.

7 years agolib-master: Support validating config filters against requests
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.

7 years agoconfig: Add command to request all filters
Aki Tuomi [Thu, 30 Nov 2017 13:46:52 +0000 (15:46 +0200)] 
config: Add command to request all filters

7 years agoconfig: Add config_filter_get_all
Aki Tuomi [Thu, 30 Nov 2017 13:46:40 +0000 (15:46 +0200)] 
config: Add config_filter_get_all

Returns all filters

7 years agosdbox: Delete .temp* files on when save/copy transaction is rolled back
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.

7 years agomaster: Improve "core not dumped" error messages with Linux
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.

7 years agomaster: Add explanation URL to "core dumps disabled" and "core not dumped" errors
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

7 years agosubmission: Limit the set of capabilities to those that are actually supported.
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.

7 years agocharset-alias: Don't return value from void functions
Martti Rannanjärvi [Mon, 5 Mar 2018 12:55:04 +0000 (14:55 +0200)] 
charset-alias: Don't return value from void functions

7 years agolib-smtp: server: RCPT command: Make sure conn->state.pending_rcpt_cmds cannot decrem...
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.

7 years agolib-smtp: server: MAIL command: Make sure conn->state.pending_mail_cmds cannot decrem...
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.

7 years agolib-smtp: server: Fix double decrement of RCPT pending counter upon error.
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)

7 years agolib-storage: Fix memory leak when search accessed headers but found no mails
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.

7 years agolib-storage: Code cleanup - remove unnecessary temporary variable
Timo Sirainen [Thu, 1 Mar 2018 15:55:50 +0000 (17:55 +0200)] 
lib-storage: Code cleanup - remove unnecessary temporary variable

7 years agolib-storage: test-mail-storage - add check for mailbox_create() return value
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

7 years agolib-smtp: server: Only accept XCLIENT command when the XCLIENT capability is active.
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.

7 years agolib-smtp: client: Make clear that XCLIENT is not sent if the server has no support.
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.

7 years agolib-storage: Deduplicate headers in struct mailbox_header_lookup_ctx
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.

7 years agolib-storage: Add tests for mailbox_verify_name
Aki Tuomi [Wed, 29 Nov 2017 09:51:57 +0000 (11:51 +0200)] 
lib-storage: Add tests for mailbox_verify_name

7 years agolib-storage: test-mail-storage - Add framework for doing storage tests
Aki Tuomi [Wed, 29 Nov 2017 09:42:39 +0000 (11:42 +0200)] 
lib-storage: test-mail-storage - Add framework for doing storage tests

7 years agocydir: Fix crash when using mailbox_get_metadata()
Timo Sirainen [Sat, 17 Feb 2018 21:33:45 +0000 (23:33 +0200)] 
cydir: Fix crash when using mailbox_get_metadata()

7 years agombox: Fix creating mailbox when mailbox_update struct is given without uidvalidity
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)

7 years agombox: Default INBOX=<root path>/inbox only with LAYOUT=fs
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.

7 years agoLAYOUT=index: Don't mkdir index root directory at init
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.

7 years agombox: Enable .imap/ index directories with all layouts
Timo Sirainen [Sat, 17 Feb 2018 20:59:23 +0000 (22:59 +0200)] 
mbox: Enable .imap/ index directories with all layouts

LAYOUT=fs isn't any special here. The mboxes are created as files just the same
for LAYOUT=Maildir++ and for LAYOUT=index and it's not possible to create index
files under them.

7 years agoLAYOUT=index: Don't prevent using internal mailbox names
Timo Sirainen [Sat, 17 Feb 2018 20:28:35 +0000 (22:28 +0200)] 
LAYOUT=index: Don't prevent using internal mailbox names

For example with Maildir it wasn't possible to create mailboxes named "new",
"cur" or "tmp".

7 years agolib-storage: Add and use MAILBOX_LIST_PROP_NO_INTERNAL_NAMES
Timo Sirainen [Sat, 17 Feb 2018 20:25:20 +0000 (22:25 +0200)] 
lib-storage: Add and use MAILBOX_LIST_PROP_NO_INTERNAL_NAMES

Use it to replace Maildir++ check to see if mailbox_list.is_internal_name()
is wanted to be used.

7 years agolib-storage: mailbox_verify_name() - Deduplicate error handling
Timo Sirainen [Sat, 17 Feb 2018 20:04:52 +0000 (22:04 +0200)] 
lib-storage: mailbox_verify_name() - Deduplicate error handling

7 years agolib-storage: mailbox_verify_name() - Move prefix check to its own function
Timo Sirainen [Sat, 17 Feb 2018 20:02:38 +0000 (22:02 +0200)] 
lib-storage: mailbox_verify_name() - Move prefix check to its own function

No functional changes.

7 years agolib-storage: mailbox_verify_name() - Add comments for separator checks
Timo Sirainen [Sat, 17 Feb 2018 19:50:10 +0000 (21:50 +0200)] 
lib-storage: mailbox_verify_name() - Add comments for separator checks

7 years agoexample-config: Add mail_attachment_detection_options
Timo Sirainen [Wed, 28 Feb 2018 13:09:02 +0000 (15:09 +0200)] 
example-config: Add mail_attachment_detection_options

7 years agoimapc: Fix assert-crash after detecting that multiple expunged mail reappear
Timo Sirainen [Wed, 21 Feb 2018 15:04:16 +0000 (17:04 +0200)] 
imapc: Fix assert-crash after detecting that multiple expunged mail reappear

The first imapc_mailbox_set_corrupted() call started a reconnect. The second
call crashed with:

Panic: file imapc-client.c: line 414 (imapc_client_mailbox_reconnect): assertion failed: (!box->reconnecting)

7 years agom4: Use -U and -D in cc_fortify
Aki Tuomi [Sun, 25 Feb 2018 07:35:43 +0000 (09:35 +0200)] 
m4: Use -U and -D in cc_fortify

Not just -D. This is to test the same thing
that gets used.

7 years agom4: Remove pthread from tests
Aki Tuomi [Sun, 25 Feb 2018 07:35:19 +0000 (09:35 +0200)] 
m4: Remove pthread from tests

7 years agolmtp: proxy: Use source_ip proxy field if it is returned from passdb.
Stephan Bosch [Tue, 27 Feb 2018 21:56:20 +0000 (22:56 +0100)] 
lmtp: proxy: Use source_ip proxy field if it is returned from passdb.

Before, it was ignored. Now, it is used as the source IP for the outgoing LMTP
client connection.

7 years agolmtp: proxy: Use per-connection SMTP client settings.
Stephan Bosch [Tue, 27 Feb 2018 22:13:33 +0000 (23:13 +0100)] 
lmtp: proxy: Use per-connection SMTP client settings.

This is needed for setting source IP in later change. The peer_trusted setting
must me moved, since this setting is overriden by per-connection settings,
rather than merged.

7 years agolib-smtp: client: Add support for connecting from an explicit source IP.
Stephan Bosch [Tue, 27 Feb 2018 20:58:17 +0000 (21:58 +0100)] 
lib-smtp: client: Add support for connecting from an explicit source IP.

7 years agolib: connection: Added support for connecting from an explicit source IP.
Stephan Bosch [Tue, 27 Feb 2018 20:56:55 +0000 (21:56 +0100)] 
lib: connection: Added support for connecting from an explicit source IP.

7 years agoimapc: Fix crash when untagged FETCH reply doesn't have key-value pairs
Timo Sirainen [Tue, 27 Feb 2018 10:26:09 +0000 (12:26 +0200)] 
imapc: Fix crash when untagged FETCH reply doesn't have key-value pairs

The last key with the missing value is just silently ignored.

7 years agolib-http: client: Fix request statistics text to properly report send attempts.
Stephan Bosch [Tue, 27 Feb 2018 09:45:26 +0000 (10:45 +0100)] 
lib-http: client: Fix request statistics text to properly report send attempts.

If the request was first sent in the same ioloop cycle in which the text is
generated, the text would claim it was not sent at all yet.

With this commit the text now explicitly makes the distinction between request
attempts and actual send attempts. The number of attempts is increased at each
retry, while the send attempts are increased each time the request is actually
being sent to a server.

7 years agonotify: Ignore flag and keywords update during saving
Aki Tuomi [Mon, 26 Feb 2018 16:20:30 +0000 (18:20 +0200)] 
notify: Ignore flag and keywords update during saving

They are part of the saving event

7 years agoconfigure: Add spectre variant 2 mitigations
codarrenvelvindron [Sat, 17 Feb 2018 19:28:48 +0000 (14:28 -0500)] 
configure: Add spectre variant 2 mitigations

--enable-hardening adds -mfunction-return=thunk and -mindirect-branch=thunk
compiler options if supported.

7 years agolib-http: client: Add event fields for the number of bytes sent and received for...
Stephan Bosch [Mon, 19 Feb 2018 12:27:39 +0000 (13:27 +0100)] 
lib-http: client: Add event fields for the number of bytes sent and received for each request in the last attempt.

7 years agolib-http: response parser: Record input stream offset for the start of the last parse...
Stephan Bosch [Mon, 19 Feb 2018 12:24:57 +0000 (13:24 +0100)] 
lib-http: response parser: Record input stream offset for the start of the last parsed response.

7 years agolib-http: message parsers: Record beginning of parsed data.
Stephan Bosch [Mon, 19 Feb 2018 12:20:11 +0000 (13:20 +0100)] 
lib-http: message parsers: Record beginning of parsed data.

7 years agolib-http: client: Trigger special events when a request is finished, retried or redir...
Stephan Bosch [Sun, 21 Jan 2018 14:46:49 +0000 (15:46 +0100)] 
lib-http: client: Trigger special events when a request is finished, retried or redirected.

7 years agolib-http: client: Record last status code in the request object.
Stephan Bosch [Sun, 21 Jan 2018 15:19:41 +0000 (16:19 +0100)] 
lib-http: client: Record last status code in the request object.

7 years agolib-http: client: Reset redirect counter when the request is retried.
Stephan Bosch [Sun, 21 Jan 2018 15:08:55 +0000 (16:08 +0100)] 
lib-http: client: Reset redirect counter when the request is retried.

The absence of this reset caused problems when there was a redirect limit and
the request was retried, in which case the limit is reached too soon.

7 years agolib-http: client: Add "host" and "port" fields to request event.
Stephan Bosch [Sun, 21 Jan 2018 15:06:19 +0000 (16:06 +0100)] 
lib-http: client: Add "host" and "port" fields to request event.

7 years agolib-http: client: Use the new http_url_get_port*() functions.
Stephan Bosch [Sun, 21 Jan 2018 15:00:31 +0000 (16:00 +0100)] 
lib-http: client: Use the new  http_url_get_port*() functions.