]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
7 years agosubmission: Add workarounds for well-known MAIL and RCPT command syntax deviations.
Stephan Bosch [Sun, 8 Apr 2018 13:53:37 +0000 (15:53 +0200)] 
submission: Add workarounds for well-known MAIL and RCPT command syntax deviations.

This adds a new `submission_client_workarounds' setting that works analogous to
the `imap_client_workarounds' setting.

Workarounds:

- whitespace-before-path: Allow one or more spaces or tabs between `MAIL FROM:'
                          and path and between `RCPT TO:' and path.
- mailbox-for-path:       Allow using bare Mailbox syntax (i.e., without <...>)
                          instead of full path syntax.

7 years agolib-smtp: test-smtp-server-errors: Add tests for RCPT command workarounds.
Stephan Bosch [Sun, 8 Apr 2018 13:03:00 +0000 (15:03 +0200)] 
lib-smtp: test-smtp-server-errors: Add tests for RCPT command workarounds.

7 years agolib-smtp: test-smtp-server-errors: Add tests for MAIL command workarounds.
Stephan Bosch [Sun, 8 Apr 2018 12:59:17 +0000 (14:59 +0200)] 
lib-smtp: test-smtp-server-errors: Add tests for MAIL command workarounds.

7 years agolib-smtp: test-smtp-server-errors: Add tests for bad RCPT command syntax.
Stephan Bosch [Sun, 8 Apr 2018 12:40:12 +0000 (14:40 +0200)] 
lib-smtp: test-smtp-server-errors: Add tests for bad RCPT command syntax.

7 years agolib-smtp: test-smtp-server-errors: Add tests for bad MAIL command syntax.
Stephan Bosch [Sun, 8 Apr 2018 12:07:50 +0000 (14:07 +0200)] 
lib-smtp: test-smtp-server-errors: Add tests for bad MAIL command syntax.

7 years agolib-smtp: test-smtp-server-errors: Implicitly stop server when all expected client...
Stephan Bosch [Sun, 8 Apr 2018 13:31:37 +0000 (15:31 +0200)] 
lib-smtp: test-smtp-server-errors: Implicitly stop server when all expected client connections are closed.

7 years agolib-smtp: test-smtp-server-errors: Add more debug messages for the server.
Stephan Bosch [Sun, 8 Apr 2018 13:28:59 +0000 (15:28 +0200)] 
lib-smtp: test-smtp-server-errors: Add more debug messages for the server.

7 years agolib-smtp: test-smtp-server-errors: Make detection of early termination of child proce...
Stephan Bosch [Sun, 8 Apr 2018 13:20:22 +0000 (15:20 +0200)] 
lib-smtp: test-smtp-server-errors: Make detection of early termination of child processes part of each test.

7 years agolib-smtp: test-smtp-server-errors: Add log prefixes for client and server.
Stephan Bosch [Sun, 8 Apr 2018 13:24:02 +0000 (15:24 +0200)] 
lib-smtp: test-smtp-server-errors: Add log prefixes for client and server.

Makes it easier to distinguish which process is sending a log message while
debugging.

7 years agolib-smtp: test-smtp-server-errors: Add support for client-side connection context...
Stephan Bosch [Sun, 8 Apr 2018 13:16:05 +0000 (15:16 +0200)] 
lib-smtp: test-smtp-server-errors: Add support for client-side connection context data.

7 years agolib-smtp: test-smtp-server-errors: Use o_stream_nsend*() rather than o_stream_send*().
Stephan Bosch [Tue, 10 Apr 2018 01:12:41 +0000 (03:12 +0200)] 
lib-smtp: test-smtp-server-errors: Use o_stream_nsend*() rather than o_stream_send*().

The result is not checked anyway.

7 years agolib-smtp: server: Add workarounds for well-known MAIL and RCPT command syntax deviations.
Stephan Bosch [Sun, 8 Apr 2018 10:25:49 +0000 (12:25 +0200)] 
lib-smtp: server: Add workarounds for well-known MAIL and RCPT command syntax deviations.

7 years agolib-smtp: address parser: Do not allow source route for path with omitted brackets.
Stephan Bosch [Sun, 8 Apr 2018 10:13:16 +0000 (12:13 +0200)] 
lib-smtp: address parser: Do not allow source route for path with omitted brackets.

Parse it strictly as a Mailbox, which makes more sense.

7 years agolib: Implement str_sanitize_utf8().
Stephan Bosch [Sat, 14 Apr 2018 00:05:51 +0000 (02:05 +0200)] 
lib: Implement str_sanitize_utf8().

Unlike str_sanitize(), this function truncates strings based on a UTF8 code point
limit rather than a maximum size in bytes. Also, the Unicode replacement
character is used to mark invalid/control characters and an ellipsis character
is used to indicate the string truncation. For the normal str_sanitize() this is
done using a question mark and triple dots respectively.

7 years agolib: unichar: Add Horizontal Ellipsis character.
Stephan Bosch [Tue, 17 Apr 2018 19:31:38 +0000 (21:31 +0200)] 
lib: unichar: Add Horizontal Ellipsis character.

7 years ago.gitignore: Ignore doc/man/doveadm-rebuild.1
Martti Rannanjärvi [Thu, 26 Apr 2018 10:18:01 +0000 (13:18 +0300)] 
.gitignore: Ignore doc/man/doveadm-rebuild.1

7 years agodoveadm: Add rebuild attachments command
Aki Tuomi [Thu, 12 Apr 2018 11:09:10 +0000 (14:09 +0300)] 
doveadm: Add rebuild attachments command

Goes thru given mails and resets the attachment indicator.

7 years agolib-storage: Parse mail parts in mail_set_attachment_keywords if not present
Aki Tuomi [Thu, 12 Apr 2018 11:07:54 +0000 (14:07 +0300)] 
lib-storage: Parse mail parts in mail_set_attachment_keywords if not present

7 years agolib-storage: Add error reporting to mail_set_attachment_keywords
Aki Tuomi [Thu, 19 Apr 2018 07:19:15 +0000 (10:19 +0300)] 
lib-storage: Add error reporting to mail_set_attachment_keywords

7 years agodoveadm: mailbox cache decisions - Fatally fail if fields are missing
Aki Tuomi [Wed, 25 Apr 2018 08:04:08 +0000 (11:04 +0300)] 
doveadm: mailbox cache decisions - Fatally fail if fields are missing

7 years agoman: Document doveadm mailbox cache commands
Aki Tuomi [Wed, 25 Apr 2018 07:56:04 +0000 (10:56 +0300)] 
man: Document doveadm mailbox cache commands

7 years agodoveadm: Add mailbox cache manipulation commands
Aki Tuomi [Fri, 13 Apr 2018 10:28:47 +0000 (13:28 +0300)] 
doveadm: Add mailbox cache manipulation commands

This allows changing cache decisions and dropping cache pointer
for wanted mails.

7 years agodoveadm-mail: Handle field conversion to short opt better
Aki Tuomi [Sat, 14 Apr 2018 11:31:44 +0000 (14:31 +0300)] 
doveadm-mail: Handle field conversion to short opt better

Convert non-string types as well

7 years agodsync: If lock file can't be created because home is missing, mkdir the home
Timo Sirainen [Tue, 24 Apr 2018 15:50:38 +0000 (18:50 +0300)] 
dsync: If lock file can't be created because home is missing, mkdir the home

7 years agolib-storage: Add mail_user_home_mkdir()
Timo Sirainen [Tue, 24 Apr 2018 15:47:28 +0000 (18:47 +0300)] 
lib-storage: Add mail_user_home_mkdir()

7 years agolib-mail: message-address: Make the parser allow paths that omit `<' and `>'.
Stephan Bosch [Thu, 12 Apr 2018 14:13:08 +0000 (16:13 +0200)] 
lib-mail: message-address: Make the parser allow paths that omit `<' and `>'.

This is a syntax violation, but we allow it to account for a rather wide
selection of software that does not follow the standards.

7 years agolib-mail: message-address: Make parser properly reject paths with spurious trailing...
Stephan Bosch [Thu, 12 Apr 2018 19:27:32 +0000 (21:27 +0200)] 
lib-mail: message-address: Make parser properly reject paths with spurious trailing characters.

7 years agolib-mail: message-address: Make sure incomplete paths are rejected by parser.
Stephan Bosch [Thu, 12 Apr 2018 20:16:54 +0000 (22:16 +0200)] 
lib-mail: message-address: Make sure incomplete paths are rejected by parser.

7 years agolib-mail: message-address: Require paths with an invalid source route to have at...
Stephan Bosch [Thu, 12 Apr 2018 19:59:40 +0000 (21:59 +0200)] 
lib-mail: message-address: Require paths with an invalid source route to have at least a proper `:'.

Otherwise, the parser would allow a bare domain.

7 years agolib-mail: message-address: Properly deinit RFC822 parser in message_address_parse_path().
Stephan Bosch [Thu, 12 Apr 2018 18:29:36 +0000 (20:29 +0200)] 
lib-mail: message-address: Properly deinit RFC822 parser in message_address_parse_path().

7 years agolib-mail: test-message-address: Add test for parsing empty path.
Stephan Bosch [Thu, 12 Apr 2018 18:54:50 +0000 (20:54 +0200)] 
lib-mail: test-message-address: Add test for parsing empty path.

7 years agolib-mail: test-message-address: Use i_memdup() rather than explicit malloc(), memcpy().
Stephan Bosch [Thu, 12 Apr 2018 21:01:03 +0000 (23:01 +0200)] 
lib-mail: test-message-address: Use i_memdup() rather than explicit malloc(), memcpy().

7 years agolib: Added i_memdup().
Stephan Bosch [Thu, 12 Apr 2018 20:58:16 +0000 (22:58 +0200)] 
lib: Added i_memdup().

7 years agolib-master: Add log_core_filter setting to core dump on matching filter
Timo Sirainen [Mon, 16 Apr 2018 11:01:37 +0000 (14:01 +0300)] 
lib-master: Add log_core_filter setting to core dump on matching filter

7 years agolib: Add global core filter, which allows core dumping on matching events
Timo Sirainen [Mon, 16 Apr 2018 11:00:51 +0000 (14:00 +0300)] 
lib: Add global core filter, which allows core dumping on matching events

7 years agolib: Add log types as event categories
Timo Sirainen [Mon, 16 Apr 2018 10:48:38 +0000 (13:48 +0300)] 
lib: Add log types as event categories

This allows using debug, info, warning, error, fatal and panic as
categories.

7 years agolib-master, stats: Send event's log_type to stats process
Timo Sirainen [Mon, 16 Apr 2018 10:39:17 +0000 (13:39 +0300)] 
lib-master, stats: Send event's log_type to stats process

This makes the internal stats protocol incompatible with the previous
version, so major protocol version is increased.

7 years agolib-master: If log_debug is empty, don't set global debug log filter at all
Timo Sirainen [Mon, 16 Apr 2018 10:32:47 +0000 (13:32 +0300)] 
lib-master: If log_debug is empty, don't set global debug log filter at all

global_debug_log_filter==NULL check is a bit faster.

7 years agolib-master: Cleanup - Add new helper function for parsing log filter settings
Timo Sirainen [Mon, 16 Apr 2018 10:32:15 +0000 (13:32 +0300)] 
lib-master: Cleanup - Add new helper function for parsing log filter settings

7 years agolib-master: Rename master_service_log_debug_parse() to master_service_log_filter_parse()
Timo Sirainen [Mon, 16 Apr 2018 10:31:03 +0000 (13:31 +0300)] 
lib-master: Rename master_service_log_debug_parse() to master_service_log_filter_parse()

This function will be used for parsing other settings besides just
log_debug.

7 years agoimapc: Fix expunges+appends in same session with imapc_features=no-msn-updates
Timo Sirainen [Tue, 17 Apr 2018 12:46:41 +0000 (15:46 +0300)] 
imapc: Fix expunges+appends in same session with imapc_features=no-msn-updates

Since the EXPUNGEs were ignored, the sequence numbers weren't updated.
When a new mail arrived, the sequence number sent by the remote IMAP server
pointed to existing mails in imapc's mapping. Fix this by changing the
sequence number if the returned UID is >= next_uid.

Fixes "FETCH UID mismatch" errors.

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 agolib-mail: Fix include guards for istream-nonuls.h
Sergey Kitov [Fri, 6 Apr 2018 12:48:02 +0000 (15:48 +0300)] 
lib-mail: Fix include guards for istream-nonuls.h

7 years agolib-program-client: Wait longer in test-program-client-local
Aki Tuomi [Wed, 11 Apr 2018 12:11:23 +0000 (15:11 +0300)] 
lib-program-client: Wait longer in test-program-client-local

Sometiems it can take longer than 1 second to execute, if the test
environment is loaded.

7 years agolib-ssl-iostream: Fix premature NULL deref
Aki Tuomi [Thu, 1 Feb 2018 07:19:10 +0000 (09:19 +0200)] 
lib-ssl-iostream: Fix premature NULL deref

Broken in 4836d541b1c1354073e068aabe5cd92aa67fe61d

Found by coverity

7 years agolib-mail: message-address: Fix address parser to properly reject angle-addr without...
Stephan Bosch [Tue, 10 Apr 2018 00:41:44 +0000 (02:41 +0200)] 
lib-mail: message-address: Fix address parser to properly reject angle-addr without `>'.

7 years agolib-mail: message-address: Fix assert panic occurring in message_address_parse_path...
Stephan Bosch [Tue, 10 Apr 2018 00:36:44 +0000 (02:36 +0200)] 
lib-mail: message-address: Fix assert panic occurring in message_address_parse_path() when no opening `<' is found.

Panic was:

Panic: file message-address.c: line 147 (parse_angle_addr): assertion failed: (*ctx->parser.data == '<')

7 years agolib-storage: Assert unique_root_dir is set with MAIL_STORAGE_CLASS_FLAG_UNIQUE_ROOT
Timo Sirainen [Mon, 19 Feb 2018 11:21:25 +0000 (13:21 +0200)] 
lib-storage: Assert unique_root_dir is set with MAIL_STORAGE_CLASS_FLAG_UNIQUE_ROOT

7 years agolib-storage: shared driver - Remove copying the child storage's class_flags
Timo Sirainen [Mon, 19 Feb 2018 11:22:02 +0000 (13:22 +0200)] 
lib-storage: shared driver - Remove copying the child storage's class_flags

The shared storage root itself doesn't have any storage, so it shouldn't
need to copy the child storage's class_flags either.

This fixes a crash when shared namespace was created with mdbox storage, and
another mdbox namespace was created afterwards. This had
MAIL_STORAGE_CLASS_FLAG_UNIQUE_ROOT set, but its unique_root_dir is NULL,
which caused a crash in mail_storage_match_class().

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 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-storage: mail-storage-settings: Pre-parse postmaster_address as an SMTP address.
Stephan Bosch [Tue, 6 Mar 2018 22:11:32 +0000 (23:11 +0100)] 
lib-storage: mail-storage-settings: Pre-parse postmaster_address as an SMTP address.

The pre-parsed address is not currently used anywhere, but this does check that
the postmaster address can successfully be converted to an SMTP address, which
is important for Pigeonhole.

7 years agolib-smtp: address: Add source syntax check for conversion from RFC5322 addresses.
Stephan Bosch [Tue, 6 Mar 2018 20:43:22 +0000 (21:43 +0100)] 
lib-smtp: address: Add source syntax check for conversion from RFC5322 addresses.

The message-address parser (for RFC 5322) allows UTF-8 characters in the
localpart, which is not acceptable for SMTP addresses. This change adds a check
that determines whether the source RFC5222 address can be converted into a
SMTP address.

7 years agolib-master: Don't dup errors to service->set_pool in master_service_settings_read
Martti Rannanjärvi [Thu, 15 Feb 2018 15:50:43 +0000 (17:50 +0200)] 
lib-master: Don't dup errors to service->set_pool in master_service_settings_read

Use t_strdup() instead.

7 years agolib-master: Copy settings_parser_get_error() string so it's usable as error_r
Martti Rannanjärvi [Fri, 12 Jan 2018 13:28:52 +0000 (15:28 +0200)] 
lib-master: Copy settings_parser_get_error() string so it's usable as error_r

Also convert t_strdup()s in master_service_settings_read() into p_strdup()s
using service->set_pool.

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 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 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 handling empty mailboxes.
Timo Sirainen [Mon, 9 Apr 2018 13:41:19 +0000 (16:41 +0300)] 
imapc: Fix crash when handling empty mailboxes.

Broken by c05b4ac76c4c6012958f1cc37e2fccf7a7d31c33

7 years agoimapc: Fix local state if mailbox is empty after reconnection
Timo Sirainen [Sun, 25 Mar 2018 20:15:58 +0000 (23:15 +0300)] 
imapc: Fix local state if mailbox is empty after reconnection

If local indexes had more than 0 mails, but after reconnection the remote
IMAP server replied with "* 0 EXISTS", the mails in local index weren't
expunged. This could have resulted in:

Panic: file imapc-sync.c: line 328 (imapc_initial_sync_check): assertion failed: (mail_index_is_expunged(view, lseq) || seq_range_exists(&ctx->mbox->delayed_expunged_uids, luid))

7 years agoimapc: If SELECT INBOX fails with NO, treat it as temporary failure
Timo Sirainen [Wed, 11 Apr 2018 11:19:06 +0000 (14:19 +0300)] 
imapc: If SELECT INBOX fails with NO, treat it as temporary failure

If it's treated as "mailbox doesn't exist", the INBOX autocreation code
will attempt to CREATE INBOX. This is very unlikely to work.

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 agoimapc: Ignore fetch-msn-workarounds/no-msn-updates during initial FETCH
Timo Sirainen [Sun, 25 Mar 2018 21:01:26 +0000 (00:01 +0300)] 
imapc: Ignore fetch-msn-workarounds/no-msn-updates during initial FETCH

Otherwise duplicate UIDs aren't detected and it causes an assert-crash:

Panic: file imapc-mailbox.c: line 533 (imapc_untagged_fetch): assertion failed: (lseq == mbox->sync_next_lseq)

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 agologin-common: Indicate TLS secured transport on proxied TLS too
Aki Tuomi [Tue, 27 Mar 2018 13:12:46 +0000 (16:12 +0300)] 
login-common: Indicate TLS secured transport on proxied TLS too

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 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: 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: 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 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 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 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 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>